hedgewars/uLand.pas
changeset 7293 468cf6d561e5
parent 7170 84ac6c6d2d8e
child 7477 26706bf32ecf
--- a/hedgewars/uLand.pas	Mon Jun 25 09:40:56 2012 -0400
+++ b/hedgewars/uLand.pas	Tue Jun 26 10:14:40 2012 -0400
@@ -434,19 +434,22 @@
         begin
             for x:= 0 to Pred(tmpsurf^.w) do
             begin
-                if ((AMask and p^[x]) = 0) then
+                // this an if instead of masking colours to avoid confusing map creators
+                if ((AMask and p^[x]) = 0) then 
                     Land[cpY + y, cpX + x]:= 0
-                else if p^[x] = $FFFFFFFF then
+                else if p^[x] = $FFFFFFFF then                  // white
                     Land[cpY + y, cpX + x]:= lfObject
-                else if p^[x] = (AMask or RMask) then
-                    Land[cpY + y, cpX + x]:= lfIndestructible
-                else if p^[x] = AMask then
+                else if p^[x] = AMask then                      // black
                     begin
                     Land[cpY + y, cpX + x]:= lfBasic;
                     disableLandBack:= false
                     end
-                else if p^[x] = (AMask or BMask) then
+                else if p^[x] = (AMask or RMask) then           // red
+                    Land[cpY + y, cpX + x]:= lfIndestructible
+                else if p^[x] = (AMask or BMask) then           // blue
                     Land[cpY + y, cpX + x]:= lfObject or lfIce
+                else if p^[x] = (AMask or GMask) then           // green
+                    Land[cpY + y, cpX + x]:= lfObject or lfBouncy
             end;
             p:= @(p^[tmpsurf^.pitch div 4]);
         end;