aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-02 17:33:13 +0200
committerJohannes Schickel2013-08-02 17:33:13 +0200
commit9a787fa5861061580711073d5e2403d54887a421 (patch)
treee8c3a7d9a194b5e6f8f5ef74aa65e8f0e59fa6f5 /graphics
parent5a7bba35ed5c4402d064d3cb95fef622a12b3001 (diff)
downloadscummvm-rg350-9a787fa5861061580711073d5e2403d54887a421.tar.gz
scummvm-rg350-9a787fa5861061580711073d5e2403d54887a421.tar.bz2
scummvm-rg350-9a787fa5861061580711073d5e2403d54887a421.zip
GRAPHICS: Silence conversion warnings by using an explicit cast.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/scaler/thumbnail_intern.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index 2756e4026a..d51eff59e8 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -145,9 +145,9 @@ static void scaleThumbnail(Graphics::Surface &in, Graphics::Surface &out) {
const float xDiff = xFrac - x1;
const float yDiff = yFrac - y1;
- uint8 pR = ((1 - yDiff) * ((1 - xDiff) * p1R + xDiff * p2R) + yDiff * ((1 - xDiff) * p3R + xDiff * p4R));
- uint8 pG = ((1 - yDiff) * ((1 - xDiff) * p1G + xDiff * p2G) + yDiff * ((1 - xDiff) * p3G + xDiff * p4G));
- uint8 pB = ((1 - yDiff) * ((1 - xDiff) * p1B + xDiff * p2B) + yDiff * ((1 - xDiff) * p3B + xDiff * p4B));
+ uint8 pR = (uint8)((1 - yDiff) * ((1 - xDiff) * p1R + xDiff * p2R) + yDiff * ((1 - xDiff) * p3R + xDiff * p4R));
+ uint8 pG = (uint8)((1 - yDiff) * ((1 - xDiff) * p1G + xDiff * p2G) + yDiff * ((1 - xDiff) * p3G + xDiff * p4G));
+ uint8 pB = (uint8)((1 - yDiff) * ((1 - xDiff) * p1B + xDiff * p2B) + yDiff * ((1 - xDiff) * p3B + xDiff * p4B));
WRITE_UINT16(dst, Graphics::RGBToColor<Graphics::ColorMasks<565> >(pR, pG, pB));