summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-02-11 21:17:43 +0000
committerfrosch <frosch@openttd.org>2014-02-11 21:17:43 +0000
commitcb7544ea39bd02e472a7f005993badbcc6dc5475 (patch)
tree855645bd31499bb653a1e9b2a46e549796cfdf53
parent858e80f3dd49f89dc022b93083f8db3ccdc5217d (diff)
downloadopenttd-cb7544ea39bd02e472a7f005993badbcc6dc5475.tar.xz
(svn r26334) -Fix: 32bit compilation.
-rw-r--r--src/blitter/32bpp_sse_func.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blitter/32bpp_sse_func.hpp b/src/blitter/32bpp_sse_func.hpp
index 7cec94c77..f0469d66e 100644
--- a/src/blitter/32bpp_sse_func.hpp
+++ b/src/blitter/32bpp_sse_func.hpp
@@ -107,10 +107,10 @@ static Colour ReallyAdjustBrightness(Colour colour, uint8 brightness)
c16 *= brightness;
uint64 c16_ob = c16; // Helps out of order execution.
c16 /= Blitter_32bppBase::DEFAULT_BRIGHTNESS;
- c16 &= 0x01FF01FF01FF;
+ c16 &= 0x01FF01FF01FFULL;
/* Sum overbright (maximum for each rgb is 508, 9 bits, -255 is changed in -256 so we just have to take the 8 lower bits into account). */
- c16_ob = (((c16_ob >> (8 + 7)) & 0x0100010001) * 0xFF) & c16;
+ c16_ob = (((c16_ob >> (8 + 7)) & 0x0100010001ULL) * 0xFF) & c16;
const uint ob = ((uint16) c16_ob + (uint16) (c16_ob >> 16) + (uint16) (c16_ob >> 32)) / 2;
const uint32 alpha32 = colour.data & 0xFF000000;