Fix some warnings
authorunc0rr
Sun, 07 Nov 2010 16:21:20 +0300
changeset 4157 f8898d6cca6e
parent 4156 bb1a82bbe9e3
child 4158 08f4627ad2b3
Fix some warnings
hedgewars/uAIAmmoTests.pas
hedgewars/uMisc.pas
--- a/hedgewars/uAIAmmoTests.pas	Sat Nov 06 22:27:22 2010 -0400
+++ b/hedgewars/uAIAmmoTests.pas	Sun Nov 07 16:21:20 2010 +0300
@@ -498,7 +498,12 @@
                    else dec(valueResult, Level * 4000);
      exit(valueResult)
      end
-until (Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 4) or (x.isNegative) or (y.isNegative) or (x.Round > LAND_WIDTH) or (y.Round > LAND_HEIGHT);
+until (Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 4)
+    or (x.isNegative)
+    or (y.isNegative)
+    or (x.Round > LongWord(LAND_WIDTH))
+    or (y.Round > LongWord(LAND_HEIGHT));
+
 TestShotgun:= BadTurn
 end;
 
@@ -526,7 +531,12 @@
   y:= y + vY;
   if ((hwRound(x) and LAND_WIDTH_MASK) = 0)and((hwRound(y) and LAND_HEIGHT_MASK) = 0)
      and (Land[hwRound(y), hwRound(x)] <> 0) then inc(d);
-until (Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 4) or (x.isNegative) or (y.isNegative) or (x.Round > LAND_WIDTH) or (y.Round > LAND_HEIGHT) or (d > 200);
+until (Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 4)
+    or (x.isNegative)
+    or (y.isNegative)
+    or (x.Round > LongWord(LAND_WIDTH))
+    or (y.Round > LongWord(LAND_HEIGHT))
+    or (d > 200);
 
 if Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 3 then valueResult:= max(0, (4 - d div 50) * 7 * 1024)
                                                            else valueResult:= BadTurn;
--- a/hedgewars/uMisc.pas	Sat Nov 06 22:27:22 2010 -0400
+++ b/hedgewars/uMisc.pas	Sun Nov 07 16:21:20 2010 +0300
@@ -38,7 +38,7 @@
     PathPrefix      : shortstring = './';
     cShowFPS        : boolean     = false;
     cAltDamage      : boolean     = true;
-    cReducedQuality : LongInt     = rqNone;
+    cReducedQuality : LongWord    = rqNone;
     //userNick is in uChat
     recordFileName  : shortstring = '';
     cReadyDelay     : Longword    = 0;