hedgewars/uLandGraphics.pas
changeset 10600 e28d86fc393e
parent 10582 672e7028b1b6
child 10601 3f4964eeaf01
equal deleted inserted replaced
10599:918d6da025a6 10600:e28d86fc393e
   847     begin
   847     begin
   848         xx:= X div 2;
   848         xx:= X div 2;
   849         yy:= Y div 2;
   849         yy:= Y div 2;
   850     end;
   850     end;
   851 
   851 
   852     pixelsweep:= (Land[Y, X] <= lfAllObjMask) and (LandPixels[yy, xx] <> 0);
   852     pixelsweep:= (Land[Y, X] <= lfAllObjMask) and ((LandPixels[yy, xx] and AMASK) <> 0);
   853     if (((Land[Y, X] and lfDamaged) <> 0) and ((Land[Y, X] and lfIndestructible) = 0)) or pixelsweep then
   853     if (((Land[Y, X] and lfDamaged) <> 0) and ((Land[Y, X] and lfIndestructible) = 0)) or pixelsweep then
   854     begin
   854     begin
   855         c:= 0;
   855         c:= 0;
   856         for i:= -1 to 1 do
   856         for i:= -1 to 1 do
   857             for j:= -1 to 1 do
   857             for j:= -1 to 1 do
   866                             if ((cReducedQuality and rqBlurryLand) <> 0) then
   866                             if ((cReducedQuality and rqBlurryLand) <> 0) then
   867                             begin
   867                             begin
   868                                 ny:= Y div 2 + i;
   868                                 ny:= Y div 2 + i;
   869                                 nx:= X div 2 + j;
   869                                 nx:= X div 2 + j;
   870                                 if ((ny and (LAND_HEIGHT_MASK div 2)) = 0) and ((nx and (LAND_WIDTH_MASK div 2)) = 0) then
   870                                 if ((ny and (LAND_HEIGHT_MASK div 2)) = 0) and ((nx and (LAND_WIDTH_MASK div 2)) = 0) then
   871                                     if LandPixels[ny, nx] <> 0 then
   871                                     if (LandPixels[ny, nx] and AMASK) <> 0 then
   872                                         inc(c);
   872                                         inc(c);
   873                             end
   873                             end
   874                             else if LandPixels[ny, nx] <> 0 then
   874                             else if (LandPixels[ny, nx] and AMASK)  <> 0 then
   875                                     inc(c);
   875                                     inc(c);
   876                         end
   876                         end
   877                     else if Land[ny, nx] > 255 then
   877                     else if Land[ny, nx] > 255 then
   878                         inc(c);
   878                         inc(c);
   879                     end
   879                     end