#ifndef _LEVEL_H_ #define _LEVEL_H_ #include #include typedef struct { enum {Ally, Foe, Zero} side; char * name; char * rank; image_t * picture; int x; int y; int HP; int MP; int ATK; int DEF; }Entity; typedef enum { Forest, Mountain, Path, Cloud, }Tile_type; typedef struct { Tile_type type; Entity * entity; }Tile; typedef struct { int width; int height; Tile * tile; }Map; typedef struct { enum {Text, Art} type; union { const char * text; image_t * art; }; }Slide; typedef struct Engine{ Map * map; int nb_event; int event_pos; struct Event{ int turn; void (*ev_func)(struct Engine *); char * dialog; }*event_list; int nb_entity; Entity * entity_list; int nb_ally; int nb_foe; int turn; int x_cursor; int y_cursor; int x_view; int y_view; bool victory; bool defeat; }Engine; typedef struct { int turn; void (*ev_func)(struct Engine *); char * dialog; }Event; typedef struct { int nb_pro, nb_event, nb_epi; Slide * prologue; Event * event_list; Slide * epilogue; }Script; typedef struct { char * name; image_t * art; char * description; Map * map; int nb_entity; Entity * entity_list; Script * script; }Level; #endif // _LEVEL_H_