# HG changeset patch
# User unc0rr
# Date 1313340832 -14400
# Node ID a937d43a032fad0491c44e301563f510827bbf0d
# Parent  49cfd05ccb83f2259a7bde0c181c1d6e9da57372
Use local scope global var instead

diff -r 49cfd05ccb83 -r a937d43a032f hedgewars/uRender.pas
--- 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);