hedgewars/uGears.pas
changeset 3407 dcc129c4352e
parent 3405 8fdb08497bf1
child 3415 1ca22b3493e9
equal deleted inserted replaced
3406:f4bdebced042 3407:dcc129c4352e
  1605 repeat
  1605 repeat
  1606     x:= Left + LongInt(GetRandom(Delta));
  1606     x:= Left + LongInt(GetRandom(Delta));
  1607     repeat
  1607     repeat
  1608         inc(x, Delta);
  1608         inc(x, Delta);
  1609         cnt:= 0;
  1609         cnt:= 0;
  1610         if topY > 1024 then
  1610         y:= min(1024, topY) - 2 * Gear^.Radius;
  1611             y:= 1024-Gear^.Radius * 2
       
  1612         else
       
  1613             y:= topY-Gear^.Radius * 2;
       
  1614         while y < LAND_HEIGHT do
  1611         while y < LAND_HEIGHT do
  1615             begin
  1612             begin
  1616             repeat
  1613             repeat
  1617                 inc(y, 2);
  1614                 inc(y, 2);
  1618             until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0);
  1615             until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0);