diff options
author | Paul Gilbert | 2016-05-26 23:01:34 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-05-26 23:01:34 -0400 |
commit | 559b9744bfc6e7c84f75641bafc531f9ab30cdc8 (patch) | |
tree | 45a88953d0477aeae4a8ac47b4a1ad935df40e3b /engines/tsage/graphics.h | |
parent | 4d933a15f65809afa330622339a200f15cb19eeb (diff) | |
download | scummvm-rg350-559b9744bfc6e7c84f75641bafc531f9ab30cdc8.tar.gz scummvm-rg350-559b9744bfc6e7c84f75641bafc531f9ab30cdc8.tar.bz2 scummvm-rg350-559b9744bfc6e7c84f75641bafc531f9ab30cdc8.zip |
TSAGE: Refactor GfxSurface and Screen to not use virtual inheritance
Diffstat (limited to 'engines/tsage/graphics.h')
-rw-r--r-- | engines/tsage/graphics.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 3b395b7625..51636c4119 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -28,7 +28,7 @@ #include "common/list.h" #include "common/rect.h" #include "common/system.h" -#include "graphics/managed_surface.h" +#include "graphics/screen.h" namespace TsAGE { @@ -73,13 +73,23 @@ public: enum FrameFlag { FRAME_FLIP_CENTROID_X = 4, FRAME_FLIP_CENTROID_Y = 8 }; -class GfxSurface: virtual public Graphics::ManagedSurface { +/** + * Surface class. This derivces from Graphics::Screen because it has + * logic we'll need for our own Screen class that derives from this one + */ + class GfxSurface: public Graphics::Screen { private: int _lockSurfaceCtr; Graphics::ManagedSurface _rawSurface; bool _disableUpdates; Rect _bounds; + protected: + /** + * Override the addDirtyRect from Graphics::Screen, since for standard + * surfaces we don't need dirty rects to be tracked + */ + virtual void addDirtyRect(const Common::Rect &r) {} public: Common::Point _centroid; int _transColor; |