mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
TSAGE: Implemented changes for dirty rect handling needed for R2R
This commit is contained in:
parent
3f17a3ff25
commit
300a04700a
@ -1301,6 +1301,25 @@ int GfxManager::getAngle(const Common::Point &p1, const Common::Point &p2) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GfxManager::copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion) {
|
||||
if (&_surface == &(GLOBALS._screenSurface))
|
||||
_surface.setBounds(Rect(0, 0, _bounds.width(), _bounds.height()));
|
||||
else
|
||||
_surface.setBounds(_bounds);
|
||||
|
||||
_surface.copyFrom(src, destBounds, priorityRegion);
|
||||
}
|
||||
void GfxManager::copyFrom(GfxSurface &src, int destX, int destY) {
|
||||
if (&_surface == &(GLOBALS._screenSurface))
|
||||
_surface.setBounds(Rect(0, 0, _bounds.width(), _bounds.height()));
|
||||
else
|
||||
_surface.setBounds(_bounds);
|
||||
|
||||
_surface.copyFrom(src, destX, destY);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
@ -83,7 +83,6 @@ private:
|
||||
Common::List<Rect> _dirtyRects;
|
||||
|
||||
void mergeDirtyRects();
|
||||
bool looseIntersectRectangle(const Rect &src1, const Rect &src2);
|
||||
bool unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2);
|
||||
|
||||
public:
|
||||
@ -302,14 +301,9 @@ public:
|
||||
virtual void set(byte *dest, int size, byte val) {
|
||||
Common::fill(dest, dest + size, val);
|
||||
}
|
||||
void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL) {
|
||||
_surface.setBounds(_bounds);
|
||||
_surface.copyFrom(src, destBounds, priorityRegion);
|
||||
}
|
||||
void copyFrom(GfxSurface &src, int destX, int destY) {
|
||||
_surface.setBounds(_bounds);
|
||||
_surface.copyFrom(src, destX, destY);
|
||||
}
|
||||
void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL);
|
||||
void copyFrom(GfxSurface &src, int destX, int destY);
|
||||
|
||||
GfxSurface &getSurface() {
|
||||
_surface.setBounds(_bounds);
|
||||
return _surface;
|
||||
|
Loading…
Reference in New Issue
Block a user