--- a/hedgewars/uLandObjects.pas Sun Jan 19 00:18:28 2014 +0400
+++ b/hedgewars/uLandObjects.pas Tue Jan 21 22:38:13 2014 +0100
@@ -94,7 +94,7 @@
begin
BlitImageAndGenerateCollisionInfo(cpX, cpY, Width, Image, 0);
end;
-
+
procedure BlitImageAndGenerateCollisionInfo(cpX, cpY, Width: Longword; Image: PSDL_Surface; LandFlags: Word);
var p: PLongwordArray;
x, y: Longword;
@@ -124,7 +124,7 @@
LandPixels[cpY + y, cpX + x]:= p^[x];
end
else
- if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
+ if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
if (Land[cpY + y, cpX + x] <= lfAllObjMask) and ((p^[x] and AMask) <> 0) then
@@ -164,7 +164,7 @@
LandPixels[cpY + y, cpX + x]:= p^[x];
end
else
- if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
+ if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
if (Land[cpY + y, cpX + x] <= lfAllObjMask) or (Land[cpY + y, cpX + x] and lfObject <> 0) then
@@ -261,7 +261,7 @@
inc(x2, 2);
k:= CountNonZeroz(x2, y)
until (x2 >= (rightX-150)) or (k = 0) or (k = 16) or (x2 > i) or (x2 - x1 >= 768);
-
+
if (x2 < (rightX - 150)) and (k = 16) and (x2 - x1 > 250) and (x2 - x1 < 768)
and (not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144)) then
break;
@@ -277,7 +277,7 @@
rr.x:= x1;
while rr.x < x2 do
begin
- if cIce then
+ if cIce then
BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf, lfIce)
else
BlitImageAndGenerateCollisionInfo(rr.x, y, min(x2 - rr.x, tmpsurf^.w), tmpsurf);
@@ -454,9 +454,9 @@
procedure CheckRect(Width, Height, x, y, w, h: LongWord);
begin
- if (x + w > Width) then
+ if (x + w > Width) then
OutError('Object''s rectangle exceeds image: x + w (' + inttostr(x) + ' + ' + inttostr(w) + ') > Width (' + inttostr(Width) + ')', true);
- if (y + h > Height) then
+ if (y + h > Height) then
OutError('Object''s rectangle exceeds image: y + h (' + inttostr(y) + ' + ' + inttostr(h) + ') > Height (' + inttostr(Height) + ')', true);
end;
@@ -554,7 +554,7 @@
c2.g:= t;
c2.b:= t
end;
- ExplosionBorderColor:= (c2.r shl RShift) or (c2.g shl GShift) or (c2.b shl BShift) or AMask;
+ ExplosionBorderColor:= (c2.r shl RShift) or (c2.g shl GShift) or (c2.b shl BShift) or AMask;
end
else if key = 'water-top' then
begin