diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/palette.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index 1d3072f14b..e718059b67 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -377,7 +377,7 @@ void Fader::fadeToGrey(byte palette[PALETTE_SIZE], byte *paletteMap, intensity = _colorValues[colorCtr]; } - int diff = intensity - palette[palCtr * 3 + colorCtr]; + int diff = intensity - VGA_COLOR_REV(palette[palCtr * 3 + colorCtr]); palIndex[palCtr][colorCtr] = (byte)ABS(diff); signs[palCtr][colorCtr] = (diff == 0) ? 0 : (diff < 0 ? -1 : 1); } @@ -390,7 +390,10 @@ void Fader::fadeToGrey(byte palette[PALETTE_SIZE], byte *paletteMap, map[index]._accum[colorCtr] += palIndex[palCtr][colorCtr]; while (map[index]._accum[colorCtr] >= steps) { map[index]._accum[colorCtr] -= steps; - palette[palCtr * 3 + colorCtr] = signs[palCtr][colorCtr]; + + byte rgb63 = VGA_COLOR_REV(palette[palCtr * 3 + colorCtr]) + + signs[palCtr][colorCtr]; + palette[palCtr * 3 + colorCtr] = VGA_COLOR_TRANS(rgb63); } } } |