Makes an animation from frames inside another image (a sprite sheet), sharing its texture.
imageHandle
Int
x
Int
y
Int
frameWidth
Int
frameHeight
Int
frameCount
Int
Global sheet:Int = b2dLoadImage("Media/sprites.png")
; a 4-frame walk cycle somewhere in the middle of the sheet
Global walk:Int = b2dCreateAnimSubImage(sheet, 64, 32, 32, 32, 4)
b2dDrawAnimImage(walk, 200, 300, (frame / 8) Mod 4)