mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
TUCKER: Fix palette fades
This is a regression from 362b0cd5e4
and fixes bug #3614686.
This commit is contained in:
parent
1f6894ab25
commit
52541fc257
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user