aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/graphics.h
diff options
context:
space:
mode:
authorBastien Bouclet2016-06-26 07:20:21 +0200
committerBastien Bouclet2016-06-26 08:37:07 +0200
commit3391c726cf2cdb6a5523765eefdeb124291f5608 (patch)
tree8cba4e240af10ac34d038859614af69a9ed71281 /engines/mohawk/graphics.h
parentcedcdbc48d391537e4bd867d60665f72b1528a67 (diff)
downloadscummvm-rg350-3391c726cf2cdb6a5523765eefdeb124291f5608.tar.gz
scummvm-rg350-3391c726cf2cdb6a5523765eefdeb124291f5608.tar.bz2
scummvm-rg350-3391c726cf2cdb6a5523765eefdeb124291f5608.zip
MOHAWK: Remap bitmaps not to use undefined colors
The Spanish version of Myst has bitmaps that use palette indices in the system reserved range. Affected pixels previously used colors from the Windows system palette instead of the bitmap's own palette, resulting in visual glitches. Bitmaps are now remapped to the screen palette which is made of the Windows reserved palette and part of the bitmap palette. The original engine used GDI's StretchDIBits with DIB_RGB_COLORS to achieve the same result. Fixes #7153.
Diffstat (limited to 'engines/mohawk/graphics.h')
-rw-r--r--engines/mohawk/graphics.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index 5f9b523e9a..f9fdeea15f 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -74,6 +74,10 @@ public:
// Free all surfaces in the cache
void clearCache();
+ // findImage will search the cache to find the image.
+ // If not found, it will call decodeImage to get a new one.
+ MohawkSurface *findImage(uint16 id);
+
void preloadImage(uint16 image);
virtual void setPalette(uint16 id);
void copyAnimImageToScreen(uint16 image, int left = 0, int top = 0);
@@ -85,10 +89,6 @@ public:
protected:
void copyAnimImageSectionToScreen(MohawkSurface *image, Common::Rect src, Common::Rect dest);
- // findImage will search the cache to find the image.
- // If not found, it will call decodeImage to get a new one.
- MohawkSurface *findImage(uint16 id);
-
// decodeImage will always return a new image.
virtual MohawkSurface *decodeImage(uint16 id) = 0;
virtual Common::Array<MohawkSurface *> decodeImages(uint16 id);