aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/palette.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scumm/palette.cpp b/scumm/palette.cpp
index 6658acd97c..75a4a3477b 100644
--- a/scumm/palette.cpp
+++ b/scumm/palette.cpp
@@ -588,15 +588,17 @@ void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int
if (startColor <= endColor) {
const byte *cptr;
+ const byte *palptr;
int color, idx, j;
+ palptr = getPalettePtr(_curPalIndex);
for (j = startColor; j <= endColor; j++) {
// FIXME: Hack to fix Amiga palette adjustments
if ((_features & GF_AMIGA && _version == 5) && (j >= 16 && j < 81))
continue;
idx = (_heversion == 70) ? _HEV7ActorPalette[j] : j;
- cptr = getPalettePtr(_curPalIndex) + idx * 3;
+ cptr = palptr + idx * 3;
if (_heversion == 70)
setDirtyColors(idx, idx);