[Scummvm-cvs-logs] scummvm master -> 9c510c1b52786de51c232bfcd8ec8bc2e501cf58
bluegr
bluegr at gmail.com
Mon Nov 26 10:28:11 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:
9c510c1b52 SCI: Fix warnings
Commit: 9c510c1b52786de51c232bfcd8ec8bc2e501cf58
https://github.com/scummvm/scummvm/commit/9c510c1b52786de51c232bfcd8ec8bc2e501cf58
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2012-11-26T01:27:02-08:00
Commit Message:
SCI: Fix warnings
Changed paths:
engines/sci/graphics/palette.cpp
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 53d69cd..cf15fa6 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 = _sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100;
- byte gComponent = _sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100;
- byte bComponent = _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