# HG changeset patch # User nemo # Date 1566229319 14400 # Node ID 0230c4766aa661eda278ca6071159db791aefb47 # Parent 53ca3783eca3ad17758823d9084c9266efd83397 make the mask colours more liberal due to possibility that OSX/SDL2 are slightly distorting them diff -r 53ca3783eca3 -r 0230c4766aa6 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Mon Aug 19 18:24:08 2019 +0300 +++ b/hedgewars/uLandObjects.pas Mon Aug 19 11:41:59 2019 -0400 @@ -89,18 +89,18 @@ // this an if instead of masking colours to avoid confusing map creators if ((AMask and Pixel) = 0) then LandWord:= 0 - else if Pixel = $FFFFFFFF then // white + else if (Pixel and AMask > 0) and (Pixel and RMask > 0) and (Pixel and GMask > 0) and (Pixel and BMask > 0) then // whiteish LandWord:= lfObject - else if Pixel = AMask then // black + else if (Pixel and AMask > 0) and (Pixel and RMask = 0) and (Pixel and GMask = 0) and (Pixel and BMask = 0) then // blackish begin LandWord:= lfBasic; disableLandBack:= false end - else if Pixel = (AMask or RMask) then // red + else if (Pixel and AMask > 0) and (Pixel and RMask > 0) and (Pixel and GMask = 0) and (Pixel and BMask = 0) then // reddish LandWord:= lfIndestructible - else if Pixel = (AMask or BMask) then // blue + else if (Pixel and AMask > 0) and (Pixel and RMask = 0) and (Pixel and GMask = 0) and (Pixel and BMask > 0) then // blueish LandWord:= lfObject or lfIce - else if Pixel = (AMask or GMask) then // green + else if (Pixel and AMask > 0) and (Pixel and RMask = 0) and (Pixel and GMask > 0) and (Pixel and BMask = 0) then // greenish LandWord:= lfObject or lfBouncy end;