TUCKER: Fix palette fades

This is a regression from 362b0cd5e4
and fixes bug #3614686.
This commit is contained in:
Willem Jan Palenstijn 2013-07-12 21:16:50 +02:00
parent 1f6894ab25
commit 52541fc257

View File

@ -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<int>(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<int>(c, 0);
}
}