hedgewars/uLandGraphics.pas
changeset 5179 8d64dcb566ea
parent 5041 3dc6ad20cbfe
child 5261 2db030882bc9
--- a/hedgewars/uLandGraphics.pas	Tue Apr 26 13:13:07 2011 +0200
+++ b/hedgewars/uLandGraphics.pas	Wed Apr 27 15:57:23 2011 +0400
@@ -61,9 +61,9 @@
 
     // Mix colors
     nAlpha := min(255, oAlpha + nAlpha);
-    nRed   := ((oRed * oAlpha) + (nRed * (255-oAlpha))) div 255;
-    nGreen := ((oGreen * oAlpha) + (nGreen * (255-oAlpha))) div 255;
-    nBlue  := ((oBlue * oAlpha) + (nBlue * (255-oAlpha))) div 255;
+    nRed   := ((oRed * oAlpha) + (nRed * Byte(255-oAlpha))) div 255;
+    nGreen := ((oGreen * oAlpha) + (nGreen * Byte(255-oAlpha))) div 255;
+    nBlue  := ((oBlue * oAlpha) + (nBlue * Byte(255-oAlpha))) div 255;
 
     addBgColor := (nAlpha shl AShift) or (nRed shl RShift) or (nGreen shl GShift) or (nBlue shl BShift);
 end;