hedgewars/uGearsRender.pas
changeset 10562 3388822b3914
parent 10560 9f09196d92a6
child 10682 1be106f8095a
--- a/hedgewars/uGearsRender.pas	Sat Nov 29 01:19:29 2014 +0100
+++ b/hedgewars/uGearsRender.pas	Sat Nov 29 03:13:06 2014 +0100
@@ -166,8 +166,7 @@
 end;
 
 procedure DrawRope(Gear: PGear);
-var roplen: LongInt;
-    i: Longword;
+var roplen, i: LongInt;
 begin
     if (cReducedQuality and rqSimpleRope) <> 0 then
         DrawRopeLinesRQ(Gear)
@@ -711,7 +710,7 @@
                                             LongInt(rightX)+WorldDx,
                                             cWaterLine+WorldDy,
                                             LongInt(leftX)+WorldDx);
-                        if hwRound(Gear^.X) > rightX-256 then
+                        if hwRound(Gear^.X) > LongInt(rightX) - 256 then
                             DrawSpriteClipped(sprGirder,
                                             leftX-(rightX-ox)-256,
                                             oy-256,
@@ -1167,7 +1166,7 @@
                         end;
                     if Gear^.Timer < 1833 then
                         begin
-                        DrawTextureRotatedF(SpritesData[sprPortal].texture, min(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0,
+                        DrawTextureRotatedF(SpritesData[sprPortal].texture, MinD(abs(1.25 - (Gear^.Timer mod 1333) / 400), 1.25), 0, 0,
                                             x, LongInt(Gear^.Angle) + WorldDy - 16, 4 + Gear^.Tag, 1, 32, 32, 270);
                         end
                     end;