83 |
83 |
84 p:= Image^.pixels; |
84 p:= Image^.pixels; |
85 for y:= 0 to Pred(Image^.h) do |
85 for y:= 0 to Pred(Image^.h) do |
86 begin |
86 begin |
87 for x:= 0 to Pred(Width) do |
87 for x:= 0 to Pred(Width) do |
88 begin |
88 if (p^[x] and AMask) <> 0 then |
|
89 begin |
89 if (cReducedQuality and rqBlurryLand) = 0 then |
90 if (cReducedQuality and rqBlurryLand) = 0 then |
90 begin |
91 begin |
91 if (LandPixels[cpY + y, cpX + x] = 0) or |
92 if (LandPixels[cpY + y, cpX + x] = 0) or |
92 (((p^[x] and AMask) <> 0) and (((LandPixels[cpY + y, cpX + x] and AMask) shr AShift) < 255)) then |
93 (((p^[x] and AMask) <> 0) and (((LandPixels[cpY + y, cpX + x] and AMask) shr AShift) < 255)) then |
93 LandPixels[cpY + y, cpX + x]:= p^[x]; |
94 LandPixels[cpY + y, cpX + x]:= p^[x]; |
94 end |
95 end |
95 else |
96 else |
96 if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then |
97 if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then |
97 LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; |
98 LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; |
98 |
99 |
99 |
100 if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then |
100 if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then |
101 begin |
101 begin |
102 Land[cpY + y, cpX + x]:= lfObject; |
102 Land[cpY + y, cpX + x]:= lfObject; |
103 Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags |
103 Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags |
104 end; |
104 end; |
105 end; |
105 end; |
|
106 p:= @(p^[Image^.pitch shr 2]) |
106 p:= @(p^[Image^.pitch shr 2]) |
107 end; |
107 end; |
108 |
108 |
109 if SDL_MustLock(Image) then |
109 if SDL_MustLock(Image) then |
110 SDL_UnlockSurface(Image); |
110 SDL_UnlockSurface(Image); |