diff options
author | Paweł Kołodziejski | 2003-06-22 14:30:32 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-06-22 14:30:32 +0000 |
commit | 9d09b77f2134b84bc989b2f2503297a8312d5e83 (patch) | |
tree | e73766676cf236f277a4543008603fa6871aa006 /common | |
parent | 5132ca1b2f454545ff3b3b3bb1b108391d7256c7 (diff) | |
download | scummvm-rg350-9d09b77f2134b84bc989b2f2503297a8312d5e83.tar.gz scummvm-rg350-9d09b77f2134b84bc989b2f2503297a8312d5e83.tar.bz2 scummvm-rg350-9d09b77f2134b84bc989b2f2503297a8312d5e83.zip |
fixed warnings
svn-id: r8613
Diffstat (limited to 'common')
-rw-r--r-- | common/scaler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp index 4bc4ba6aba..fd47ee33a7 100644 --- a/common/scaler.cpp +++ b/common/scaler.cpp @@ -639,9 +639,9 @@ void DotMatrix(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPi static inline uint32 interpolate5(uint16 A, uint16 B, int scale) { - uint16 r = ((A & redMask) * scale + (B & redMask) * (5 - scale)) / 5; - uint16 g = ((A & greenMask) * scale + (B & greenMask) * (5 - scale)) / 5; - uint16 b = ((A & blueMask) * scale + (B & blueMask) * (5 - scale)) / 5; + uint16 r = (uint16)(((A & redMask) * scale + (B & redMask) * (5 - scale)) / 5); + uint16 g = (uint16)(((A & greenMask) * scale + (B & greenMask) * (5 - scale)) / 5); + uint16 b = (uint16)(((A & blueMask) * scale + (B & blueMask) * (5 - scale)) / 5); return (r & redMask) | (g & greenMask) | (b & blueMask); } @@ -650,7 +650,7 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1 #if 1 // Accurate but slightly slower code while (width--) { - *dst++ = interpolate5(*srcA++, *srcB++, scale); + *dst++ = (uint16)interpolate5(*srcA++, *srcB++, scale); } #else // Not fully accurate, but a bit faster |