diff options
author | Paul Gilbert | 2016-10-01 18:26:09 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-10-01 18:26:09 -0400 |
commit | 459e3f54c98953be38ef61d5ae53ffd00c3c88da (patch) | |
tree | 0ca98d6a899e3a89b1185a4276ab81b5003c1592 /engines/titanic/support/video_surface.h | |
parent | 8befee0dc3c663d61a7af1f6e56634ebf5721d72 (diff) | |
download | scummvm-rg350-459e3f54c98953be38ef61d5ae53ffd00c3c88da.tar.gz scummvm-rg350-459e3f54c98953be38ef61d5ae53ffd00c3c88da.tar.bz2 scummvm-rg350-459e3f54c98953be38ef61d5ae53ffd00c3c88da.zip |
TITANIC: Change copyPixel to not be a virtual method
Diffstat (limited to 'engines/titanic/support/video_surface.h')
-rw-r--r-- | engines/titanic/support/video_surface.h | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/engines/titanic/support/video_surface.h b/engines/titanic/support/video_surface.h index 89d8a03f97..37ff7917dc 100644 --- a/engines/titanic/support/video_surface.h +++ b/engines/titanic/support/video_surface.h @@ -45,6 +45,22 @@ class CVideoSurface : public ListItem { friend class CJPEGDecode; friend class CTargaDecode; private: + static byte _palette1[32][32]; + static byte _palette2[32][32]; + + /** + * Setup the shading palettes + */ + static void setupPalette(byte palette[32][32], byte val); +public: + /** + * Setup statics + */ + static void setup() { + setupPalette(_palette1, 0xff); + setupPalette(_palette2, 0xe0); + } +private: /** * Calculates blitting bounds */ @@ -182,11 +198,6 @@ public: virtual void setPixel(const Point &pt, uint pixel) = 0; /** - * Copies a pixel, handling transparency - */ - virtual void copyPixel(uint16 *destP, const uint16 *srcP, byte transVal, bool is16Bit, bool isAlpha) = 0; - - /** * Shifts the colors of the surface.. maybe greys it out? */ virtual void shiftColors() = 0; @@ -318,26 +329,15 @@ public: * Returns the transparent color */ uint getTransparencyColor(); + + /** + * Copies a pixel, handling transparency + */ + void copyPixel(uint16 *destP, const uint16 *srcP, byte transVal, bool is16Bit, bool isAlpha); }; class OSVideoSurface : public CVideoSurface { friend class OSMovie; -private: - static byte _palette1[32][32]; - static byte _palette2[32][32]; - - /** - * Setup the shading palettes - */ - static void setupPalette(byte palette[32][32], byte val); -public: - /** - * Setup statics - */ - static void setup() { - setupPalette(_palette1, 0xff); - setupPalette(_palette2, 0xe0); - } public: OSVideoSurface(CScreenManager *screenManager, DirectDrawSurface *surface); OSVideoSurface(CScreenManager *screenManager, const CResourceKey &key, bool flag = false); @@ -435,11 +435,6 @@ public: virtual void setPixel(const Point &pt, uint pixel); /** - * Copies a pixel, handling transparency - */ - virtual void copyPixel(uint16 *destP, const uint16 *srcP, byte transVal, bool is16Bit, bool isAlpha); - - /** * Shifts the colors of the surface.. maybe greys it out? */ virtual void shiftColors(); |