rename flags
authornemo
Fri, 18 Jun 2010 14:26:04 -0400
changeset 3519 56cbc035b74b
parent 3518 772b37c9c3ba
child 3520 c3dcb80bdb1d
rename flags
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
--- a/hedgewars/GSHandlers.inc	Fri Jun 18 14:22:14 2010 -0400
+++ b/hedgewars/GSHandlers.inc	Fri Jun 18 14:26:04 2010 -0400
@@ -812,7 +812,7 @@
         end;
 
         if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9)
-           , LAND_INDESTRUCTIBLE) then
+           , lfIndestructible) then
         begin
             Gear^.X := Gear^.X + Gear^.dX;
             Gear^.Y := Gear^.Y + _1_9;
@@ -922,11 +922,11 @@
             // why the call to HedgehogStep then a further increment of X?
             if (prevX = hwRound(HHGear^.X)) and
                CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y),
-               LAND_INDESTRUCTIBLE) then HedgehogStep(HHGear);
+               lfIndestructible) then HedgehogStep(HHGear);
 
             if (prevX = hwRound(HHGear^.X)) and
                CheckLandValue(hwRound(HHGear^.X + SignAs(_6, HHGear^.dX)), hwRound(HHGear^.Y),
-               LAND_INDESTRUCTIBLE) then HHGear^.X := HHGear^.X + SignAs(_1, HHGear^.dX);
+               lfIndestructible) then HHGear^.X := HHGear^.X + SignAs(_1, HHGear^.dX);
             HHGear^.State := HHGear^.State or gstAttacking
         end;
 
@@ -936,7 +936,7 @@
             BTSteps := 0;
             if CheckLandValue(hwRound(HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC) + SignAs(_6,
                Gear^.dX)), hwRound(HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC)),
-               LAND_INDESTRUCTIBLE) then
+               lfIndestructible) then
             begin
                 Gear^.X := HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC);
                 Gear^.Y := HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC);
@@ -1795,7 +1795,7 @@
     end;
 
     if CheckLandValue(hwRound(HHGear^.X), hwRound(HHGear^.Y + HHGear^.dY + SignAs(_6,Gear^.dY)),
-       LAND_INDESTRUCTIBLE) then
+       lfIndestructible) then
         HHGear^.Y := HHGear^.Y + HHGear^.dY
 end;
 
@@ -2545,7 +2545,7 @@
        or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY))
        and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX)))
 // CheckLandValue returns true if the type isn't matched
-       or not CheckLandValue(hwRound(Gear^.Y), hwRound(Gear^.X), LAND_INDESTRUCTIBLE) then
+       or not CheckLandValue(hwRound(Gear^.Y), hwRound(Gear^.X), lfIndestructible) then
     begin
         //out of time or exited ground
         StopSound(Gear^.SoundChannel);
--- a/hedgewars/uConsts.pas	Fri Jun 18 14:22:14 2010 -0400
+++ b/hedgewars/uConsts.pas	Fri Jun 18 14:26:04 2010 -0400
@@ -249,10 +249,10 @@
 {$ENDIF}
 
 // To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
-    LAND_BASIC          = $8000;  // white
-    LAND_INDESTRUCTIBLE = $4000;  // red
-    LAND_OBJECT         = $2000;  // no idea
-    LAND_DAMAGED        = $1000;  // no idea
+    lfBasic          = $8000;  // white
+    lfIndestructible = $4000;  // red
+    lfObject         = $2000;  // no idea
+    lfDamaged        = $1000;  // no idea
 
     cMaxPower     = 1500;
     cMaxAngle     = 2048;
--- a/hedgewars/uLand.pas	Fri Jun 18 14:22:14 2010 -0400
+++ b/hedgewars/uLand.pas	Fri Jun 18 14:26:04 2010 -0400
@@ -561,7 +561,7 @@
 begin
 for y:= 0 to LAND_HEIGHT - 1 do
     for x:= 0 to LAND_WIDTH - 1 do
-        Land[y, x]:= LAND_BASIC;
+        Land[y, x]:= lfBasic;
 
 {$HINTS OFF}
 SetPoints(Template, pa);
@@ -582,7 +582,7 @@
          with FillPoints^[i] do
               FillLand(x, y);
 
