144 var i: LongInt; |
144 var i: LongInt; |
145 begin |
145 begin |
146 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
146 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
147 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
147 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
148 if (not isMap and ((Land[y + dy, i] and lfIndestructible) = 0)) or ((Land[y + dy, i] and lfBasic) <> 0) then |
148 if (not isMap and ((Land[y + dy, i] and lfIndestructible) = 0)) or ((Land[y + dy, i] and lfBasic) <> 0) then |
149 {$IFDEF DOWNSCALE} |
149 if (cReducedQuality and rqBlurryLand) = 0 then |
150 LandPixels[(y + dy) div 2, i div 2]:= 0; |
150 LandPixels[y + dy, i]:= 0 |
151 {$ELSE} |
151 else |
152 LandPixels[y + dy, i]:= 0; |
152 LandPixels[(y + dy) div 2, i div 2]:= 0; |
153 {$ENDIF} |
153 |
154 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
154 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
155 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
155 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
156 if (not isMap and ((Land[y - dy, i] and lfIndestructible) = 0)) or ((Land[y - dy, i] and lfBasic) <> 0) then |
156 if (not isMap and ((Land[y - dy, i] and lfIndestructible) = 0)) or ((Land[y - dy, i] and lfBasic) <> 0) then |
157 {$IFDEF DOWNSCALE} |
157 if (cReducedQuality and rqBlurryLand) = 0 then |
158 LandPixels[(y - dy) div 2, i div 2]:= 0; |
158 LandPixels[y - dy, i]:= 0 |
159 {$ELSE} |
159 else |
160 LandPixels[y - dy, i]:= 0; |
160 LandPixels[(y - dy) div 2, i div 2]:= 0; |
161 {$ENDIF} |
161 |
162 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
162 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
163 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
163 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
164 if (not isMap and ((Land[y + dx, i] and lfIndestructible) = 0)) or ((Land[y + dx, i] and lfBasic) <> 0) then |
164 if (not isMap and ((Land[y + dx, i] and lfIndestructible) = 0)) or ((Land[y + dx, i] and lfBasic) <> 0) then |
165 {$IFDEF DOWNSCALE} |
165 if (cReducedQuality and rqBlurryLand) = 0 then |
166 LandPixels[(y + dx) div 2, i div 2]:= 0; |
166 LandPixels[y + dx, i]:= 0 |
167 {$ELSE} |
167 else |
168 LandPixels[y + dx, i]:= 0; |
168 LandPixels[(y + dx) div 2, i div 2]:= 0; |
169 {$ENDIF} |
169 |
170 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
170 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
171 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
171 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
172 if (not isMap and ((Land[y - dx, i] and lfIndestructible) = 0)) or ((Land[y - dx, i] and lfBasic) <> 0) then |
172 if (not isMap and ((Land[y - dx, i] and lfIndestructible) = 0)) or ((Land[y - dx, i] and lfBasic) <> 0) then |
173 {$IFDEF DOWNSCALE} |
173 if (cReducedQuality and rqBlurryLand) = 0 then |
174 LandPixels[(y - dx) div 2, i div 2]:= 0; |
174 LandPixels[y - dx, i]:= 0 |
175 {$ELSE} |
175 else |
176 LandPixels[y - dx, i]:= 0; |
176 LandPixels[(y - dx) div 2, i div 2]:= 0; |
177 {$ENDIF} |
177 |
178 end; |
178 end; |
179 |
179 |
180 procedure FillLandCircleLinesBG(x, y, dx, dy: LongInt); |
180 procedure FillLandCircleLinesBG(x, y, dx, dy: LongInt); |
181 var i: LongInt; |
181 var i: LongInt; |
182 begin |
182 begin |
183 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
183 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
184 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
184 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
185 if ((Land[y + dy, i] and lfBasic) <> 0) then |
185 if ((Land[y + dy, i] and lfBasic) <> 0) then |
186 {$IFDEF DOWNSCALE} |
186 if (cReducedQuality and rqBlurryLand) = 0 then |
187 LandPixels[(y + dy) div 2, i div 2]:= LandBackPixel(i, y + dy) |
187 LandPixels[y + dy, i]:= LandBackPixel(i, y + dy) |
188 {$ELSE} |
188 else |
189 LandPixels[y + dy, i]:= LandBackPixel(i, y + dy) |
189 LandPixels[(y + dy) div 2, i div 2]:= LandBackPixel(i, y + dy) |
190 {$ENDIF} |
|
191 else |
190 else |
192 {$IFDEF DOWNSCALE} |
191 if ((Land[y + dy, i] and lfObject) <> 0) then |
193 if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[(y + dy) div 2, i div 2]:= 0; |
192 if (cReducedQuality and rqBlurryLand) = 0 then |
194 {$ELSE} |
193 LandPixels[y + dy, i]:= 0 |
195 if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[y + dy, i]:= 0; |
194 else |
196 {$ENDIF} |
195 LandPixels[(y + dy) div 2, i div 2]:= 0; |
|
196 |
197 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
197 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
198 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
198 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
199 if ((Land[y - dy, i] and lfBasic) <> 0) then |
199 if ((Land[y - dy, i] and lfBasic) <> 0) then |
200 {$IFDEF DOWNSCALE} |
200 if (cReducedQuality and rqBlurryLand) = 0 then |
201 LandPixels[(y - dy) div 2, i div 2]:= LandBackPixel(i, y - dy) |
201 LandPixels[y - dy, i]:= LandBackPixel(i, y - dy) |
202 {$ELSE} |
202 else |
203 LandPixels[y - dy, i]:= LandBackPixel(i, y - dy) |
203 LandPixels[(y - dy) div 2, i div 2]:= LandBackPixel(i, y - dy) |
204 {$ENDIF} |
|
205 else |
204 else |
206 {$IFDEF DOWNSCALE} |
205 if ((Land[y - dy, i] and lfObject) <> 0) then |
207 if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[(y - dy) div 2, i div 2]:= 0; |
206 if (cReducedQuality and rqBlurryLand) = 0 then |
208 {$ELSE} |
207 LandPixels[y - dy, i]:= 0 |
209 if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[y - dy, i]:= 0; |
208 else |
210 {$ENDIF} |
209 LandPixels[(y - dy) div 2, i div 2]:= 0; |
|
210 |
211 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
211 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
212 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
212 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
213 if ((Land[y + dx, i] and lfBasic) <> 0) then |
213 if ((Land[y + dx, i] and lfBasic) <> 0) then |
214 {$IFDEF DOWNSCALE} |
214 if (cReducedQuality and rqBlurryLand) = 0 then |
|
215 LandPixels[y + dx, i]:= LandBackPixel(i, y + dx) |
|
216 else |
215 LandPixels[(y + dx) div 2, i div 2]:= LandBackPixel(i, y + dx) |
217 LandPixels[(y + dx) div 2, i div 2]:= LandBackPixel(i, y + dx) |
216 {$ELSE} |
|
217 LandPixels[y + dx, i]:= LandBackPixel(i, y + dx) |
|
218 {$ENDIF} |
|
219 else |
218 else |
220 {$IFDEF DOWNSCALE} |
219 if ((Land[y + dx, i] and lfObject) <> 0) then |
221 if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[(y + dx) div 2, i div 2]:= 0; |
220 if (cReducedQuality and rqBlurryLand) = 0 then |
222 {$ELSE} |
221 LandPixels[y + dx, i]:= 0 |
223 if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[y + dx, i]:= 0; |
222 else |
224 {$ENDIF} |
223 LandPixels[(y + dx) div 2, i div 2]:= 0; |
|
224 |
225 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
225 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
226 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
226 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
227 if ((Land[y - dx, i] and lfBasic) <> 0) then |
227 if ((Land[y - dx, i] and lfBasic) <> 0) then |
228 {$IFDEF DOWNSCALE} |
228 if (cReducedQuality and rqBlurryLand) = 0 then |
229 LandPixels[(y - dx) div 2, i div 2]:= LandBackPixel(i, y - dx) |
|
230 {$ELSE} |
|
231 LandPixels[y - dx, i]:= LandBackPixel(i, y - dx) |
229 LandPixels[y - dx, i]:= LandBackPixel(i, y - dx) |
232 {$ENDIF} |
230 else |
|
231 LandPixels[(y - dx) div 2, i div 2]:= LandBackPixel(i, y - dx) |
|
232 |
233 else |
233 else |
234 {$IFDEF DOWNSCALE} |
234 if ((Land[y - dx, i] and lfObject) <> 0) then |
235 if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[(y - dx) div 2, i div 2]:= 0; |
235 if (cReducedQuality and rqBlurryLand) = 0 then |
236 {$ELSE} |
236 LandPixels[y - dx, i]:= 0 |
237 if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[y - dx, i]:= 0; |
237 else |
238 {$ENDIF} |
238 LandPixels[(y - dx) div 2, i div 2]:= 0; |
|
239 |
239 end; |
240 end; |
240 |
241 |
241 procedure FillLandCircleLinesEBC(x, y, dx, dy: LongInt); |
242 procedure FillLandCircleLinesEBC(x, y, dx, dy: LongInt); |
242 var i: LongInt; |
243 var i: LongInt; |
243 begin |
244 begin |
244 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
245 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
245 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
246 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
246 if ((Land[y + dy, i] and lfBasic) <> 0) or ((Land[y + dy, i] and lfObject) <> 0) then |
247 if ((Land[y + dy, i] and lfBasic) <> 0) or ((Land[y + dy, i] and lfObject) <> 0) then |
247 begin |
248 begin |
248 {$IFDEF DOWNSCALE} |
249 if (cReducedQuality and rqBlurryLand) = 0 then |
249 LandPixels[(y + dy) div 2, i div 2]:= cExplosionBorderColor; |
250 LandPixels[y + dy, i]:= cExplosionBorderColor |
250 {$ELSE} |
251 else |
251 LandPixels[y + dy, i]:= cExplosionBorderColor; |
252 LandPixels[(y + dy) div 2, i div 2]:= cExplosionBorderColor; |
252 {$ENDIF} |
253 |
253 Land[y + dy, i]:= Land[y + dy, i] or lfDamaged; |
254 Land[y + dy, i]:= Land[y + dy, i] or lfDamaged; |
254 Despeckle(i, y + dy); |
255 Despeckle(i, y + dy); |
255 LandDirty[(y + dy) div 32, i div 32]:= 1; |
256 LandDirty[(y + dy) div 32, i div 32]:= 1; |
256 end; |
257 end; |
257 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
258 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
258 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
259 for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do |
259 if ((Land[y - dy, i] and lfBasic) <> 0) or ((Land[y - dy, i] and lfObject) <> 0) then |
260 if ((Land[y - dy, i] and lfBasic) <> 0) or ((Land[y - dy, i] and lfObject) <> 0) then |
260 begin |
261 begin |
261 {$IFDEF DOWNSCALE} |
262 if (cReducedQuality and rqBlurryLand) = 0 then |
262 LandPixels[(y - dy) div 2, i div 2]:= cExplosionBorderColor; |
263 LandPixels[y - dy, i]:= cExplosionBorderColor |
263 {$ELSE} |
264 else |
264 LandPixels[y - dy, i]:= cExplosionBorderColor; |
265 LandPixels[(y - dy) div 2, i div 2]:= cExplosionBorderColor; |
265 {$ENDIF} |
|
266 Land[y - dy, i]:= Land[y - dy, i] or lfDamaged; |
266 Land[y - dy, i]:= Land[y - dy, i] or lfDamaged; |
267 Despeckle(i, y - dy); |
267 Despeckle(i, y - dy); |
268 LandDirty[(y - dy) div 32, i div 32]:= 1; |
268 LandDirty[(y - dy) div 32, i div 32]:= 1; |
269 end; |
269 end; |
270 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
270 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
271 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
271 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
272 if ((Land[y + dx, i] and lfBasic) <> 0) or ((Land[y + dx, i] and lfObject) <> 0) then |
272 if ((Land[y + dx, i] and lfBasic) <> 0) or ((Land[y + dx, i] and lfObject) <> 0) then |
273 begin |
273 begin |
274 {$IFDEF DOWNSCALE} |
274 if (cReducedQuality and rqBlurryLand) = 0 then |
|
275 LandPixels[y + dx, i]:= cExplosionBorderColor |
|
276 else |
275 LandPixels[(y + dx) div 2, i div 2]:= cExplosionBorderColor; |
277 LandPixels[(y + dx) div 2, i div 2]:= cExplosionBorderColor; |
276 {$ELSE} |
278 |
277 LandPixels[y + dx, i]:= cExplosionBorderColor; |
|
278 {$ENDIF} |
|
279 Land[y + dx, i]:= Land[y + dx, i] or lfDamaged; |
279 Land[y + dx, i]:= Land[y + dx, i] or lfDamaged; |
280 Despeckle(i, y + dx); |
280 Despeckle(i, y + dx); |
281 LandDirty[(y + dx) div 32, i div 32]:= 1; |
281 LandDirty[(y + dx) div 32, i div 32]:= 1; |
282 end; |
282 end; |
283 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
283 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
284 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
284 for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do |
285 if ((Land[y - dx, i] and lfBasic) <> 0) or ((Land[y - dx, i] and lfObject) <> 0) then |
285 if ((Land[y - dx, i] and lfBasic) <> 0) or ((Land[y - dx, i] and lfObject) <> 0) then |
286 begin |
286 begin |
287 {$IFDEF DOWNSCALE} |
287 if (cReducedQuality and rqBlurryLand) = 0 then |
|
288 LandPixels[y - dx, i]:= cExplosionBorderColor |
|
289 else |
288 LandPixels[(y - dx) div 2, i div 2]:= cExplosionBorderColor; |
290 LandPixels[(y - dx) div 2, i div 2]:= cExplosionBorderColor; |
289 {$ELSE} |
291 |
290 LandPixels[y - dx, i]:= cExplosionBorderColor; |
|
291 {$ENDIF} |
|
292 Land[y - dx, i]:= Land[y - dx, i] or lfDamaged; |
292 Land[y - dx, i]:= Land[y - dx, i] or lfDamaged; |
293 Despeckle(i, y - dy); |
293 Despeckle(i, y - dy); |
294 LandDirty[(y - dx) div 32, i div 32]:= 1; |
294 LandDirty[(y - dx) div 32, i div 32]:= 1; |
295 end; |
295 end; |
296 end; |
296 end; |