aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage/graphics.h')
-rw-r--r--engines/tsage/graphics.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index dba3401700..9c6f13e407 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -74,12 +74,17 @@ public:
class GfxSurface {
private:
Graphics::Surface *_customSurface;
- Graphics::Surface *_screenSurfaceP;
int _lockSurfaceCtr;
- bool _screenSurface;
bool _disableUpdates;
Rect _bounds;
+
+ bool _trackDirtyRects;
+ Common::List<Rect> _dirtyRects;
+
+ void mergeDirtyRects();
+ bool unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2);
+
public:
Common::Point _centroid;
int _transColor;
@@ -89,6 +94,8 @@ public:
~GfxSurface();
void setScreenSurface();
+ void updateScreen();
+ void addDirtyRect(const Rect &r);
Graphics::Surface lockSurface();
void unlockSurface();
void synchronize(Serializer &s);
@@ -294,15 +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);
- g_system->updateScreen();
- }
+ void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL);
+ void copyFrom(GfxSurface &src, int destX, int destY);
+
GfxSurface &getSurface() {
_surface.setBounds(_bounds);
return _surface;