--- a/hedgewars/uLandObjects.pas Thu Sep 10 15:22:34 2009 +0000
+++ b/hedgewars/uLandObjects.pas Thu Sep 10 15:29:28 2009 +0000
@@ -27,7 +27,7 @@
procedure AddOnLandObjects(Surface: PSDL_Surface);
implementation
-uses uLand, uStore, uConsts, uMisc, uConsole, uRandom, uVisualGears, uFloat,
+uses uLand, uStore, uConsts, uMisc, uConsole, uRandom, uVisualGears, uFloat,
{$IFDEF GLES11}
gles11,
{$ELSE}
@@ -162,7 +162,7 @@
inc(y, 24);
x1:= gX;
x2:= gX;
-
+
while (x1 > Longint(leftX)+150) and (CountNonZeroz(x1, y) = 0) do dec(x1, 2);
i:= x1 - 12;
@@ -170,7 +170,7 @@
dec(x1, 2);
k:= CountNonZeroz(x1, y)
until (x1 < Longint(leftX)+150) or (k = 0) or (k = 16) or (x1 < i);
-
+
inc(x1, 2);
if k = 16 then
begin
@@ -191,7 +191,7 @@
Result:= true;
tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Girder', ifTransparent or ifIgnoreCaps);
if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptGraphics] + '/Girder', ifCritical or ifTransparent or ifIgnoreCaps);
-
+
rr.x:= x1;
while rr.x < x2 do
begin
@@ -199,7 +199,7 @@
inc(rr.x, tmpsurf^.w);
end;
SDL_FreeSurface(tmpsurf);
-
+
AddRect(x1 - 8, y - 32, x2 - x1 + 16, 80);
end else Result:= false;