any good way to write sprite/animation classes for a game?
I need a better way of controlling my sprites in my game.
My typical character will have movment animations along still sprites for direction.
I wrote my sprite/animation classes like this:
SpriteControl, you only need one of these per bitmap file
- this is meant for a whole bunch of sprites to be in one bitmap file
-feed it a filename for the bitmap.
- you must feed it a Sprite array, an array of X,Y,Width,Height postions for all the sprites in the file
- you tell it to draw sprite(x) where X is one of the positions on the array.
AnimationControl, feed it a pointer of the above
-feed it a pointer to an initialized SpriteControl class, along with an array of numbers, numbers that point to positions on the Sprite array (see above)
- tell it to draw the animation (with loop, backwards, and pause capabilities)
and thats all I have, is there a better way to do this?
I am using allegro.