From 1f47766b6046a2d1f06982099a3a113c7ff61617 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 16 Mar 2016 01:18:50 +0200 Subject: SCI32: Implement analyzeUncompressedForRemap() --- engines/sci/graphics/celobj32.cpp | 2 +- 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]; -- cgit v1.2.3