hedgewars/uLandGraphics.pas
changeset 15140 53342ce3f0a6
parent 14286 7a7c090f96f6
child 15141 af14c418c92f
equal deleted inserted replaced
15139:adf6f9be8113 15140:53342ce3f0a6
   159 
   159 
   160 
   160 
   161 procedure DrawPixelIce(landX, landY, pixelX, pixelY: Longint); inline;
   161 procedure DrawPixelIce(landX, landY, pixelX, pixelY: Longint); inline;
   162 begin
   162 begin
   163 if ((Land[landY, landX] and lfIce) <> 0) then exit;
   163 if ((Land[landY, landX] and lfIce) <> 0) then exit;
       
   164 if (pixelX < LeftX) or (pixelX > RightX) or (pixelY < TopY) then exit;
   164 if isLandscapeEdge(getPixelWeight(landX, landY)) then
   165 if isLandscapeEdge(getPixelWeight(landX, landY)) then
   165     begin
   166     begin
   166     if (LandPixels[pixelY, pixelX] and AMask < 255) and (LandPixels[pixelY, pixelX] and AMask > 0) then
   167     if (LandPixels[pixelY, pixelX] and AMask < 255) and (LandPixels[pixelY, pixelX] and AMask > 0) then
   167         LandPixels[pixelY, pixelX] := (IceEdgeColor and (not AMask)) or (LandPixels[pixelY, pixelX] and AMask)
   168         LandPixels[pixelY, pixelX] := (IceEdgeColor and (not AMask)) or (LandPixels[pixelY, pixelX] and AMask)
   168     else if (LandPixels[pixelY, pixelX] and AMask < 255) or (Land[landY, landX] > 255) then
   169     else if (LandPixels[pixelY, pixelX] and AMask < 255) or (Land[landY, landX] > 255) then