-DrawEdge(pa, LAND_BASIC);
+DrawEdge(pa, lfBasic);
 
 MaxHedgehogs:= Template.MaxHedgehogs;
 hasGirders:= Template.hasGirders;
@@ -605,8 +605,8 @@
             else
             begin
                if Land[y, x] = 0 then
-                   Land[y, x]:= LAND_BASIC
-               else if Land[y, x] = LAND_BASIC then
+                   Land[y, x]:= lfBasic
+               else if Land[y, x] = lfBasic then
                    Land[y, x]:= 0;
             end;
     end;
@@ -978,7 +978,7 @@
 
 for x := 0 to playWidth do
     for y := off_y to LAND_HEIGHT - 1 do
-        Land[y, x] := LAND_BASIC;
+        Land[y, x] := lfBasic;
 
 for y := 0 to num_cells_y - 1 do
     for x := 0 to num_cells_x - 1 do
@@ -1079,7 +1079,7 @@
 else
 begin
     x := 0;
-    while Land[cellsize div 2 + cellsize + off_y, x] = LAND_BASIC do
+    while Land[cellsize div 2 + cellsize + off_y, x] = lfBasic do
         x := x + 1;
     while Land[cellsize div 2 + cellsize + off_y, x] = 0 do
         x := x + 1;
@@ -1165,9 +1165,9 @@
                     if ((AMask and p^[x]) = 0) then  // Tiy was having trouble generating transparent black
                         Land[cpY + y, cpX + x]:= 0
                     else if p^[x] = (AMask or RMask) then
-                        Land[cpY + y, cpX + x]:= LAND_INDESTRUCTIBLE
+                        Land[cpY + y, cpX + x]:= lfIndestructible
                     else if p^[x] = $FFFFFFFF then
-                        Land[cpY + y, cpX + x]:= LAND_BASIC;
+                        Land[cpY + y, cpX + x]:= lfBasic;
                 end;
                 p:= @(p^[tmpsurf^.pitch div 4]);
             end;
@@ -1261,15 +1261,15 @@
     for y:= 0 to LAND_HEIGHT - 1 do
         for x:= 0 to LAND_WIDTH - 1 do
             if (y < topY) or (x < leftX) or (x > rightX) then
-                Land[y, x]:= LAND_INDESTRUCTIBLE;
+                Land[y, x]:= lfIndestructible;
     // experiment hardcoding cave
     // also try basing cave dimensions on map/template dimensions, if they exist
     for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade
         begin
         for y:= topY to LAND_HEIGHT - 1 do
             begin
-            Land[y, leftX + w]:= LAND_INDESTRUCTIBLE;
-            Land[y, rightX - w]:= LAND_INDESTRUCTIBLE;
+            Land[y, leftX + w]:= lfIndestructible;
+            Land[y, rightX - w]:= lfIndestructible;
             if (y + w) mod 32 < 16 then
                 c:= AMask
             else
@@ -1285,7 +1285,7 @@
 
         for x:= leftX to rightX do
             begin
-            Land[topY + w, x]:= LAND_INDESTRUCTIBLE;
+            Land[topY + w, x]:= lfIndestructible;
             if (x + w) mod 32 < 16 then
                 c:= AMask
             else
--- a/hedgewars/uLandGraphics.pas	Fri Jun 18 14:22:14 2010 -0400
+++ b/hedgewars/uLandGraphics.pas	Fri Jun 18 14:26:04 2010 -0400
@@ -46,19 +46,19 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if (Land[y + dy, i] and LAND_INDESTRUCTIBLE) = 0 then
+        if (Land[y + dy, i] and lfIndestructible) = 0 then
             Land[y + dy, i]:= Value;
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if (Land[y - dy, i] and LAND_INDESTRUCTIBLE) = 0 then
+        if (Land[y - dy, i] and lfIndestructible) = 0 then
             Land[y - dy, i]:= Value;
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if (Land[y + dx, i] and LAND_INDESTRUCTIBLE) = 0 then
+        if (Land[y + dx, i] and lfIndestructible) = 0 then
             Land[y + dx, i]:= Value;
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if (Land[y - dx, i] and LAND_INDESTRUCTIBLE) = 0 then
+        if (Land[y - dx, i] and lfIndestructible) = 0 then
             Land[y - dx, i]:= Value;
 end;
 
