newbie sprite class question
Im starting to do animation and stuff like that and want to make a sprite walk around on a background but am not sure how to set up the class. In Lamothes Tips of the windows game programming gurus he makes a very simple struct like.
struct sprite
{
LPDIRECTDRAWSURFACE frame[3];
int x,y;
int velocity;
int currframe;
int counter;
};
But what if I want to make a sprite with more that 3 frames of animation. I also want to make the frames RECT to save on video mem so the rects just point to a template on a surface. Someone had told me to make something like
RECT *frame;
but how do I make 4 or 9 frames?
And how would I make it so when the up arrow is pressed a certain animation is played and when the right arrow is pressed a different animation is played?
Please Help
OoMMMoO
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement