[Scummvm-cvs-logs] scummvm master -> 04f372f004057c0d92d10a0f5f6616b5357a5b0d
bluegr
bluegr at gmail.com
Fri Jan 8 14:56:13 CET 2016
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:
04f372f004 SCI: Fix the logic in applyFade()
Commit: 04f372f004057c0d92d10a0f5f6616b5357a5b0d
https://github.com/scummvm/scummvm/commit/04f372f004057c0d92d10a0f5f6616b5357a5b0d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T15:55:24+02:00
Commit Message:
SCI: Fix the logic in applyFade()
Note that this is still unused, as it is normally called from
kSetShowStyle()
Changed paths:
engines/sci/graphics/palette32.cpp
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 54f52d1..bf5e9b3 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -313,19 +313,16 @@ void GfxPalette32::cycleAllOff() {
}
void GfxPalette32::applyFade() {
- // TODO: Create and update a _nextPalette, not a single _sysPalette, to
- // conform to the way the actual SCI32 engine works (writes to a
- // next-frame-palette and then copies to the current palette on frameout)
- Color *color = _sysPalette.colors;
- uint8 *fadeAmount = _fadeTable;
for (int i = 0; i < 256; ++i) {
- if (*fadeAmount == 100) {
+ if (_fadeTable[i] == 100)
continue;
- }
- color->r = ((int) color->r * ((int) *fadeAmount)) / 100;
- color->g = ((int) color->r * ((int) *fadeAmount)) / 100;
- color->b = ((int) color->r * ((int) *fadeAmount)) / 100;
+ // TODO: Create and update a _nextPalette, not a single _sysPalette, to
+ // conform to the way the actual SCI32 engine works (writes to a
+ // next-frame-palette and then copies to the current palette on frameout)
+ _sysPalette.colors->r *= _fadeTable[i] / 100;
+ _sysPalette.colors->g *= _fadeTable[i] / 100;
+ _sysPalette.colors->b *= _fadeTable[i] / 100;
}
}
More information about the Scummvm-git-logs
mailing list