aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2016-03-16 01:18:50 +0200
committerFilippos Karapetis2016-03-16 01:51:08 +0200
commit1f47766b6046a2d1f06982099a3a113c7ff61617 (patch)
tree330c4371fe85e615401999fd9e748a6e377d3e56 /engines
parentf94ddfe5a62878052527b86ca98749699e055b1d (diff)
downloadscummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.tar.gz
scummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.tar.bz2
scummvm-rg350-1f47766b6046a2d1f06982099a3a113c7ff61617.zip
SCI32: Implement analyzeUncompressedForRemap()
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/celobj32.cpp2
-rw-r--r--engines/sci/graphics/remap.h3
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];