diff options
author | Filippos Karapetis | 2012-07-24 22:54:37 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-24 22:54:37 +0300 |
commit | fe3fb1873c60e7ed21c573e09030bd6d0a5018cb (patch) | |
tree | 4fe733a2bbdfbeec4490b1a72a11c9dd3b79682b /engines/sci/graphics | |
parent | 6f351302040be620aa039a7c605f3c23463b27db (diff) | |
download | scummvm-rg350-fe3fb1873c60e7ed21c573e09030bd6d0a5018cb.tar.gz scummvm-rg350-fe3fb1873c60e7ed21c573e09030bd6d0a5018cb.tar.bz2 scummvm-rg350-fe3fb1873c60e7ed21c573e09030bd6d0a5018cb.zip |
SCI: Cleanup of the palette remapping code
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/palette.cpp | 5 | ||||
-rw-r--r-- | engines/sci/graphics/palette.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index b5154ef860..5a551bab2c 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -337,6 +337,7 @@ bool GfxPalette::isRemapMask(byte color) { } void GfxPalette::resetRemapping() { + _remapOn = false; _remappingMaskFrom = 0; _remappingMaskTo = 0; _remappingPercentToSet = 0; @@ -347,6 +348,8 @@ void GfxPalette::resetRemapping() { } void GfxPalette::setRemappingPercent(byte color, byte percent) { + _remapOn = true; + // We need to defer the setup of the remapping table until something is // shown on screen, otherwise kernelFindColor() won't find correct // colors. The actual setup of the remapping table will be performed in @@ -360,6 +363,8 @@ void GfxPalette::setRemappingPercent(byte color, byte percent) { } void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { + _remapOn = true; + for (int i = from; i <= to; i++) { _remappingTable[i] = i + base; } diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 372f3c7090..134ade5e36 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -53,7 +53,6 @@ public: void getSys(Palette *pal); uint16 getTotalColorCount() const { return _totalScreenColors; } - void toggleRemapping(bool remap) { _remapOn = remap; } void resetRemapping(); void setRemappingPercent(byte color, byte percent); void setRemappingRange(byte color, byte from, byte to, byte base); |