aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2016-03-11 05:21:43 +0200
committerFilippos Karapetis2016-03-11 05:21:43 +0200
commit5ca8b5ff4c55b7cac931b0973f604148711e3580 (patch)
tree2c40b9e47c9ad6b72653501667366bc318e782e8
parent3a770fa0d8f3fc86a5967f321f17991e2879e3f5 (diff)
downloadscummvm-rg350-5ca8b5ff4c55b7cac931b0973f604148711e3580.tar.gz
scummvm-rg350-5ca8b5ff4c55b7cac931b0973f604148711e3580.tar.bz2
scummvm-rg350-5ca8b5ff4c55b7cac931b0973f604148711e3580.zip
SCI32: Fix bug in updateRemap()
-rw-r--r--engines/sci/graphics/remap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/remap.cpp b/engines/sci/graphics/remap.cpp
index b92977f971..762ff472d7 100644
--- a/engines/sci/graphics/remap.cpp
+++ b/engines/sci/graphics/remap.cpp
@@ -170,7 +170,8 @@ void GfxRemap32::initColorArrays(byte index) {
bool GfxRemap32::updateRemap(byte index) {
int result;
RemapParams *curRemap = &_remaps[index];
- Palette *curPalette = &g_sci->_gfxPalette32->_sysPalette;
+ const Palette *curPalette = &g_sci->_gfxPalette32->_sysPalette;
+ const Palette *nextPalette = g_sci->_gfxPalette32->getNextPalette();
bool changed = false;
memset(_targetChanged, false, 236);
@@ -195,7 +196,8 @@ bool GfxRemap32::updateRemap(byte index) {
return changed;
case kRemappingByPercent:
for (int i = 1; i < 236; i++) {
- Color color = curPalette->colors[i];
+ // NOTE: This method uses nextPalette instead of curPalette
+ Color color = nextPalette->colors[i];
if (curRemap->curColor[i] != color) {
curRemap->colorChanged[i] = true;