1055 TryDo(tmpsurf <> nil, 'Error creating pre-land surface', true); |
1056 TryDo(tmpsurf <> nil, 'Error creating pre-land surface', true); |
1056 ColorizeLand(tmpsurf); |
1057 ColorizeLand(tmpsurf); |
1057 AddOnLandObjects(tmpsurf); |
1058 AddOnLandObjects(tmpsurf); |
1058 |
1059 |
1059 LandSurface2LandPixels(tmpsurf); |
1060 LandSurface2LandPixels(tmpsurf); |
1060 SDL_FreeSurface(tmpsurf); |
1061 if (cReducedQuality and rqBlurryLand) = 0 then |
|
1062 for x:= leftX+2 to rightX-2 do |
|
1063 for y:= topY+2 to LAND_HEIGHT-3 do |
|
1064 if (Land[y, x] = 0) and |
|
1065 (((Land[y, x-1] <> 0) and ((Land[y+1,x]<>0)) or (Land[y-1,x]<>0)) or |
|
1066 ((Land[y, x+1] <> 0) and ((Land[y-1,x]<>0) or (Land[y+1,x]<>0)))) then |
|
1067 begin |
|
1068 if Land[y, x-1] <> 0 then LandPixels[y, x]:= LandPixels[y, x-1] |
|
1069 else if Land[y, x+1] <> 0 then LandPixels[y, x]:= LandPixels[y, x+1]; |
|
1070 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift) |
|
1071 end |
|
1072 else if (Land[y, x] = 0) and |
|
1073 (((Land[y, x-1] <> 0) and (Land[y+1,x-1]<>0) and (Land[y+2,x]<>0)) or |
|
1074 ((Land[y, x-1] <> 0) and (Land[y-1,x-1]<>0) and (Land[y-2,x]<>0)) or |
|
1075 ((Land[y, x+1] <> 0) and (Land[y+1,x+1]<>0) and (Land[y+2,x]<>0)) or |
|
1076 ((Land[y, x+1] <> 0) and (Land[y-1,x+1]<>0) and (Land[y-2,x]<>0)) or |
|
1077 ((Land[y+1, x] <> 0) and (Land[y+1,x+1]<>0) and (Land[y,x+2]<>0)) or |
|
1078 ((Land[y-1, x] <> 0) and (Land[y-1,x+1]<>0) and (Land[y,x+2]<>0)) or |
|
1079 ((Land[y+1, x] <> 0) and (Land[y+1,x-1]<>0) and (Land[y,x-2]<>0)) or |
|
1080 ((Land[y-1, x] <> 0) and (Land[y-1,x-1]<>0) and (Land[y,x-2]<>0))) then |
|
1081 begin |
|
1082 if Land[y, x-1] <> 0 then LandPixels[y, x]:= LandPixels[y, x-1] |
|
1083 else if Land[y, x+1] <> 0 then LandPixels[y, x]:= LandPixels[y, x+1] |
|
1084 else if Land[y+1, x] <> 0 then LandPixels[y, x]:= LandPixels[y+1, x] |
|
1085 else if Land[y-1, x] <> 0 then LandPixels[y, x]:= LandPixels[y-1, x]; |
|
1086 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift) |
|
1087 end; |
1061 AddProgress(); |
1088 AddProgress(); |
1062 end; |
1089 end; |
1063 |
1090 |
1064 procedure MakeFortsMap; |
1091 procedure MakeFortsMap; |
1065 var tmpsurf: PSDL_Surface; |
1092 var tmpsurf: PSDL_Surface; |