Une-realite-trop-belle-pour.../src/animation.h

25 lines
708 B
C

#ifndef ANIMATION_H
#define ANIMATION_H
/* Structure */
typedef struct {
int anim_frame; /* Which frame of animation we're on. */
int anim_max; /* How many frame does the animation has. */
int delay_elapsed; /* How many time elapsed since the last time the
animation frame was updated */
int delay_max; /* How many frames elapse between to frames of the
animation */
int amount_anim_done; /* How many times the animation looped. */
} Anim;
/* Functions */
/* void aframe_done(Anim *anim);
Updates the Anim struct. should be called at the end of the game loop.
*/
void aframe_done(Anim *anim);
#endif