diff options
author | Alyssa Milburn | 2011-02-16 16:00:42 +0100 |
---|---|---|
committer | Alyssa Milburn | 2011-02-16 16:00:44 +0100 |
commit | 145b0d83df1cbf6caecb61b5641bdf732fcf80e0 (patch) | |
tree | 6a2a5955099479297b4e8940801f4e6b034015d5 /engines | |
parent | 68e468ee01b243e31b154a7fab42396c9b24e5f0 (diff) | |
download | scummvm-rg350-145b0d83df1cbf6caecb61b5641bdf732fcf80e0.tar.gz scummvm-rg350-145b0d83df1cbf6caecb61b5641bdf732fcf80e0.tar.bz2 scummvm-rg350-145b0d83df1cbf6caecb61b5641bdf732fcf80e0.zip |
PARALLACTION: Use signed math in fadeTo.
This fixes corruption during fades when low palette values end up negative.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 259ad84f69..79993a297a 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -152,9 +152,9 @@ void Palette::fadeTo(const Palette& target, uint step) { if (_data[i] == target._data[i]) continue; if (_data[i] < target._data[i]) - _data[i] = CLIP(_data[i] + step, (uint)0, (uint)target._data[i]); + _data[i] = CLIP(_data[i] + (int)step, (int)0, (int)target._data[i]); else - _data[i] = CLIP(_data[i] - step, (uint)target._data[i], (uint)255); + _data[i] = CLIP(_data[i] - (int)step, (int)target._data[i], (int)255); } return; |