[Scummvm-cvs-logs] scummvm master -> 77a9f0145482ed5ce95cff5d499cc9c509e86dbc
digitall
dgturner at iee.org
Mon Nov 26 22:10:24 CET 2012
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:
77a9f01454 SCI: Amended fix for palette related compiler warnings.
Commit: 77a9f0145482ed5ce95cff5d499cc9c509e86dbc
https://github.com/scummvm/scummvm/commit/77a9f0145482ed5ce95cff5d499cc9c509e86dbc
Author: D G Turner (digitall at scummvm.org)
Date: 2012-11-26T13:08:39-08:00
Commit Message:
SCI: Amended fix for palette related compiler warnings.
Changed paths:
engines/sci/graphics/palette.cpp
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index cf15fa6..52d4464 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -386,9 +386,9 @@ void GfxPalette::setRemappingPercentGray(byte color, byte percent) {
// Note: This is not what the original does, but the results are the same visually
for (int i = 0; i < 256; i++) {
- byte rComponent = (byte)_sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100;
- byte gComponent = (byte)_sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100;
- byte bComponent = (byte)_sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100;
+ byte rComponent = (byte)(_sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100);
+ byte gComponent = (byte)(_sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100);
+ byte bComponent = (byte)(_sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100);
byte luminosity = rComponent + gComponent + bComponent;
_remappingByPercent[i] = kernelFindColor(luminosity, luminosity, luminosity);
}
More information about the Scummvm-git-logs
mailing list