hedgewars/uLand.pas
changeset 5719 0ed1f543f301
parent 5718 e74de0528ef4
child 5725 e27100a0e2d0
child 5770 022a18320f01
equal deleted inserted replaced
5718:e74de0528ef4 5719:0ed1f543f301
  1069                (((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)) or
  1070                ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
  1070                ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
  1071             begin
  1071             begin
  1072                 if (cReducedQuality and rqBlurryLand) = 0 then
  1072                 if (cReducedQuality and rqBlurryLand) = 0 then
  1073                     begin
  1073                     begin
  1074                     if (Land[y, x-1] = lfBasic) and (Land[y, x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1074                     if (Land[y, x-1] = lfBasic) and (LandPixels[y, x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1075                     else if (Land[y, x+1] = lfBasic) and (Land[y, x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1075                     else if (Land[y, x+1] = lfBasic) and (LandPixels[y, x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1076                     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 (LandPixels[y-1, x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y-1, x]
  1077                     else if (Land[y+1, x] = lfBasic) and (Land[y+1, x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x];
  1077                     else if (Land[y+1, x] = lfBasic) and (LandPixels[y+1, x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x];
  1078                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift)
  1078                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift)
  1079                     end;
  1079                     end;
  1080                 Land[y,x]:= lfObject
  1080                 Land[y,x]:= lfObject
  1081             end
  1081             end
  1082             else if (Land[y, x] = 0) and
  1082             else if (Land[y, x] = 0) and
  1089                     ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
  1089                     ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
  1090                     ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
  1090                     ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
  1091             begin
  1091             begin
  1092                 if (cReducedQuality and rqBlurryLand) = 0 then
  1092                 if (cReducedQuality and rqBlurryLand) = 0 then
  1093                     begin
  1093                     begin
  1094                     if (Land[y, x-1] = lfBasic) and (Land[y,x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1094                     if (Land[y, x-1] = lfBasic) and (LandPixels[y,x-1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x-1]
  1095                     else if (Land[y, x+1] = lfBasic) and (Land[y,x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1095                     else if (Land[y, x+1] = lfBasic) and (LandPixels[y,x+1] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y, x+1]
  1096                     else if (Land[y+1, x] = lfBasic) and (Land[y+1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x]
  1096                     else if (Land[y+1, x] = lfBasic) and (LandPixels[y+1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y+1, x]
  1097                     else if (Land[y-1, x] = lfBasic) and (Land[y-1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y-1, x];
  1097                     else if (Land[y-1, x] = lfBasic) and (LandPixels[y-1,x] and AMask <> 0) then LandPixels[y, x]:= LandPixels[y-1, x];
  1098                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift)
  1098                     if (((LandPixels[y,x] and AMask) shr AShift) > 10) then LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift)
  1099                     end;
  1099                     end;
  1100                 Land[y,x]:= lfObject
  1100                 Land[y,x]:= lfObject
  1101             end;
  1101             end;
  1102 
  1102