hedgewars/uLandObjects.pas
changeset 1156 3b51492e77f9
parent 1131 c5b8f2bfa487
child 1180 e56317fdf78d
equal deleted inserted replaced
1155:ffd0a34171f1 1156:3b51492e77f9
   169   x1:= gX;
   169   x1:= gX;
   170   x2:= gX;
   170   x2:= gX;
   171   while (x1 > 100) and (CountNonZeroz(x1, y) = 0) do dec(x1, 2);
   171   while (x1 > 100) and (CountNonZeroz(x1, y) = 0) do dec(x1, 2);
   172   i:= x1 - 12;
   172   i:= x1 - 12;
   173   repeat
   173   repeat
   174     k:= CountNonZeroz(x1, y);
   174     dec(x1, 2);
   175     dec(x1, 2)
   175     k:= CountNonZeroz(x1, y)
   176   until (x1 < 100) or (k = 0) or (k = 16) or (x1 < i);
   176   until (x1 < 100) or (k = 0) or (k = 16) or (x1 < i);
   177   inc(x1, 2);
   177   inc(x1, 2);
   178   if k = 16 then
   178   if k = 16 then
   179      begin
   179      begin
   180      while (x2 < 1900) and (CountNonZeroz(x2, y) = 0) do inc(x2, 2);
   180      while (x2 < 1900) and (CountNonZeroz(x2, y) = 0) do inc(x2, 2);
   181      i:= x2 + 12;
   181      i:= x2 + 12;
   182      repeat
   182      repeat
   183        k:= CountNonZeroz(x2, y);
   183        inc(x2, 2);
   184        inc(x2, 2)
   184        k:= CountNonZeroz(x2, y)
   185      until (x2 > 1900) or (k = 0) or (k = 16) or (x2 > i);
   185      until (x2 > 1900) or (k = 0) or (k = 16) or (x2 > i);
   186      if (x2 < 1900) and (k = 16) and (x2 - x1 > 250)
   186      if (x2 < 1900) and (k = 16) and (x2 - x1 > 250)
   187         and not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144) then break;
   187         and not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144) then break;
   188      end;
   188      end;
   189 x1:= 0;
   189 x1:= 0;