[Scummvm-cvs-logs] scummvm master -> 145b0d83df1cbf6caecb61b5641bdf732fcf80e0
fuzzie
fuzzie at fuzzie.org
Wed Feb 16 15:58:31 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
145b0d83df PARALLACTION: Use signed math in fadeTo.
Commit: 145b0d83df1cbf6caecb61b5641bdf732fcf80e0
https://github.com/scummvm/scummvm/commit/145b0d83df1cbf6caecb61b5641bdf732fcf80e0
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-02-16T07:00:44-08:00
Commit Message:
PARALLACTION: Use signed math in fadeTo.
This fixes corruption during fades when low palette values end up negative.
Changed paths:
engines/parallaction/graphics.cpp
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 259ad84..79993a2 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;
More information about the Scummvm-git-logs
mailing list