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.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index dba3401700..e32994505c 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -74,12 +74,16 @@ 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 looseIntersectRectangle(const Rect &src1, const Rect &src2);
+ bool unionRectangle(Common::Rect &destRect, const Rect &src1, const Rect &src2);
public:
Common::Point _centroid;
int _transColor;
@@ -88,7 +92,9 @@ public:
GfxSurface(const GfxSurface &s);
~GfxSurface();
- void setScreenSurface();
+ void trackDirtyRects();
+ void addDirtyRect(const Rect &r);
+ void copyToScreen();
Graphics::Surface lockSurface();
void unlockSurface();
void synchronize(Serializer &s);
@@ -274,6 +280,7 @@ public:
return _surface.lockSurface();
}
void unlockSurface() { _surface.unlockSurface(); }
+ void addDirtyRect(const Rect &r);
void fillArea(int xp, int yp, int color);
void fillRect(const Rect &bounds, int color);
void fillRect2(int xs, int ys, int width, int height, int color);
@@ -301,7 +308,6 @@ public:
void copyFrom(GfxSurface &src, int destX, int destY) {
_surface.setBounds(_bounds);
_surface.copyFrom(src, destX, destY);
- g_system->updateScreen();
}
GfxSurface &getSurface() {
_surface.setBounds(_bounds);