#ifndef CONSTANTES_H #define CONSTANTES_H #define JOUER 0 #define OPTIONS 1 #define QUITTER 2 enum character_class_t { CLASS_INVAL = -1, CLASS_PALADIN, CLASS_PRIEST, CLASS_THIEF, /* XXX add new ally classes here * -> */ CLASS_ALLY_CNT, CLASS_WARRIOR_GOBELIN = CLASS_ALLY_CNT, /* XXX add new enemy classes here * -> */ CLASS_CNT, CLASS_ENEMY_CNT = CLASS_CNT - CLASS_ALLY_CNT, }; #define MORT 0 enum element_t { ELEM_FIRE, ELEM_ICE, ELEM_WATER, ELEM_THUNDER, ELEM_COUNT, ELEM_NONE = ELEM_COUNT, }; enum affinity_t { AFFIN_ABSORPTION, AFFIN_INVULN, AFFIN_RESISTANCE, AFFIN_NONE, AFFIN_SENSITIVE, AFFIN_COUNT, }; #define POTION 0 #define ETHER 1 #define POTIONPLUS 2 #define ETHERPLUS 3 #define ALLIE 1 #define ENNEMI 0 enum damages_type_t { DAMAGES_PHYSICAL, DAMAGES_MAGICAL, }; enum action_state_t { ACTION_PERFORMED, ACTION_CANCELED, ACTION_ERROR, ACTION_COUNT, }; enum target_type_t { TARGET_SINGLE_ALLY = 0x1, TARGET_SINGLE_ENEMY = TARGET_SINGLE_ALLY << 0x1, TARGET_TEAM_ALLY = TARGET_SINGLE_ENEMY << 0x1, TARGET_TEAM_ENEMY = TARGET_TEAM_ALLY << 0x1, TARGET_SELF = TARGET_TEAM_ENEMY << 0x1, TARGET_ALL = TARGET_SELF << 0x1, TARGET_SINGLE = TARGET_SINGLE_ALLY | TARGET_SINGLE_ENEMY, TARGET_TEAM = TARGET_TEAM_ALLY | TARGET_TEAM_ENEMY, }; //map #define SOL 0 #define MUR 1 #define COFFRE 2 #define GUS 3 #define countof(_array) ((int)(sizeof((_array)) / sizeof((_array)[0]))) #include #define inverse_boolean(_b) ((_b) = (((_b)) ? false : true)) #endif