diff options
author | Filippos Karapetis | 2016-03-16 01:18:50 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-03-16 01:51:08 +0200 |
commit | 1f47766b6046a2d1f06982099a3a113c7ff61617 (patch) | |
tree | 330c4371fe85e615401999fd9e748a6e377d3e56 | |
parent | f94ddfe5a62878052527b86ca98749699e055b1d (diff) | |
download | scummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.tar.gz scummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.tar.bz2 scummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.zip |
SCI32: Implement analyzeUncompressedForRemap()
-rw-r--r-- | engines/sci/graphics/celobj32.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/remap.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp index 2270279710..80ff70f6e2 100644 --- a/engines/sci/graphics/celobj32.cpp +++ b/engines/sci/graphics/celobj32.cpp @@ -822,7 +822,7 @@ bool CelObjView::analyzeUncompressedForRemap() const { byte *pixels = getResPointer() + READ_SCI11ENDIAN_UINT32(getResPointer() + _celHeaderOffset + 24); for (int i = 0; i < _width * _height; ++i) { uint8 pixel = pixels[i]; - if (/* TODO: pixel >= Remap::minRemapColor && pixel <= Remap::maxRemapColor */ false && pixel != _transparentColor) { + if (pixel >= g_sci->_gfxRemap32->getStartColor() && pixel <= g_sci->_gfxRemap32->getEndColor() && pixel != _transparentColor) { return true; } } diff --git a/engines/sci/graphics/remap.h b/engines/sci/graphics/remap.h index b2b37aa815..d2cec5baeb 100644 --- a/engines/sci/graphics/remap.h +++ b/engines/sci/graphics/remap.h @@ -130,7 +130,8 @@ public: void setNoMatchRange(byte from, byte count); bool remapAllTables(bool palChanged); int getRemapCount() const { return _remapCount; } - + int getStartColor() const { return _remapEndColor - REMAP_COLOR_COUNT + 1; } + int getEndColor() const { return _remapEndColor; } private: GfxPalette32 *_palette; RemapParams _remaps[REMAP_COLOR_COUNT]; |