equal
deleted
inserted
replaced
599 h:= SpritesData[Obj].Height; |
599 h:= SpritesData[Obj].Height; |
600 row:= Frame mod numFramesFirstCol; |
600 row:= Frame mod numFramesFirstCol; |
601 col:= Frame div numFramesFirstCol; |
601 col:= Frame div numFramesFirstCol; |
602 |
602 |
603 if SDL_MustLock(Image) then |
603 if SDL_MustLock(Image) then |
604 SDLTry(SDL_LockSurface(Image) >= 0, true); |
604 SDLTry(SDL_LockSurface(Image) >= 0, 'SDL_LockSurface', true); |
605 |
605 |
606 bpp:= Image^.format^.BytesPerPixel; |
606 bpp:= Image^.format^.BytesPerPixel; |
607 TryDo(bpp = 4, 'It should be 32 bpp sprite', true); |
607 TryDo(bpp = 4, 'It should be 32 bpp sprite', true); |
608 // Check that sprite fits free space |
608 // Check that sprite fits free space |
609 p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]); |
609 p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]); |