1060 ColorizeLand(tmpsurf); |
1060 ColorizeLand(tmpsurf); |
1061 AddOnLandObjects(tmpsurf); |
1061 AddOnLandObjects(tmpsurf); |
1062 |
1062 |
1063 LandSurface2LandPixels(tmpsurf); |
1063 LandSurface2LandPixels(tmpsurf); |
1064 SDL_FreeSurface(tmpsurf); |
1064 SDL_FreeSurface(tmpsurf); |
1065 if (cReducedQuality and rqBlurryLand) = 0 then |
1065 for x:= leftX+2 to rightX-2 do |
1066 for x:= leftX+2 to rightX-2 do |
1066 for y:= topY+2 to LAND_HEIGHT-3 do |
1067 for y:= topY+2 to LAND_HEIGHT-3 do |
1067 if (Land[y, x] = 0) and |
1068 if (Land[y, x] = 0) and |
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)) or |
1069 ((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 |
1070 begin |
1071 begin |
1071 if (cReducedQuality and rqBlurryLand) = 0 then |
|
1072 begin |
1072 if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1] |
1073 if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1] |
1073 else if Land[y, x+1] = lfBasic 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 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift); |
1075 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift) |
1075 Land[y,x]:= lfObject |
1076 end; |
1076 end |
1077 Land[y,x]:= lfObject |
1077 else if (Land[y, x] = 0) and |
1078 end |
1078 (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or |
1079 else if (Land[y, x] = 0) and |
1079 ((Land[y, x-1] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y-2,x] = lfBasic)) or |
1080 (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or |
1080 ((Land[y, x+1] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y+2,x] = lfBasic)) or |
1081 ((Land[y, x-1] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y-2,x] = lfBasic)) or |
1081 ((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 |
1082 ((Land[y+1, x] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or |
1083 ((Land[y, x+1] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y-2,x] = lfBasic)) or |
1083 ((Land[y-1, x] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or |
1084 ((Land[y+1, x] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or |
1084 ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or |
1085 ((Land[y-1, x] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or |
1085 ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then |
1086 ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or |
1086 begin |
1087 ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then |
|
1088 begin |
|
1089 if (cReducedQuality and rqBlurryLand) = 0 then |
|
1090 begin |
1087 if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1] |
1091 if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1] |
1088 else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1] |
1092 else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1] |
1089 else if Land[y+1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y+1, x] |
1093 else if Land[y+1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y+1, x] |
1090 else if Land[y-1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y-1, x]; |
1094 else if Land[y-1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y-1, x]; |
1091 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift); |
1095 LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift) |
1092 Land[y,x]:= lfObject |
1096 end; |
1093 end; |
1097 Land[y,x]:= lfObject |
|
1098 end; |
1094 AddProgress(); |
1099 AddProgress(); |
1095 end; |
1100 end; |
1096 |
1101 |
1097 procedure MakeFortsMap; |
1102 procedure MakeFortsMap; |
1098 var tmpsurf: PSDL_Surface; |
1103 var tmpsurf: PSDL_Surface; |