hedgewars/uLandObjects.pas
changeset 1753 2ccba26f1aa4
parent 1277 752b53481057
child 1773 bc6ad6136675
--- a/hedgewars/uLandObjects.pas	Sun Jan 25 18:07:52 2009 +0000
+++ b/hedgewars/uLandObjects.pas	Sun Jan 25 18:10:23 2009 +0000
@@ -168,17 +168,17 @@
 	inc(x1, 2);
 	if k = 16 then
 		begin
-		while (x2 < 1900) and (CountNonZeroz(x2, y) = 0) do inc(x2, 2);
+		while (x2 < (LAND_WIDTH-150)) and (CountNonZeroz(x2, y) = 0) do inc(x2, 2);
 		i:= x2 + 12;
 		repeat
 		inc(x2, 2);
 		k:= CountNonZeroz(x2, y)
-		until (x2 > 1900) or (k = 0) or (k = 16) or (x2 > i);
-		if (x2 < 1900) and (k = 16) and (x2 - x1 > 250)
+		until (x2 > (LAND_WIDTH-150)) or (k = 0) or (k = 16) or (x2 > i);
+		if (x2 < (LAND_WIDTH-150)) and (k = 16) and (x2 - x1 > 250)
 			and not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144) then break;
 		end;
 x1:= 0;
-until y > 900;
+until y > (LAND_HEIGHT-125);
 
 if x1 > 0 then
 	begin
@@ -273,9 +273,9 @@
                    end
                 end;
              inc(y, 3);
-         until y > 1023 - Height;
+         until y > LAND_HEIGHT - Height;
          inc(x, getrandom(6) + 3)
-     until x > 2047 - Width;
+     until x > LAND_WIDTH - Width;
      Result:= cnt <> 0;
      if Result then
         begin
@@ -422,7 +422,7 @@
    Readln(f, vobFramesCount, vobFrameTicks, vobVelocity, vobFallSpeed);
 
 for i:= 0 to Pred(vobCount) do
-    AddVisualGear( -cScreenWidth + random(cScreenWidth * 2 + 2048), random(1200) - 100, vgtFlake);
+    AddVisualGear( -cScreenWidth + random(cScreenWidth * 2 + LAND_WIDTH), random(LAND_HEIGHT+200) - 100, vgtFlake);
 
 Close(f);
 {$I+}