#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 { ELEMENT_FIRE, ELEMENT_ICE, ELEMENT_WATER, ELEMENT_THUNDER, ELEMENT_COUNT, ELEMENT_NONE = ELEMENT_COUNT, }; enum affinity_t { AFFINITY_ABSORPTION, AFFINITY_INVULNERABILITY, AFFINITY_RESISTANCE, AFFINITY_NONE, AFFINITY_SENSITIVE, AFFINITY_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