#define MAX_SPRITE_SURFACES 50 #define MAX_SPRITE 50 #define MAX_NAME_LENGHT 30 #define MAX_ANIM 10 struct sprite { SDL_Surface *sprite_surface[MAX_ANIM]; //pointeur vers l'affichage SDL_Rect sprite_rect[MAX_ANIM]; // endroit ou doit etre afficher le sprite int nb[MAX_ANIM]; // nombres d'images int h[MAX_ANIM]; //hauteur d'une image int w[MAX_ANIM]; // largeur d'une image void *(*func)(void *arg); // fonction qui gere le sprite pthread_t tsprite; //utilise ou non en fonction de pthread_bool SDL_Surface *sprite_surf[MAX_ANIM][MAX_SPRITE_SURFACES]; int numero; // numero du sprite int anim_active; int surf_active[MAX_ANIM]; //definie la surface active unsigned short exe; int nb_anim; float alpha; int direction; int distance; int dammage; int speed; }; struct display { struct sprite *sprite_all[MAX_SPRITE]; struct level *lvl; int nb_sprites; unsigned short exe; pthread_t tdisplay; SDL_Surface *screen;//surface principale d'affichage SDL_Rect zone; SDL_mutex *mutex; };