aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2012-11-26 11:27:02 +0200
committerFilippos Karapetis2012-11-26 11:27:02 +0200
commit9c510c1b52786de51c232bfcd8ec8bc2e501cf58 (patch)
tree2083dc0ae53288b3333f86abab6898c5ece98d23 /engines/sci/graphics
parent23cc4e89f3acbf489a38f0d81421f6af1dcbf08a (diff)
downloadscummvm-rg350-9c510c1b52786de51c232bfcd8ec8bc2e501cf58.tar.gz
scummvm-rg350-9c510c1b52786de51c232bfcd8ec8bc2e501cf58.tar.bz2
scummvm-rg350-9c510c1b52786de51c232bfcd8ec8bc2e501cf58.zip
SCI: Fix warnings
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/palette.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 53d69cdcca..cf15fa6fe3 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);
}