hedgewars/uLand.pas
changeset 5687 fac606654317
parent 5441 39962b855540
child 5717 6d513913b7a9
equal deleted inserted replaced
5686:3f2e6ec7719a 5687:fac606654317
  1068                (((Land[y, x-1] = lfBasic) and ((Land[y+1,x] = lfBasic)) or (Land[y-1,x] = lfBasic)) or
  1068                (((Land[y, x-1] = lfBasic) and ((Land[y+1,x] = lfBasic)) or (Land[y-1,x] = lfBasic)) or
  1069                ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
  1069                ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
  1070             begin
  1070             begin
  1071                 if (cReducedQuality and rqBlurryLand) = 0 then
  1071                 if (cReducedQuality and rqBlurryLand) = 0 then
  1072                     begin
  1072                     begin
  1073                     if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1]
  1073                     if (Land[y, x-1] = lfBasic) and (Land[y, x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1074                     else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1];
  1074                     else if (Land[y, x+1] = lfBasic) and (Land[y, x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1075                     LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift)
  1075                     else if (Land[y-1, x] = lfBasic) and (Land[y-1, x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y-1, x]
       
  1076                     else if (Land[y+1, x] = lfBasic) and (Land[y+1, x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x];
       
  1077                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift)
  1076                     end;
  1078                     end;
  1077                 Land[y,x]:= lfObject
  1079                 Land[y,x]:= lfObject
  1078             end
  1080             end
  1079             else if (Land[y, x] = 0) and
  1081             else if (Land[y, x] = 0) and
  1080                     (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
  1082                     (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
  1086                     ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
  1088                     ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
  1087                     ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
  1089                     ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
  1088             begin
  1090             begin
  1089                 if (cReducedQuality and rqBlurryLand) = 0 then
  1091                 if (cReducedQuality and rqBlurryLand) = 0 then
  1090                     begin
  1092                     begin
  1091                     if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1]
  1093                     if (Land[y, x-1] = lfBasic) and (Land[y,x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1092                     else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1]
  1094                     else if (Land[y, x+1] = lfBasic) and (Land[y,x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1093                     else if Land[y+1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y+1, x]
  1095                     else if (Land[y+1, x] = lfBasic) and (Land[y+1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x]
  1094                     else if Land[y-1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y-1, x];
  1096                     else if (Land[y-1, x] = lfBasic) and (Land[y-1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y-1, x];
  1095                     LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift)
  1097                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift)
  1096                     end;
  1098                     end;
  1097                 Land[y,x]:= lfObject
  1099                 Land[y,x]:= lfObject
  1098             end;
  1100             end;
  1099 
  1101 
  1100     AddProgress();
  1102     AddProgress();