hedgewars/uLandGraphics.pas
changeset 495 62c1c2b4414c
parent 409 4f1841929ccc
child 504 13b6ebc53627
equal deleted inserted replaced
494:503758a35c02 495:62c1c2b4414c
   267 if SDL_MustLock(LandSurface) then
   267 if SDL_MustLock(LandSurface) then
   268    SDL_UnlockSurface(LandSurface)
   268    SDL_UnlockSurface(LandSurface)
   269 end;
   269 end;
   270 
   270 
   271 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): boolean;
   271 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): boolean;
   272 var Result: boolean;
   272 var X, Y, bpp, h, w: LongInt;
   273     X, Y, sY, bpp, h, w: LongInt;
       
   274     p: PByteArray;
   273     p: PByteArray;
   275     r, rr: TSDL_Rect;
   274     r, rr: TSDL_Rect;
   276     Image: PSDL_Surface;
   275     Image: PSDL_Surface;
   277 begin
   276 begin
   278 Result:= true;
       
   279 Image:= SpritesData[Obj].Surface;
   277 Image:= SpritesData[Obj].Surface;
   280 w:= SpritesData[Obj].Width;
   278 w:= SpritesData[Obj].Width;
   281 h:= SpritesData[Obj].Height; 
   279 h:= SpritesData[Obj].Height; 
   282 
   280 
   283 if SDL_MustLock(Image) then
   281 if SDL_MustLock(Image) then