From 52541fc2579ae58823f31e1eadb2a860f87148de Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 12 Jul 2013 21:16:50 +0200 Subject: [PATCH] TUCKER: Fix palette fades This is a regression from 362b0cd5e4a71a0b2610ff8abb6aeecddc842cf0 and fixes bug #3614686. --- engines/tucker/tucker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 2bd7c47b629..6b538a6fdee 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -941,7 +941,7 @@ void TuckerEngine::fadeOutPalette(int colorsCount) { _system->getPaletteManager()->grabPalette(pal, 0, colorsCount); for (int color = 0; color < colorsCount; ++color) { for (int i = 0; i < 3; ++i) { - const int c = int(pal[color * 3 + i]) + kFadePaletteStep * 3; + const int c = int(pal[color * 3 + i]) + kFadePaletteStep * 4; pal[color * 3 + i] = MIN(c, _currentPalette[color * 3 + i]); } } @@ -954,7 +954,7 @@ void TuckerEngine::fadeInPalette(int colorsCount) { _system->getPaletteManager()->grabPalette(pal, 0, colorsCount); for (int color = 0; color < colorsCount; ++color) { for (int i = 0; i < 3; ++i) { - const int c = int(pal[color * 3 + i]) - kFadePaletteStep * 3; + const int c = int(pal[color * 3 + i]) - kFadePaletteStep * 4; pal[color * 3 + i] = MAX(c, 0); } }