--- a/hedgewars/uRender.pas Sat Aug 13 22:46:47 2011 +0200
+++ b/hedgewars/uRender.pas Sun Aug 14 20:53:52 2011 +0400
@@ -50,8 +50,6 @@
implementation
uses uVariables;
-var
- lastTint: Longword;
procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt);
begin
@@ -453,11 +451,16 @@
procedure Tint(r, g, b, a: Byte); inline;
-var nc, tw: Longword;
+const
+ lastTint: Longword = 0;
+var
+ nc, tw: Longword;
begin
nc:= (a shl 24) or (b shl 16) or (g shl 8) or r;
+
if nc = lastTint then
exit;
+
if cGrayScale then
begin
tw:= round(r * RGB_LUMINANCE_RED + g * RGB_LUMINANCE_GREEN + b * RGB_LUMINANCE_BLUE);