equal
deleted
inserted
replaced
713 begin |
713 begin |
714 xx:= X div 2; |
714 xx:= X div 2; |
715 yy:= Y div 2; |
715 yy:= Y div 2; |
716 end; |
716 end; |
717 pixelsweep:= ((Land[Y, X] and $FF00) = 0) and (LandPixels[yy, xx] <> 0); |
717 pixelsweep:= ((Land[Y, X] and $FF00) = 0) and (LandPixels[yy, xx] <> 0); |
718 if (((Land[Y, X] and lfDamaged) <> 0) and ((Land[Y, X] and lfIndestructible) = 0)) or pixelsweep then |
718 if ((Land[Y, X] > 255) and ((Land[Y, X] and lfIndestructible) = 0)) or pixelsweep then |
719 begin |
719 begin |
720 c:= 0; |
720 c:= 0; |
721 for i:= -1 to 1 do |
721 for i:= -1 to 1 do |
722 for j:= -1 to 1 do |
722 for j:= -1 to 1 do |
723 if (i <> 0) or (j <> 0) then |
723 if (i <> 0) or (j <> 0) then |
736 if LandPixels[ny, nx] <> 0 then inc(c); |
736 if LandPixels[ny, nx] <> 0 then inc(c); |
737 end |
737 end |
738 else if Land[ny, nx] > 255 then inc(c); |
738 else if Land[ny, nx] > 255 then inc(c); |
739 end |
739 end |
740 end; |
740 end; |
741 |
741 if (c < 2) or |
742 if c < 4 then // 0-3 neighbours |
742 ((c < 4) and (((Land[Y, X] and lfDamaged) <> 0) or pixelsweep)) then |
743 begin |
743 begin |
744 if ((Land[Y, X] and lfBasic) <> 0) and not disableLandBack then |
744 if ((Land[Y, X] and lfBasic) <> 0) and not disableLandBack then |
745 LandPixels[yy, xx]:= LandBackPixel(X, Y) |
745 LandPixels[yy, xx]:= LandBackPixel(X, Y) |
746 else |
746 else |
747 LandPixels[yy, xx]:= 0; |
747 LandPixels[yy, xx]:= 0; |