hedgewars/uLandObjects.pas
changeset 6453 11c578d30bd3
parent 6305 5f7480c2a08d
child 6492 71db3c0daa0a
equal deleted inserted replaced
6452:7c6f9b6672dc 6453:11c578d30bd3
   190         repeat
   190         repeat
   191         inc(x2, 2);
   191         inc(x2, 2);
   192         k:= CountNonZeroz(x2, y)
   192         k:= CountNonZeroz(x2, y)
   193         until (x2 >= (rightX-150)) or (k = 0) or (k = 16) or (x2 > i) or (x2 - x1 >= 768);
   193         until (x2 >= (rightX-150)) or (k = 0) or (k = 16) or (x2 > i) or (x2 - x1 >= 768);
   194         if (x2 < (rightX - 150)) and (k = 16) and (x2 - x1 > 250) and (x2 - x1 < 768)
   194         if (x2 < (rightX - 150)) and (k = 16) and (x2 - x1 > 250) and (x2 - x1 < 768)
   195             and not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144) then break;
   195             and (not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144)) then break;
   196         end;
   196         end;
   197 x1:= 0;
   197 x1:= 0;
   198 until y > (LAND_HEIGHT-125);
   198 until y > (LAND_HEIGHT-125);
   199 
   199 
   200 if x1 > 0 then
   200 if x1 > 0 then
   343     r.h:= Height + 16;
   343     r.h:= Height + 16;
   344     repeat
   344     repeat
   345         y:= 8;
   345         y:= 8;
   346         repeat
   346         repeat
   347             if CheckLand(r, x, y - 8, lfBasic)
   347             if CheckLand(r, x, y - 8, lfBasic)
   348             and not CheckIntersect(x, y, Width, Height) then
   348             and (not CheckIntersect(x, y, Width, Height)) then
   349             begin
   349             begin
   350             ar[cnt].x:= x;
   350             ar[cnt].x:= x;
   351             ar[cnt].y:= y;
   351             ar[cnt].y:= y;
   352             inc(cnt);
   352             inc(cnt);
   353             if cnt > MaxPointsIndex then // buffer is full, do not check the rest land
   353             if cnt > MaxPointsIndex then // buffer is full, do not check the rest land