@@ -145,7 +145,7 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if (not isMap and ((Land[y + dy, i] and LAND_INDESTRUCTIBLE) = 0)) or ((Land[y + dy, i] and LAND_BASIC) <> 0) then
+        if (not isMap and ((Land[y + dy, i] and lfIndestructible) = 0)) or ((Land[y + dy, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
             LandPixels[(y + dy) div 2, i div 2]:= 0;
 {$ELSE}
@@ -153,7 +153,7 @@
 {$ENDIF}
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-        if (not isMap and ((Land[y - dy, i] and LAND_INDESTRUCTIBLE) = 0)) or ((Land[y - dy, i] and LAND_BASIC) <> 0) then
+        if (not isMap and ((Land[y - dy, i] and lfIndestructible) = 0)) or ((Land[y - dy, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
              LandPixels[(y - dy) div 2, i div 2]:= 0;
 {$ELSE}
@@ -161,7 +161,7 @@
 {$ENDIF}
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if (not isMap and ((Land[y + dx, i] and LAND_INDESTRUCTIBLE) = 0)) or ((Land[y + dx, i] and LAND_BASIC) <> 0) then
+        if (not isMap and ((Land[y + dx, i] and lfIndestructible) = 0)) or ((Land[y + dx, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
             LandPixels[(y + dx) div 2, i div 2]:= 0;
 {$ELSE}
@@ -169,7 +169,7 @@
 {$ENDIF}
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
     for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-        if (not isMap and ((Land[y - dx, i] and LAND_INDESTRUCTIBLE) = 0)) or ((Land[y - dx, i] and LAND_BASIC) <> 0) then
+        if (not isMap and ((Land[y - dx, i] and lfIndestructible) = 0)) or ((Land[y - dx, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
              LandPixels[(y - dx) div 2, i div 2]:= 0;
 {$ELSE}
@@ -182,7 +182,7 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[y + dy, i] and LAND_BASIC) <> 0) then
+       if ((Land[y + dy, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
           LandPixels[(y + dy) div 2, i div 2]:= LandBackPixel(i, y + dy)
 {$ELSE}
@@ -190,13 +190,13 @@
 {$ENDIF}
        else
 {$IFDEF DOWNSCALE}
-          if ((Land[y + dy, i] and LAND_OBJECT) <> 0) then LandPixels[(y + dy) div 2, i div 2]:= 0;
+          if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[(y + dy) div 2, i div 2]:= 0;
 {$ELSE}
-          if ((Land[y + dy, i] and LAND_OBJECT) <> 0) then LandPixels[y + dy, i]:= 0;
+          if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[y + dy, i]:= 0;
 {$ENDIF}
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[y - dy, i] and LAND_BASIC) <> 0) then
+       if ((Land[y - dy, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
           LandPixels[(y - dy) div 2, i div 2]:= LandBackPixel(i, y - dy)
 {$ELSE}
@@ -204,13 +204,13 @@
 {$ENDIF}
        else
 {$IFDEF DOWNSCALE}
-          if ((Land[y - dy, i] and LAND_OBJECT) <> 0) then LandPixels[(y - dy) div 2, i div 2]:= 0;
+          if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[(y - dy) div 2, i div 2]:= 0;
 {$ELSE}
-          if ((Land[y - dy, i] and LAND_OBJECT) <> 0) then LandPixels[y - dy, i]:= 0;
+          if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[y - dy, i]:= 0;
 {$ENDIF}
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[y + dx, i] and LAND_BASIC) <> 0) then
+       if ((Land[y + dx, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
            LandPixels[(y + dx) div 2, i div 2]:= LandBackPixel(i, y + dx)
 {$ELSE}
@@ -218,13 +218,13 @@
 {$ENDIF}
        else
 {$IFDEF DOWNSCALE}
-          if ((Land[y + dx, i] and LAND_OBJECT) <> 0) then LandPixels[(y + dx) div 2, i div 2]:= 0;
+          if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[(y + dx) div 2, i div 2]:= 0;
 {$ELSE}
-          if ((Land[y + dx, i] and LAND_OBJECT) <> 0) then LandPixels[y + dx, i]:= 0;
+          if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[y + dx, i]:= 0;
 {$ENDIF}
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[y - dx, i] and LAND_BASIC) <> 0) then
+       if ((Land[y - dx, i] and lfBasic) <> 0) then
 {$IFDEF DOWNSCALE}
           LandPixels[(y - dx) div 2, i div 2]:= LandBackPixel(i, y - dx)
 {$ELSE}
@@ -232,9 +232,9 @@
 {$ENDIF}
        else
 {$IFDEF DOWNSCALE}
-          if ((Land[y - dx, i] and LAND_OBJECT) <> 0) then LandPixels[(y - dx) div 2, i div 2]:= 0;
+          if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[(y - dx) div 2, i div 2]:= 0;
 {$ELSE}
-          if ((Land[y - dx, i] and LAND_OBJECT) <> 0) then LandPixels[y - dx, i]:= 0;
+          if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[y - dx, i]:= 0;
 {$ENDIF}
 end;
 
@@ -243,53 +243,53 @@
 begin
 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[y + dy, i] and LAND_BASIC) <> 0) or ((Land[y + dy, i] and LAND_OBJECT) <> 0) then
+       if ((Land[y + dy, i] and lfBasic) <> 0) or ((Land[y + dy, i] and lfObject) <> 0) then
           begin
 {$IFDEF DOWNSCALE}
           LandPixels[(y + dy) div 2, i div 2]:= cExplosionBorderColor;
 {$ELSE}
           LandPixels[y + dy, i]:= cExplosionBorderColor;
 {$ENDIF}
-          Land[y + dy, i]:= Land[y + dy, i] or LAND_DAMAGED;
+          Land[y + dy, i]:= Land[y + dy, i] or lfDamaged;
           Despeckle(i, y + dy);
           LandDirty[(y + dy) div 32, i div 32]:= 1;
           end;
 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[y - dy, i] and LAND_BASIC) <> 0) or ((Land[y - dy, i] and LAND_OBJECT) <> 0) then
+       if ((Land[y - dy, i] and lfBasic) <> 0) or ((Land[y - dy, i] and lfObject) <> 0) then
           begin
 {$IFDEF DOWNSCALE}
           LandPixels[(y - dy) div 2, i div 2]:= cExplosionBorderColor;
 {$ELSE}
           LandPixels[y - dy, i]:= cExplosionBorderColor;
 {$ENDIF}
-          Land[y - dy, i]:= Land[y - dy, i] or LAND_DAMAGED;
+          Land[y - dy, i]:= Land[y - dy, i] or lfDamaged;
           Despeckle(i, y - dy);
           LandDirty[(y - dy) div 32, i div 32]:= 1;
           end;
 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[y + dx, i] and LAND_BASIC) <> 0) or ((Land[y + dx, i] and LAND_OBJECT) <> 0) then
+       if ((Land[y + dx, i] and lfBasic) <> 0) or ((Land[y + dx, i] and lfObject) <> 0) then
            begin
 {$IFDEF DOWNSCALE}
            LandPixels[(y + dx) div 2, i div 2]:= cExplosionBorderColor;
 {$ELSE}
            LandPixels[y + dx, i]:= cExplosionBorderColor;
 {$ENDIF}
-           Land[y + dx, i]:= Land[y + dx, i] or LAND_DAMAGED;
+           Land[y + dx, i]:= Land[y + dx, i] or lfDamaged;
            Despeckle(i, y + dx);
            LandDirty[(y + dx) div 32, i div 32]:= 1;
            end;
 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then
    for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[y - dx, i] and LAND_BASIC) <> 0) or ((Land[y - dx, i] and LAND_OBJECT) <> 0) then
+       if ((Land[y - dx, i] and lfBasic) <> 0) or ((Land[y - dx, i] and lfObject) <> 0) then
           begin
 {$IFDEF DOWNSCALE}
           LandPixels[(y - dx) div 2, i div 2]:= cExplosionBorderColor;
 {$ELSE}
           LandPixels[y - dx, i]:= cExplosionBorderColor;
 {$ENDIF}
-          Land[y - dx, i]:= Land[y - dx, i] or LAND_DAMAGED;
+          Land[y - dx, i]:= Land[y - dx, i] or lfDamaged;
           Despeckle(i, y - dy);
           LandDirty[(y - dx) div 32, i div 32]:= 1;
           end;
@@ -377,13 +377,13 @@
     begin
     for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
         for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
-            if (Land[ty, tx] and LAND_BASIC) <> 0 then
+            if (Land[ty, tx] and lfBasic) <> 0 then
 {$IFDEF DOWNSCALE}
                 LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty)
 {$ELSE}
                 LandPixels[ty, tx]:= LandBackPixel(tx, ty)
 {$ENDIF}
-            else if (Land[ty, tx] and LAND_OBJECT) <> 0 then
+            else if (Land[ty, tx] and lfObject) <> 0 then
 {$IFDEF DOWNSCALE}
                 LandPixels[ty div 2, tx div 2]:= 0;
 {$ELSE}
@@ -399,14 +399,14 @@
     begin
     for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do
         for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do
-            if ((Land[ty, tx] and LAND_BASIC) <> 0) or ((Land[ty, tx] and LAND_OBJECT) <> 0) then
+            if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then
                 begin
 {$IFDEF DOWNSCALE}
                 LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor;
 {$ELSE}
                 LandPixels[ty, tx]:= cExplosionBorderColor;
 {$ENDIF}
-                Land[ty, tx]:= Land[ty, tx] or LAND_DAMAGED;
+                Land[ty, tx]:= Land[ty, tx] or lfDamaged;
                 LandDirty[(y + dy) shr 5, i shr 5]:= 1;
                 end;
     inc(y, dY)
@@ -443,10 +443,10 @@
     ty:= hwRound(Y);
     if ((ty and LAND_HEIGHT_MASK) = 0) and
        ((tx and LAND_WIDTH_MASK) = 0) and
-       (((Land[ty, tx] and LAND_BASIC) <> 0) or 
-       ((Land[ty, tx] and LAND_OBJECT) <> 0)) then
+       (((Land[ty, tx] and lfBasic) <> 0) or 
+       ((Land[ty, tx] and lfObject) <> 0)) then
         begin
-        Land[ty, tx]:= Land[ty, tx] or LAND_DAMAGED;
+        Land[ty, tx]:= Land[ty, tx] or lfDamaged;
 {$IFDEF DOWNSCALE}
         LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor
 {$ELSE}
@@ -470,10 +470,10 @@
     ty:= hwRound(Y);
     if ((ty and LAND_HEIGHT_MASK) = 0) and
        ((tx and LAND_WIDTH_MASK) = 0) and
-       (((Land[ty, tx] and LAND_BASIC) <> 0) or 
-       ((Land[ty, tx] and LAND_OBJECT) <> 0)) then
+       (((Land[ty, tx] and lfBasic) <> 0) or 
+       ((Land[ty, tx] and lfObject) <> 0)) then
         begin
-        Land[ty, tx]:= Land[ty, tx] or LAND_DAMAGED;
+        Land[ty, tx]:= Land[ty, tx] or lfDamaged;
 {$IFDEF DOWNSCALE}
         LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor
 {$ELSE}
@@ -489,15 +489,15 @@
         Y:= Y + dY;
         tx:= hwRound(X);
         ty:= hwRound(Y);
-        if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and ((Land[ty, tx] and LAND_INDESTRUCTIBLE) = 0) then
+        if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and ((Land[ty, tx] and lfIndestructible) = 0) then
             begin
-            if (Land[ty, tx] and LAND_BASIC) <> 0 then
+            if (Land[ty, tx] and lfBasic) <> 0 then
 {$IFDEF DOWNSCALE}
                 LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty)
 {$ELSE}
                 LandPixels[ty, tx]:= LandBackPixel(tx, ty)
 {$ENDIF}
-            else if (Land[ty, tx] and LAND_OBJECT) <> 0 then
+            else if (Land[ty, tx] and lfObject) <> 0 then
 {$IFDEF DOWNSCALE}
                 LandPixels[ty div 2, tx div 2]:= 0;
 {$ELSE}
@@ -514,10 +514,10 @@
     ty:= hwRound(Y);
     if ((ty and LAND_HEIGHT_MASK) = 0) and
        ((tx and LAND_WIDTH_MASK) = 0) and
-       (((Land[ty, tx] and LAND_BASIC) <> 0) or 
-       ((Land[ty, tx] and LAND_OBJECT) <> 0)) then
+       (((Land[ty, tx] and lfBasic) <> 0) or 
+       ((Land[ty, tx] and lfObject) <> 0)) then
         begin
-        Land[ty, tx]:= Land[ty, tx] or LAND_DAMAGED;
+        Land[ty, tx]:= Land[ty, tx] or lfDamaged;
 {$IFDEF DOWNSCALE}
         LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor
 {$ELSE}
@@ -541,10 +541,10 @@
     ty:= hwRound(Y);
     if ((ty and LAND_HEIGHT_MASK) = 0) and
        ((tx and LAND_WIDTH_MASK) = 0) and
-       (((Land[ty, tx] and LAND_BASIC) <> 0) or 
-       ((Land[ty, tx] and LAND_OBJECT) <> 0)) then
+       (((Land[ty, tx] and lfBasic) <> 0) or 
+       ((Land[ty, tx] and lfObject) <> 0)) then
         begin
-        Land[ty, tx]:= Land[ty, tx] or LAND_DAMAGED;
+        Land[ty, tx]:= Land[ty, tx] or lfDamaged;
 {$IFDEF DOWNSCALE}
         LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor
 {$ELSE}
@@ -620,7 +620,7 @@
             for x:= 0 to Pred(w) do
                 if PLongword(@(p^[x * 4]))^ <> 0 then
                    begin
-                   Land[cpY + y, cpX + x]:= LAND_OBJECT;
+                   Land[cpY + y, cpX + x]:= lfObject;
 {$IFDEF DOWNSCALE}
                    LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= PLongword(@(p^[x * 4]))^
 {$ELSE}
@@ -644,7 +644,7 @@
 function Despeckle(X, Y: LongInt): boolean;
 var nx, ny, i, j, c: LongInt;
 begin
-if (Land[Y, X] > 255) and ((Land[Y, X] and LAND_INDESTRUCTIBLE) = 0) and ((Land[Y, X] and LAND_DAMAGED) <> 0)then // check neighbours
+if (Land[Y, X] > 255) and ((Land[Y, X] and lfIndestructible) = 0) and ((Land[Y, X] and lfDamaged) <> 0)then // check neighbours
     begin
     c:= 0;
     for i:= -1 to 1 do
@@ -661,9 +661,9 @@
     if c < 4 then // 0-3 neighbours
         begin
 {$IFDEF DOWNSCALE}
-        if (Land[Y, X] and LAND_BASIC) <> 0 then LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) else LandPixels[Y div 2, X div 2]:= 0;
+        if (Land[Y, X] and lfBasic) <> 0 then LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) else LandPixels[Y div 2, X div 2]:= 0;
 {$ELSE}
-        if (Land[Y, X] and LAND_BASIC) <> 0 then LandPixels[Y, X]:= LandBackPixel(X, Y) else LandPixels[Y, X]:= 0;
+        if (Land[Y, X] and lfBasic) <> 0 then LandPixels[Y, X]:= LandBackPixel(X, Y) else LandPixels[Y, X]:= 0;
 {$ENDIF}
         Land[Y, X]:= 0;
         exit(true);
--- a/hedgewars/uLandObjects.pas	Fri Jun 18 14:22:14 2010 -0400
+++ b/hedgewars/uLandObjects.pas	Fri Jun 18 14:26:04 2010 -0400
@@ -93,7 +93,7 @@
             LandPixels[cpY + y, cpX + x]:= p^[x];
 {$ENDIF}
         if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then 
-            Land[cpY + y, cpX + x]:= LAND_OBJECT
+            Land[cpY + y, cpX + x]:= lfObject
         end;
     p:= @(p^[Image^.pitch shr 2])
     end;
@@ -238,7 +238,7 @@
     bRes: boolean;
 begin
 with Obj do
-     if CheckLand(inland, x, y, LAND_BASIC) then
+     if CheckLand(inland, x, y, lfBasic) then
         begin
         bRes:= true;
         i:= 1;
@@ -318,7 +318,7 @@
     repeat
         y:= 8;
         repeat
-            if CheckLand(r, x, y - 8, LAND_BASIC)
+            if CheckLand(r, x, y - 8, lfBasic)
             and not CheckIntersect(x, y, Width, Height) then
             begin
             ar[cnt].x:= x;