diff options
author | Paul Gilbert | 2016-05-26 21:48:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-05-26 21:48:40 -0400 |
commit | 4a88f39cc93a776fb63cf48f27856b06f042eceb (patch) | |
tree | 520e93be2a1586964868e05fe72424ac4fec0e6a /engines/sherlock/surface.h | |
parent | 78e52365bd1d8cdd56ddce6ae3d52ae04f9abd4c (diff) | |
download | scummvm-rg350-4a88f39cc93a776fb63cf48f27856b06f042eceb.tar.gz scummvm-rg350-4a88f39cc93a776fb63cf48f27856b06f042eceb.tar.bz2 scummvm-rg350-4a88f39cc93a776fb63cf48f27856b06f042eceb.zip |
SHERLOCK: Refactor Surface and Screen to not use virtual inheritance
Diffstat (limited to 'engines/sherlock/surface.h')
-rw-r--r-- | engines/sherlock/surface.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h index 7f946b467f..7e02d4cddc 100644 --- a/engines/sherlock/surface.h +++ b/engines/sherlock/surface.h @@ -25,7 +25,7 @@ #include "common/rect.h" #include "common/platform.h" -#include "graphics/managed_surface.h" +#include "graphics/screen.h" #include "sherlock/fonts.h" #include "sherlock/image_file.h" @@ -35,21 +35,21 @@ namespace Sherlock { #define TRANSPARENCY 255 /** - * Implements a descendent surface that combines both a managed surface and the font + * Implements a base surface that combines both a managed surface and the font * drawing code. It also introduces a series of drawing method stubs that the 3DO * Serrated Scalpel screen overrides to implement sprite doubling */ -class Surface: virtual public Graphics::ManagedSurface, public Fonts { +class BaseSurface: public Graphics::Screen, public Fonts { public: /** * Constructor */ - Surface(); + BaseSurface(); /** * Constructor */ - Surface(int width, int height); + BaseSurface(int width, int height); /** * Draws a surface on this surface @@ -112,6 +112,18 @@ public: void writeFancyString(const Common::String &str, const Common::Point &pt, uint overrideColor1, uint overrideColor2); }; +class Surface : public BaseSurface { +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: + Surface() : BaseSurface() {} + Surface(int width, int height) : BaseSurface(width, height) {} +}; + } // End of namespace Sherlock #endif |