Use enums for most of the rest of the game constants.

This adds an "enum map" type that allows safe usage of an enum to index an array.
(That is, it enforces that the index is of the enum type.)
This commit is contained in:
2019-11-23 21:12:47 -05:00
parent 0001f754ac
commit 4f785e2650
19 changed files with 287 additions and 209 deletions

View File

@@ -29,8 +29,9 @@
#include "winutil.hpp"
#include "res_image.hpp"
extern short stat_window,store_spell_target,which_combat_type,combat_active_pc;
extern short store_spell_target,which_combat_type,combat_active_pc;
extern eGameMode overall_mode;
extern eItemWinMode stat_window;
extern location center;
extern sf::RenderWindow mainPtr;
extern short store_current_pc,current_ground;
@@ -704,7 +705,7 @@ void start_town_combat(eDirection direction) {
center = univ.current_pc().combat_pos;
draw_buttons(0);
put_pc_screen();
set_stat_window(univ.cur_pc);
set_stat_window_for_pc(univ.cur_pc);
give_help(48,49);
}