equal
deleted
inserted
replaced
264 end; |
264 end; |
265 |
265 |
266 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt); |
266 procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt); |
267 var row, col, numFramesFirstCol: LongInt; |
267 var row, col, numFramesFirstCol: LongInt; |
268 begin |
268 begin |
|
269 if SpritesData[Sprite].imageHeight = 0 then exit; |
269 numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height; |
270 numFramesFirstCol:= SpritesData[Sprite].imageHeight div SpritesData[Sprite].Height; |
270 row:= Frame mod numFramesFirstCol; |
271 row:= Frame mod numFramesFirstCol; |
271 col:= Frame div numFramesFirstCol; |
272 col:= Frame div numFramesFirstCol; |
272 DrawSprite2 (Sprite, X, Y, col, row); |
273 DrawSprite2 (Sprite, X, Y, col, row); |
273 end; |
274 end; |