equal
deleted
inserted
replaced
91 {$ELSE} |
91 {$ELSE} |
92 if LandPixels[cpY + y, cpX + x] = 0 then |
92 if LandPixels[cpY + y, cpX + x] = 0 then |
93 LandPixels[cpY + y, cpX + x]:= p^[x]; |
93 LandPixels[cpY + y, cpX + x]:= p^[x]; |
94 {$ENDIF} |
94 {$ENDIF} |
95 if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then |
95 if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then |
96 Land[cpY + y, cpX + x]:= LAND_OBJECT |
96 Land[cpY + y, cpX + x]:= lfObject |
97 end; |
97 end; |
98 p:= @(p^[Image^.pitch shr 2]) |
98 p:= @(p^[Image^.pitch shr 2]) |
99 end; |
99 end; |
100 |
100 |
101 if SDL_MustLock(Image) then |
101 if SDL_MustLock(Image) then |
236 function CheckCanPlace(x, y: Longword; var Obj: TThemeObject): boolean; |
236 function CheckCanPlace(x, y: Longword; var Obj: TThemeObject): boolean; |
237 var i: Longword; |
237 var i: Longword; |
238 bRes: boolean; |
238 bRes: boolean; |
239 begin |
239 begin |
240 with Obj do |
240 with Obj do |
241 if CheckLand(inland, x, y, LAND_BASIC) then |
241 if CheckLand(inland, x, y, lfBasic) then |
242 begin |
242 begin |
243 bRes:= true; |
243 bRes:= true; |
244 i:= 1; |
244 i:= 1; |
245 while bRes and (i <= rectcnt) do |
245 while bRes and (i <= rectcnt) do |
246 begin |
246 begin |
316 r.w:= Width; |
316 r.w:= Width; |
317 r.h:= Height + 16; |
317 r.h:= Height + 16; |
318 repeat |
318 repeat |
319 y:= 8; |
319 y:= 8; |
320 repeat |
320 repeat |
321 if CheckLand(r, x, y - 8, LAND_BASIC) |
321 if CheckLand(r, x, y - 8, lfBasic) |
322 and not CheckIntersect(x, y, Width, Height) then |
322 and not CheckIntersect(x, y, Width, Height) then |
323 begin |
323 begin |
324 ar[cnt].x:= x; |
324 ar[cnt].x:= x; |
325 ar[cnt].y:= y; |
325 ar[cnt].y:= y; |
326 inc(cnt); |
326 inc(cnt); |