hedgewars/uGearsRender.pas
changeset 7276 e570bc0df33c
parent 7272 71df899c4163
child 7288 5d0704f23a2a
child 7337 c224cd2d32f3
--- a/hedgewars/uGearsRender.pas	Sat Jun 23 23:04:06 2012 -0400
+++ b/hedgewars/uGearsRender.pas	Sun Jun 24 09:12:53 2012 -0400
@@ -990,30 +990,36 @@
                        else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
                        
             gtCase: begin
-                    if Gear^.Timer < 255 then Tint($FF, $FF, $FF, Gear^.Timer);
-                    if ((Gear^.Pos and posCaseAmmo) <> 0) then
-                        begin
-                        i:= (GameTicks shr 6) mod 64;
-                        if i > 18 then
-                            i:= 0;
-                        DrawSprite(sprCase, x - 24, y - 24, i);
-                        end
-                    else if ((Gear^.Pos and posCaseHealth) <> 0) then
+                    if Gear^.Timer > 1000 then
                         begin
-                        i:= ((GameTicks shr 6) + 38) mod 64;
-                        if i > 13 then
-                            i:= 0;
-                        DrawSprite(sprFAid, x - 24, y - 24, i);
-                        end
-                    else if ((Gear^.Pos and posCaseUtility) <> 0) then
+                        if ((Gear^.Pos and posCaseAmmo) <> 0) then
+                            begin
+                            i:= (GameTicks shr 6) mod 64;
+                            if i > 18 then
+                                i:= 0;
+                            DrawSprite(sprCase, x - 24, y - 24, i);
+                            end
+                        else if ((Gear^.Pos and posCaseHealth) <> 0) then
+                            begin
+                            i:= ((GameTicks shr 6) + 38) mod 64;
+                            if i > 13 then
+                                i:= 0;
+                            DrawSprite(sprFAid, x - 24, y - 24, i);
+                            end
+                        else if ((Gear^.Pos and posCaseUtility) <> 0) then
+                            begin
+                            i:= (GameTicks shr 6) mod 70;
+                            if i > 23 then
+                                i:= 0;
+                            i:= i mod 12;
+                            DrawSprite(sprUtility, x - 24, y - 24, i);
+                            end;
+                        end;
+                    if Gear^.Timer <= 1833 then
                         begin
-                        i:= (GameTicks shr 6) mod 70;
-                        if i > 23 then
-                            i:= 0;
-                        i:= i mod 12;
-                        DrawSprite(sprUtility, x - 24, y - 24, i);
-                        end;
-                    if Gear^.Timer < 255 then Tint($FF, $FF, $FF, $FF);
+                        DrawTextureRotatedF(SpritesData[sprPortal].texture, min(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0,
+                                            Gear^.Angle+WorldDx, Gear^.Power+WorldDy-16, 4+Gear^.Tag, 1, 32, 32, 270);
+                        end
                     end;
       gtExplosives: begin
                     if ((Gear^.State and gstDrowning) <> 0) then