capitalized all enums
This commit is contained in:
@ -8,12 +8,10 @@
|
||||
|
||||
static const int INF = 0x3F3F3F3F;
|
||||
|
||||
// TODO: update result to include subject
|
||||
// fine will waste a turn
|
||||
enum result : int {fine, died, go_down, go_up, hit, moved,
|
||||
miss, terminate, applied, applied_nothing,
|
||||
toggle_the_world, restart_game, unknown,
|
||||
inventory, thrown
|
||||
enum result : int {NOTHING, DIED, GO_DOWN, GO_UP, HIT, MOVED,
|
||||
MISS, TERMINATE, APPLIED, APPLIED_NOTHING,
|
||||
TOGGLE_THE_WORLD, RESTART_GAME, UNKNOWN,
|
||||
INVENTORY, THROWN
|
||||
};
|
||||
|
||||
struct long_result {
|
||||
@ -21,40 +19,40 @@ struct long_result {
|
||||
std::string msg;
|
||||
};
|
||||
|
||||
enum game_status : int {terminated, main_menu, in_game, options,
|
||||
dead, won, escaped, restart
|
||||
enum game_status : int {TERMINATED, MAIN_MENU, IN_GAME, OPTIONS,
|
||||
DEAD, WON, ESCAPED, RESTART
|
||||
};
|
||||
|
||||
enum game_command : int {game_command_terminate = 0,
|
||||
move_north, move_south, move_east, move_west,
|
||||
move_northeast, move_northwest,
|
||||
move_southeast, move_southwest,
|
||||
apply_north, apply_south, apply_east, apply_west,
|
||||
apply_northeast, apply_northwest,
|
||||
apply_southeast, apply_southwest,
|
||||
apply_panic, // for curses_input specifically
|
||||
attack_north, attack_south, attack_east, attack_west,
|
||||
attack_northeast, attack_northwest,
|
||||
attack_southeast, attack_southwest,
|
||||
up_stairs, down_stairs,
|
||||
the_world, game_restart,
|
||||
game_command_pass, game_command_panic,
|
||||
enter, toggle_inventory,
|
||||
throw_north, throw_south, throw_east, throw_west,
|
||||
throw_northeast, throw_northwest,
|
||||
throw_southeast, throw_southwest,
|
||||
select_shade, select_drow, select_vampire,
|
||||
select_goblin, select_troll
|
||||
enum game_command : int {GAME_COMMAND_TERMINATE = 0,
|
||||
MOVE_NORTH, MOVE_SOUTH, MOVE_EAST, MOVE_WEAT,
|
||||
MOVE_NORTHEAST, MOVE_NORTHWEST,
|
||||
MOVE_SOUTHEAST, MOVE_SOUTHWEST,
|
||||
APPLY_NORTH, APPLY_SOUTH, APPLY_EAST, APPLY_WEST,
|
||||
APPLY_NORTHEAST, APPLY_NORTHWEST,
|
||||
APPLY_SOUTHEAST, APPLY_SOUTHWEST,
|
||||
APPLY_PANIC, // for curses_input specifically
|
||||
ATTACK_NORTH, ATTACK_SOUTH, ATTACK_EAST, ATTACK_WEST,
|
||||
ATTACK_NORTHEAST, ATTACK_NORTHWEST,
|
||||
ATTACK_SOUTHEAST, ATTACK_SOUTHWEST,
|
||||
UP_STAIRS, DOWN_STAIRS,
|
||||
THE_WORLD, GAME_RESTART,
|
||||
GAME_COMMAND_PASS, GAME_COMMAND_PANIC,
|
||||
ENTER, TOGGLE_INVENTORY,
|
||||
THROW_NORTH, THROW_SOUTH, THROW_EAST, THROW_WEST,
|
||||
THROW_NORTHEAST, THROW_NORTHWEST,
|
||||
THROW_SOUTHEAST, THROW_SOUTHWEST,
|
||||
SELECT_SHADE, SELECT_DROW, SELECT_VAMPIRE,
|
||||
SELECT_GOBLIN, SELECT_TROLL
|
||||
};
|
||||
|
||||
// Character generation related
|
||||
static const int RACE_CNT = 23;
|
||||
enum race : int {rshade = 0, rdrow, rvampire, rtroll,
|
||||
rgoblin, rhuman, rdwarf, relf,
|
||||
rorc, rmerchant, rdragon, rhalfling,
|
||||
rt_800, rmr_goose, rmonk, rbrawler,
|
||||
rassassin, rviking, rswordsman,
|
||||
rleprechaun, rwitch, rhacker, rbaby_dragon
|
||||
enum race : int {SHADE = 0, DROW, VAMPIRE, TROLL,
|
||||
GOBLIN, HUMAN, DWARF, ELF,
|
||||
ORC, MERCHANT, DRAGON, HALFLING,
|
||||
RT_800, MR_GOOSE, MONK, BRAWLER,
|
||||
ASSASSIN, VIKING, SWORDSMAN,
|
||||
LEPRECHAUN, WITCH, HACKER, BABY_DRAGON
|
||||
};
|
||||
|
||||
static const char CHAR_REP[RACE_CNT] = {
|
||||
@ -94,12 +92,12 @@ static const fraction STARTING_HR[RACE_CNT] = {
|
||||
// Potion-related
|
||||
static const int POTION_TYPE_CNT = 14;
|
||||
static const int DEFAULT_POTION_TYPE_CNT = 6;
|
||||
enum potion_type : int {restore_health = 0, boost_atk, boost_def,
|
||||
poison_health, wound_atk, wound_def,
|
||||
continuous_restoration, savage_strike,
|
||||
echoing_resilience, tempest_tantrum,
|
||||
bezerk_brew, borrow_life,
|
||||
fine_booze, ironclad_ward
|
||||
enum potion_type : int {RESTORE_HEALTH = 0, BOOST_ATK, BOOST_DEF,
|
||||
POISON_HEALTH, WOUND_ATK, WOUND_DEF,
|
||||
CONTINUOUS_RESTORATION, SAVAGE_STRIKE,
|
||||
ECHOING_RESIL, TEMPEST_TANTRUM,
|
||||
BEZERK_BREW, BORROW_LIFE,
|
||||
FINE_BOOZE, IRONCLAD_WARD
|
||||
};
|
||||
|
||||
// Calculation priorities
|
||||
@ -111,8 +109,8 @@ static const int CALC_LAST = 2;
|
||||
static const int DIRECTION_CNT = 8;
|
||||
// IMPORTANT: east is positive for x and SOUTH is positive for y
|
||||
// initializes all directions to an int
|
||||
enum direction : int { north = 0, south, east, west, northeast,
|
||||
northwest, southeast, southwest
|
||||
enum direction : int { NORTH = 0, SOUTH, EAST, WEST, NORTHEAST,
|
||||
NORTHWEST, SOUTHEAST, SOUTHWEST
|
||||
};
|
||||
|
||||
static const position MOVE[DIRECTION_CNT] = {
|
||||
|
Reference in New Issue
Block a user