hedgewars/uLandGraphics.pas
changeset 3521 96a502730e81
parent 3519 56cbc035b74b
child 3554 066faceb977d
equal deleted inserted replaced
3520:c3dcb80bdb1d 3521:96a502730e81
   642 
   642 
   643 // was experimenting with applying as damage occurred.
   643 // was experimenting with applying as damage occurred.
   644 function Despeckle(X, Y: LongInt): boolean;
   644 function Despeckle(X, Y: LongInt): boolean;
   645 var nx, ny, i, j, c: LongInt;
   645 var nx, ny, i, j, c: LongInt;
   646 begin
   646 begin
   647 if (Land[Y, X] > 255) and ((Land[Y, X] and lfIndestructible) = 0) and ((Land[Y, X] and lfDamaged) <> 0)then // check neighbours
   647 if ((Land[Y, X] and lfDamaged) <> 0) and ((Land[Y, X] and lfIndestructible) = 0) then // check neighbours
   648     begin
   648     begin
   649     c:= 0;
   649     c:= 0;
   650     for i:= -1 to 1 do
   650     for i:= -1 to 1 do
   651         for j:= -1 to 1 do
   651         for j:= -1 to 1 do
   652             if (i <> 0) or (j <> 0) then
   652             if (i <> 0) or (j <> 0) then