diff options
author | Paul Gilbert | 2017-01-15 09:32:55 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-01-15 09:32:55 -0500 |
commit | 553f1c2ef4f0965b4035f2af725f45d308888adf (patch) | |
tree | 0b526a19dcfef7d8eb9f3b271ea7339d2680c990 /graphics | |
parent | 9d6af45877da86a55d9398f8233213f4d48191fe (diff) | |
download | scummvm-rg350-553f1c2ef4f0965b4035f2af725f45d308888adf.tar.gz scummvm-rg350-553f1c2ef4f0965b4035f2af725f45d308888adf.tar.bz2 scummvm-rg350-553f1c2ef4f0965b4035f2af725f45d308888adf.zip |
GRAPHICS: Fix compiler warnings of double to byte casts
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/managed_surface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp index e781d7a27a..00dc511904 100644 --- a/graphics/managed_surface.cpp +++ b/graphics/managed_surface.cpp @@ -208,9 +208,9 @@ void ManagedSurface::blitFrom(const Surface &src, const Common::Rect &srcRect, } else { // Partially transparent, so calculate new pixel colors alpha = (double)aSrc / 255.0; - rDest = (rSrc * alpha) + (rDest * (1.0 - alpha)); - gDest = (gSrc * alpha) + (gDest * (1.0 - alpha)); - bDest = (bSrc * alpha) + (bDest * (1.0 - alpha)); + rDest = static_cast<byte>((rSrc * alpha) + (rDest * (1.0 - alpha))); + gDest = static_cast<byte>((gSrc * alpha) + (gDest * (1.0 - alpha))); + bDest = static_cast<byte>((bSrc * alpha) + (bDest * (1.0 - alpha))); } destPixel = format.ARGBToColor(0xff, rDest, gDest, bDest); |