diff options
author | Matthew Hoops | 2015-04-11 16:11:21 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-04-11 16:12:47 -0400 |
commit | ddf170de4a33fac4cac3093bf6dd97d253216092 (patch) | |
tree | 1c2eb38f62d669b386f46bf660cc9d6ab2671c5e /engines/zvision/graphics/effects | |
parent | 75acef75661cc4554ad0bf114d62bf553afae7ab (diff) | |
download | scummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.tar.gz scummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.tar.bz2 scummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.zip |
ZVISION: Silence gcc warnings
Diffstat (limited to 'engines/zvision/graphics/effects')
-rw-r--r-- | engines/zvision/graphics/effects/fog.cpp | 6 | ||||
-rw-r--r-- | engines/zvision/graphics/effects/wave.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/zvision/graphics/effects/fog.cpp b/engines/zvision/graphics/effects/fog.cpp index 32a01915d3..7b65f60f24 100644 --- a/engines/zvision/graphics/effects/fog.cpp +++ b/engines/zvision/graphics/effects/fog.cpp @@ -142,9 +142,9 @@ void FogFx::update() { for (uint8 i = 0; i < 31; i++) { float perc = (float)i / 31.0; - uint8 cr = (float)_r * perc; - uint8 cg = (float)_g * perc; - uint8 cb = (float)_b * perc; + uint8 cr = (uint8)((float)_r * perc); + uint8 cg = (uint8)((float)_g * perc); + uint8 cb = (uint8)((float)_b * perc); _colorMap[i] = _engine->_resourcePixelFormat.RGBToColor(cr << 3, cg << 3, cb << 3); } } diff --git a/engines/zvision/graphics/effects/wave.cpp b/engines/zvision/graphics/effects/wave.cpp index cec631611b..d2887b3112 100644 --- a/engines/zvision/graphics/effects/wave.cpp +++ b/engines/zvision/graphics/effects/wave.cpp @@ -54,7 +54,7 @@ WaveFx::WaveFx(ZVision *engine, uint32 key, Common::Rect region, bool ported, in int16 dx = (x - quarterWidth); int16 dy = (y - quarterHeight); - _ampls[i][x + y * _halfWidth] = ampl * sin(sqrt(dx * dx / (float)centerX + dy * dy / (float)centerY) / (-waveln * 3.1415926) + phase); + _ampls[i][x + y * _halfWidth] = (int8)(ampl * sin(sqrt(dx * dx / (float)centerX + dy * dy / (float)centerY) / (-waveln * 3.1415926) + phase)); } phase += spd; } |