18#include "allegro5/allegro.h"
30 unsigned int duration ;
unsigned int nb_frames
nb frames in anim
unsigned int type
blit type: masked with color, blended, brut
unsigned int w
width of a frame
unsigned int elapsed
elapsed time since last frame change
char * name
name of the anim library
ANIM_GFX ** gfxs
Stack of gfxs.
unsigned int h
height of a frame
ANIM_FRAME * frames
each frame properties
unsigned int y
y coordinate of the animation
unsigned int frame
id of the current frame
ALLEGRO_BITMAP * bmp
bitmap with a list of lil' bitmap inside
unsigned int x
x coordinate of the animation
ANIM_LIB * lib
pointer to an anim gfx library
unsigned int nb_max_gfxs
size of the stack
int delete_bmp_from_lib(ANIM_LIB *lib, unsigned int id)
Delete the frame at 'id' from 'lib'.
int add_bmp_to_lib(ANIM_LIB *lib, unsigned int pos, char *file, char *resfile)
add a bitmap to a ANIM_LIB *lib
int draw_anim(ANIM_DATA *data, int x, int y)
blit an ANIM_DATA at position x,y ( current selected video buffer is used )
ANIM_LIB * create_anim_library(char *name, unsigned int size)
Allocate an animation library.
int update_anim(ANIM_DATA *data, unsigned int delta_t)
compute and update an ANIM_DATA context based on elapsed delta_t time in usecs
int destroy_anim_lib(ANIM_LIB **lib)
Destroy an animation library.
struct of the properties of a frame in an animation
structure of a library of gfxs
Common headers and low-level hugly functions & define.
N_STR and string function declaration.