hedgewars/uLandObjects.pas
changeset 3976 abaf741a4e21
parent 3936 0b982d340633
child 4159 64e677349124
--- a/hedgewars/uLandObjects.pas	Thu Oct 14 16:01:43 2010 +0200
+++ b/hedgewars/uLandObjects.pas	Thu Oct 14 22:01:33 2010 +0200
@@ -292,9 +292,9 @@
                    end
                 end;
              inc(y, 3);
-         until y > LAND_HEIGHT - 1 - Height;
+         until y > int64(LAND_HEIGHT) - 1 - Height;
          inc(x, getrandom(6) + 3)
-     until x > LAND_WIDTH - 1 - Width;
+     until x > int64(LAND_WIDTH) - 1 - Width;
      bRes:= cnt <> 0;
      if bRes then
         begin
@@ -341,9 +341,9 @@
                 end
             end;
             inc(y, 12);
-        until y > LAND_HEIGHT - 1 - Height - 8;
+        until y > int64(LAND_HEIGHT) - 1 - Height - 8;
         inc(x, getrandom(12) + 12)
-    until x > LAND_WIDTH - 1 - Width;
+    until x > int64(LAND_WIDTH) - 1 - Width;
     bRes:= cnt <> 0;
     if bRes then
         begin
@@ -455,7 +455,7 @@
     Readln(f, vobFramesCount, vobFrameTicks, vobVelocity, vobFallSpeed);
 
 // adjust amount of flakes scaled by screen space
-vobCount:= vobCount * cScreenSpace div LAND_WIDTH;
+vobCount:= longint(vobCount) * cScreenSpace div LAND_WIDTH;
 
 if (cReducedQuality and rqKillFlakes) <> 0 then
     vobCount:= 0;