From 6f612c6e6cf9b20c00fd2f515d3694d2b7f7f444 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 7 Mar 2015 16:55:42 +0100 Subject: Split variables.cc declarations to separate header files - Can now remove externs.h. Yay! - Put a stray option variable into its rightful place in options.hpp --- src/angband.h | 3 +- src/birth.cc | 2 + src/bldg.cc | 1 + src/cave.cc | 2 + src/cmd1.cc | 2 + src/cmd2.cc | 2 + src/cmd3.cc | 2 + src/cmd4.cc | 2 + src/cmd5.cc | 2 + src/cmd6.cc | 2 + src/cmd7.cc | 2 + src/corrupt.cc | 1 + src/dungeon.cc | 2 + src/externs.h | 310 ------------------------------------------- src/files.cc | 2 + src/gen_evol.cc | 1 + src/gen_maze.cc | 1 + src/generate.cc | 1 + src/gods.cc | 2 + src/help.cc | 1 + src/init1.cc | 2 + src/init2.cc | 2 + src/joke.cc | 1 + src/levels.cc | 2 + src/loadsave.cc | 2 + src/lua_bind.cc | 1 + src/main-gcu.c | 1 + src/main-gtk2.c | 1 + src/main-sdl.c | 1 + src/main-win.c | 1 + src/main-x11.c | 1 + src/main.c | 1 + src/melee1.cc | 1 + src/melee2.cc | 1 + src/mimic.cc | 1 + src/modules.cc | 2 + src/monster1.cc | 1 + src/monster2.cc | 1 + src/monster3.cc | 2 + src/notes.cc | 2 + src/object1.cc | 2 + src/object2.cc | 3 +- src/options.cc | 1 + src/options.hpp | 1 + src/powers.cc | 2 + src/q_betwen.cc | 1 + src/q_bounty.cc | 1 + src/q_dragons.cc | 1 + src/q_eol.cc | 1 + src/q_evil.cc | 1 + src/q_fireprof.cc | 1 + src/q_god.cc | 1 + src/q_haunted.cc | 1 + src/q_hobbit.cc | 1 + src/q_invas.cc | 1 + src/q_library.cc | 2 + src/q_main.cc | 1 + src/q_narsil.cc | 1 + src/q_nazgul.cc | 1 + src/q_nirna.cc | 1 + src/q_one.cc | 1 + src/q_poison.cc | 1 + src/q_rand.cc | 1 + src/q_shroom.cc | 1 + src/q_spider.cc | 1 + src/q_thief.cc | 1 + src/q_thrain.cc | 1 + src/q_troll.cc | 1 + src/q_ultrag.cc | 1 + src/q_wight.cc | 1 + src/q_wolves.cc | 1 + src/randart.cc | 2 + src/skills.cc | 2 + src/spells1.cc | 1 + src/spells2.cc | 2 + src/spells3.cc | 1 + src/spells4.cc | 1 + src/spells5.cc | 1 + src/spells6.cc | 1 + src/squelch/condition.cc | 1 + src/squelch/object_status.cc | 1 + src/squelch/rule.cc | 1 + src/squeltch.cc | 2 + src/status.cc | 2 + src/store.cc | 2 + src/tables.cc | 2 +- src/traps.cc | 1 + src/util.cc | 2 + src/variable.cc | 12 +- src/variable.h | 42 ++++++ src/variable.hpp | 272 +++++++++++++++++++++++++++++++++++++ src/wild.cc | 1 + src/wizard1.cc | 2 + src/wizard2.cc | 2 + src/xtra1.cc | 2 + src/xtra2.cc | 2 + 96 files changed, 442 insertions(+), 324 deletions(-) delete mode 100644 src/externs.h create mode 100644 src/variable.h create mode 100644 src/variable.hpp diff --git a/src/angband.h b/src/angband.h index 73aad517..a4646d08 100644 --- a/src/angband.h +++ b/src/angband.h @@ -38,11 +38,10 @@ extern "C" { /* - * Now, include the define's, the type's, and the extern's + * Now, include the defines and the types */ #include "defines.h" #include "types.h" -#include "externs.h" /***** Some copyright messages follow below *****/ diff --git a/src/birth.cc b/src/birth.cc index 3d99258e..b6470e59 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -35,6 +35,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/bldg.cc b/src/bldg.cc index 248a6d4e..bda47667 100644 --- a/src/bldg.cc +++ b/src/bldg.cc @@ -28,6 +28,7 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/cave.cc b/src/cave.cc index 75a5a205..6928abdb 100644 --- a/src/cave.cc +++ b/src/cave.cc @@ -8,6 +8,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include #include diff --git a/src/cmd1.cc b/src/cmd1.cc index 65056cf6..a5c882b9 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -33,6 +33,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "wild.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/cmd2.cc b/src/cmd2.cc index 58c2aacc..60a7dc47 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -29,6 +29,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/cmd3.cc b/src/cmd3.cc index e878c3dc..dd517bf5 100644 --- a/src/cmd3.cc +++ b/src/cmd3.cc @@ -22,6 +22,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/cmd4.cc b/src/cmd4.cc index f5c3ff57..b2c83b9c 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -23,6 +23,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/cmd5.cc b/src/cmd5.cc index 2725f4ea..81e909f3 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -25,6 +25,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "quark.h" #include "wizard2.hpp" #include "xtra1.hpp" diff --git a/src/cmd6.cc b/src/cmd6.cc index 705ef14b..58f231f4 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -30,6 +30,8 @@ #include "store.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.h" +#include "variable.hpp" #include "wild.hpp" #include "wizard2.hpp" #include "xtra1.hpp" diff --git a/src/cmd7.cc b/src/cmd7.cc index e2e3772d..faa5825c 100644 --- a/src/cmd7.cc +++ b/src/cmd7.cc @@ -27,6 +27,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/corrupt.cc b/src/corrupt.cc index 7dc1bdc6..ec5d69be 100644 --- a/src/corrupt.cc +++ b/src/corrupt.cc @@ -1,6 +1,7 @@ #include "angband.h" #include "init1.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/dungeon.cc b/src/dungeon.cc index d640795b..9b66d869 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -55,6 +55,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "wild.hpp" #include "wizard2.hpp" #include "xtra1.hpp" diff --git a/src/externs.h b/src/externs.h deleted file mode 100644 index b2a85aa3..00000000 --- a/src/externs.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Automatically generated "variable" declarations - */ - -extern int max_macrotrigger; -extern char *macro_template; -extern char *macro_modifier_chr; -extern char *macro_modifier_name[MAX_MACRO_MOD]; -extern char *macro_trigger_name[MAX_MACRO_TRIG]; -extern char *macro_trigger_keycode[2][MAX_MACRO_TRIG]; - -/* variable.c */ -extern byte version_major; -extern byte version_minor; -extern byte version_patch; -extern byte sf_major; -extern byte sf_minor; -extern byte sf_patch; -extern u32b sf_when; -extern u16b sf_lives; -extern u16b sf_saves; -extern bool_ arg_wizard; -extern bool_ arg_force_original; -extern bool_ arg_force_roguelike; -extern bool_ character_generated; -extern bool_ character_dungeon; -extern bool_ character_loaded; -extern bool_ character_icky; -extern bool_ character_xtra; -extern u32b seed_flavor; -extern s16b command_cmd; -extern s16b command_arg; -extern s16b command_rep; -extern s16b command_dir; -extern s16b command_wrk; -extern s16b command_new; -extern s32b energy_use; -extern bool_ create_up_stair; -extern bool_ create_down_stair; -extern bool_ create_up_shaft; -extern bool_ create_down_shaft; -extern bool_ msg_flag; -extern bool_ alive; -extern bool_ death; -extern s16b running; -extern s16b resting; -extern s16b cur_hgt; -extern s16b cur_wid; -extern s16b dun_level; -extern s16b old_dun_level; -extern s16b num_repro; -extern s16b object_level; -extern s16b monster_level; -extern s32b turn; -extern s32b old_turn; -extern bool_ wizard; -extern u16b total_winner; -extern u16b has_won; -extern u16b noscore; -extern bool_ inkey_base; -extern bool_ inkey_flag; -extern s16b coin_type; -extern bool_ opening_chest; -extern bool_ shimmer_monsters; -extern bool_ shimmer_objects; -extern bool_ repair_monsters; -extern s16b inven_cnt; -extern s16b equip_cnt; -extern s16b o_max; -extern s16b o_cnt; -extern s16b m_max; -extern s16b m_cnt; -extern s16b hack_m_idx; -extern int total_friends; -extern s32b total_friend_levels; -extern int leaving_quest; -extern char summon_kin_type; -extern bool_ hack_mind; -extern bool_ is_autosave; -extern int artifact_bias; -extern FILE *text_out_file; -extern void (*text_out_hook)(byte a, cptr str); -extern int text_out_indent; -extern bool_ cheat_peek; -extern bool_ cheat_hear; -extern bool_ cheat_room; -extern bool_ cheat_xtra; -extern bool_ cheat_know; -extern bool_ cheat_live; -extern byte hitpoint_warn; -extern byte delay_factor; -extern s16b autosave_freq; -extern bool_ autosave_t; -extern bool_ autosave_l; -extern s16b feeling; -extern s16b rating; -extern bool_ good_item_flag; -extern s16b max_panel_rows, max_panel_cols; -extern s16b panel_row_min, panel_row_max; -extern s16b panel_col_min, panel_col_max; -extern s16b panel_col_prt, panel_row_prt; -extern byte feat_wall_outer; -extern byte feat_wall_inner; -extern s16b floor_type[100]; -extern s16b fill_type[100]; -extern s16b target_who; -extern s16b target_col; -extern s16b target_row; -extern s16b health_who; -extern s16b monster_race_idx; -extern s16b monster_ego_idx; -extern object_type *tracked_object; -extern char player_name[32]; -extern char player_base[32]; -extern char died_from[80]; -extern char history[4][60]; -extern char savefile[1024]; -extern s16b lite_n; -extern s16b lite_y[LITE_MAX]; -extern s16b lite_x[LITE_MAX]; -extern s16b view_n; -extern byte view_y[VIEW_MAX]; -extern byte view_x[VIEW_MAX]; -extern s16b temp_n; -extern byte temp_y[TEMP_MAX]; -extern byte temp_x[TEMP_MAX]; -extern s16b macro__num; -extern char **macro__pat; -extern char **macro__act; -extern bool_ *macro__cmd; -extern char *macro__buf; -extern u32b option_flag[8]; -extern u32b option_mask[8]; -extern u32b window_flag[ANGBAND_TERM_MAX]; -extern u32b window_mask[ANGBAND_TERM_MAX]; -extern term *angband_term[ANGBAND_TERM_MAX]; -extern char angband_term_name[ANGBAND_TERM_MAX][80]; -extern byte angband_color_table[256][4]; -extern cave_type **cave; -extern object_type *o_list; -extern monster_type *m_list; -extern monster_type *km_list; -extern u16b max_real_towns; -extern u16b max_towns; -extern town_type *town_info; -extern s16b alloc_kind_size; -extern alloc_entry *alloc_kind_table; -extern bool_ alloc_kind_table_valid; -extern s16b alloc_race_size; -extern alloc_entry *alloc_race_table; -extern byte misc_to_attr[256]; -extern char misc_to_char[256]; -extern byte tval_to_attr[128]; -extern char tval_to_char[128]; -extern char *keymap_act[KEYMAP_MODES][256]; -extern player_type *p_ptr; -extern player_sex *sp_ptr; -extern player_race *rp_ptr; -extern player_race_mod *rmp_ptr; -extern player_class *cp_ptr; -extern player_spec *spp_ptr; -extern u32b alchemist_known_egos[32]; -extern alchemist_recipe *alchemist_recipes; -extern u32b alchemist_known_artifacts[6]; -extern u32b alchemist_gained; -extern s16b player_hp[PY_MAX_LEVEL]; - -extern artifact_select_flag *a_select_flags; - -extern ability_type *ab_info; - -extern skill_type *s_info; - -extern vault_type *v_info; -extern feature_type *f_info; -extern object_kind *k_info; -extern artifact_type *a_info; -extern ego_item_type *e_info; -extern randart_part_type *ra_info; -extern randart_gen_type ra_gen[30]; -extern monster_race *r_info; -extern monster_ego *re_info; -extern dungeon_info_type *d_info; -extern player_class *class_info; -extern meta_class_type *meta_class_info; -extern player_race *race_info; -extern player_race_mod *race_mod_info; -extern trap_type *t_info; -extern wilderness_type_info *wf_info; -extern int wildc2i[256]; -extern store_info_type *st_info; -extern store_action_type *ba_info; -extern owner_type *ow_info; -extern set_type *set_info; - -extern cptr DEFAULT_FEAT_TEXT; -extern cptr DEFAULT_FEAT_TUNNEL; -extern cptr DEFAULT_FEAT_BLOCK; - -extern cptr ANGBAND_SYS; -extern cptr ANGBAND_KEYBOARD; -extern cptr ANGBAND_GRAF; -extern char *ANGBAND_DIR; -extern char *ANGBAND_DIR_MODULES; -extern char *ANGBAND_DIR_SAVE; -extern char *ANGBAND_DIR_CORE; -extern char *ANGBAND_DIR_DNGN; -extern char *ANGBAND_DIR_DATA; -extern char *ANGBAND_DIR_EDIT; -extern char *ANGBAND_DIR_FILE; -extern char *ANGBAND_DIR_HELP; -extern char *ANGBAND_DIR_INFO; -extern char *ANGBAND_DIR_NOTE; -extern char *ANGBAND_DIR_PREF; -extern char *ANGBAND_DIR_USER; -extern char *ANGBAND_DIR_XTRA; -extern bool_ item_tester_full; -extern byte item_tester_tval; -extern bool_ (*item_tester_hook)(object_type *o_ptr); -extern bool_ (*get_mon_num_hook)(int r_idx); -extern bool_ (*get_mon_num2_hook)(int r_idx); -extern bool_ (*get_obj_num_hook)(int k_idx); -extern u16b max_wild_x; -extern u16b max_wild_y; -extern wilderness_map **wild_map; -extern u16b old_max_s_idx; -extern u16b max_ab_idx; -extern u16b max_s_idx; -extern u16b max_al_idx; -extern u16b max_r_idx; -extern u16b max_re_idx; -extern u16b max_k_idx; -extern u16b max_v_idx; -extern u16b max_f_idx; -extern u16b max_a_idx; -extern u16b max_e_idx; -extern u16b max_ra_idx; -extern u16b max_d_idx; -extern u16b max_o_idx; -extern u16b max_m_idx; -extern u16b max_t_idx; -extern u16b max_rp_idx; -extern u16b max_c_idx; -extern u16b max_mc_idx; -extern u16b max_rmp_idx; -extern u16b max_st_idx; -extern u16b max_ba_idx; -extern u16b max_ow_idx; -extern u16b max_wf_idx; -extern s16b max_set_idx; -extern int init_flags; -extern bool_ ambush_flag; -extern bool_ fate_flag; -extern s16b no_breeds; -extern bool_ carried_monster_hit; -extern random_artifact random_artifacts[MAX_RANDARTS]; -extern s32b RANDART_WEAPON; -extern s32b RANDART_ARMOR; -extern s32b RANDART_JEWEL; -extern random_spell random_spells[MAX_SPELLS]; -extern s16b spell_num; -extern rune_spell rune_spells[MAX_RUNES]; -extern s16b rune_num; -extern fate fates[MAX_FATES]; -extern byte dungeon_type; -extern s16b *max_dlv; -extern s16b doppleganger; -extern bool_ generate_encounter; -extern bool_ special_lvls; -extern bool_ *m_allow_special; -extern bool_ *k_allow_special; -extern bool_ *a_allow_special; -extern bool_ center_player; -extern s16b plots[MAX_PLOTS]; -extern random_quest random_quests[MAX_RANDOM_QUEST]; -extern bool_ *special_lvl[MAX_DUNGEON_DEPTH]; -extern bool_ generate_special_feeling; -extern u32b dungeon_flags1; -extern u32b dungeon_flags2; -extern birther previous_char; -extern hist_type *bg; -extern int max_bg_idx; -extern s16b schools_count; -extern school_type schools[SCHOOLS_MAX]; -extern int project_time; -extern s32b project_time_effect; -extern effect_type effects[MAX_EFFECTS]; -extern char gen_skill_basem[MAX_SKILLS]; -extern u32b gen_skill_base[MAX_SKILLS]; -extern char gen_skill_modm[MAX_SKILLS]; -extern s16b gen_skill_mod[MAX_SKILLS]; -extern int max_bact; -extern bool_ automatizer_enabled; -extern s16b last_teleportation_y; -extern s16b last_teleportation_x; -extern cptr game_module; -extern s32b game_module_idx; -extern s32b VERSION_MAJOR; -extern s32b VERSION_MINOR; -extern s32b VERSION_PATCH; -extern s32b max_plev; -extern s32b DUNGEON_BASE; -extern s32b DUNGEON_DEATH; -extern s32b DUNGEON_ASTRAL; -extern s32b DUNGEON_ASTRAL_WILD_X; -extern s32b DUNGEON_ASTRAL_WILD_Y; -extern deity_type deity_info[MAX_GODS]; -extern timer_type *gl_timers; -extern const char *get_version_string(); -extern tval_desc2 tvals[]; diff --git a/src/files.cc b/src/files.cc index 07d6ed3a..4bc44d6a 100644 --- a/src/files.cc +++ b/src/files.cc @@ -31,6 +31,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/gen_evol.cc b/src/gen_evol.cc index 309b8695..d2676fa1 100644 --- a/src/gen_evol.cc +++ b/src/gen_evol.cc @@ -12,6 +12,7 @@ #include "cave.hpp" #include "generate.hpp" #include "levels.hpp" +#include "variable.hpp" /* * Generate a game of life level :) and make it evolve diff --git a/src/gen_maze.cc b/src/gen_maze.cc index fd9ff153..4c59fb5d 100644 --- a/src/gen_maze.cc +++ b/src/gen_maze.cc @@ -13,6 +13,7 @@ #include "cave.hpp" #include "generate.hpp" #include "levels.hpp" +#include "variable.hpp" #include diff --git a/src/generate.cc b/src/generate.cc index 9a28b2d4..7362b0a2 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -20,6 +20,7 @@ #include "tables.hpp" #include "traps.hpp" #include "util.hpp" +#include "variable.hpp" #include "wild.hpp" #include diff --git a/src/gods.cc b/src/gods.cc index 83fd3aae..be877905 100644 --- a/src/gods.cc +++ b/src/gods.cc @@ -11,6 +11,8 @@ #include "skills.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/help.cc b/src/help.cc index f7a8378b..0fb910d8 100644 --- a/src/help.cc +++ b/src/help.cc @@ -16,6 +16,7 @@ #include "options.hpp" #include "skills.hpp" #include "util.hpp" +#include "variable.hpp" #define DESC_MAX 14 #define TRIGGERED_HELP_MAX 19 diff --git a/src/init1.cc b/src/init1.cc index fe6abb87..93e7d2c0 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -14,6 +14,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include diff --git a/src/init2.cc b/src/init2.cc index 6a1f7c02..b924c914 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -21,6 +21,8 @@ #include "tome/make_array.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include #include diff --git a/src/joke.cc b/src/joke.cc index e07a313e..890dbc60 100644 --- a/src/joke.cc +++ b/src/joke.cc @@ -4,6 +4,7 @@ #include "monster2.hpp" #include "options.hpp" #include "util.hpp" +#include "variable.hpp" static void gen_joke_place_monster(int r_idx) { diff --git a/src/levels.cc b/src/levels.cc index 2ecb6e6c..d8820a77 100644 --- a/src/levels.cc +++ b/src/levels.cc @@ -12,6 +12,8 @@ #include "init1.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" /* diff --git a/src/loadsave.cc b/src/loadsave.cc index b2c9b2ec..10582487 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -16,6 +16,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/lua_bind.cc b/src/lua_bind.cc index 99311804..fcc28bbe 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -20,6 +20,7 @@ #include "spells5.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include #include diff --git a/src/main-gcu.c b/src/main-gcu.c index 790f02f8..426345b7 100644 --- a/src/main-gcu.c +++ b/src/main-gcu.c @@ -41,6 +41,7 @@ #include "angband.h" #include "util.h" +#include "variable.h" #ifdef USE_GCU diff --git a/src/main-gtk2.c b/src/main-gtk2.c index 8f6be607..a7d7b751 100644 --- a/src/main-gtk2.c +++ b/src/main-gtk2.c @@ -33,6 +33,7 @@ #include "angband.h" #include "files.h" #include "util.h" +#include "variable.h" /* diff --git a/src/main-sdl.c b/src/main-sdl.c index 736202f3..9126c721 100644 --- a/src/main-sdl.c +++ b/src/main-sdl.c @@ -28,6 +28,7 @@ #include "angband.h" #include "loadsave.h" #include "util.h" +#include "variable.h" #include #include diff --git a/src/main-win.c b/src/main-win.c index b532c138..05742c86 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -72,6 +72,7 @@ #include "files.h" #include "init2.h" #include "util.h" +#include "variable.h" #ifdef WINDOWS diff --git a/src/main-x11.c b/src/main-x11.c index c19b8d99..2553712e 100644 --- a/src/main-x11.c +++ b/src/main-x11.c @@ -95,6 +95,7 @@ #include "angband.h" #include "loadsave.h" #include "util.h" +#include "variable.h" #ifdef USE_X11 diff --git a/src/main.c b/src/main.c index cb2f179d..1ffd61ce 100644 --- a/src/main.c +++ b/src/main.c @@ -16,6 +16,7 @@ #include "modules.h" #include "script.h" #include "util.h" +#include "variable.h" diff --git a/src/melee1.cc b/src/melee1.cc index 43ed3ef1..58f41903 100644 --- a/src/melee1.cc +++ b/src/melee1.cc @@ -22,6 +22,7 @@ #include "store.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/melee2.cc b/src/melee2.cc index e1c8eaf1..fdd31846 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -32,6 +32,7 @@ #include "tables.hpp" #include "traps.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/mimic.cc b/src/mimic.cc index a55878e5..6fec9ec3 100644 --- a/src/mimic.cc +++ b/src/mimic.cc @@ -1,5 +1,6 @@ #include "mimic.hpp" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/modules.cc b/src/modules.cc index 0a2d2a33..98af4032 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -22,6 +22,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include #include diff --git a/src/monster1.cc b/src/monster1.cc index c636985e..20f23e59 100644 --- a/src/monster1.cc +++ b/src/monster1.cc @@ -11,6 +11,7 @@ #include "angband.h" #include "monster2.hpp" #include "util.hpp" +#include "variable.hpp" /* * Pronoun arrays, by gender. diff --git a/src/monster2.cc b/src/monster2.cc index 9439c74f..c3429298 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -21,6 +21,7 @@ #include "spells2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/monster3.cc b/src/monster3.cc index 12f0fcb6..c4d2295a 100644 --- a/src/monster3.cc +++ b/src/monster3.cc @@ -18,6 +18,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" /* diff --git a/src/notes.cc b/src/notes.cc index 8869ff2f..0aa632f2 100644 --- a/src/notes.cc +++ b/src/notes.cc @@ -13,6 +13,8 @@ #include "files.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" /* * Show the notes file on the screen diff --git a/src/object1.cc b/src/object1.cc index 4280e88a..93021cec 100644 --- a/src/object1.cc +++ b/src/object1.cc @@ -29,6 +29,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/object2.cc b/src/object2.cc index 9d3ef232..895b0a9b 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -22,8 +22,9 @@ #include "spells3.hpp" #include "spells5.hpp" #include "tables.hpp" -#include "util.hpp" #include "traps.hpp" +#include "util.hpp" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/options.cc b/src/options.cc index 7acea8ce..490b0245 100644 --- a/src/options.cc +++ b/src/options.cc @@ -66,6 +66,7 @@ bool_ view_yellow_lite; /* Use special colors for torch-lit grids */ bool_ view_bright_lite; /* Use special colors for 'viewable' grids */ bool_ view_granite_lite; /* Use special colors for wall grids (slow) */ bool_ view_special_lite; /* Use special colors for floor grids (slow) */ +bool_ center_player; /* Center view on player */ // // Option Set 5 - ToME options diff --git a/src/options.hpp b/src/options.hpp index 13620780..a8a0c9f8 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -68,6 +68,7 @@ extern bool_ view_yellow_lite; extern bool_ view_bright_lite; extern bool_ view_granite_lite; extern bool_ view_special_lite; +extern bool_ center_player; // // Option Set 5 - ToME options diff --git a/src/powers.cc b/src/powers.cc index e0305c2d..4c85f2d9 100644 --- a/src/powers.cc +++ b/src/powers.cc @@ -28,6 +28,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" /* diff --git a/src/q_betwen.cc b/src/q_betwen.cc index 9539b410..498ea9b4 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -7,6 +7,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_BETWEEN]) diff --git a/src/q_bounty.cc b/src/q_bounty.cc index 5ac204ca..33a5981d 100644 --- a/src/q_bounty.cc +++ b/src/q_bounty.cc @@ -5,6 +5,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_BOUNTY]) diff --git a/src/q_dragons.cc b/src/q_dragons.cc index 1ed48086..fbed0821 100644 --- a/src/q_dragons.cc +++ b/src/q_dragons.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_DRAGONS]) diff --git a/src/q_eol.cc b/src/q_eol.cc index f026fc89..fff73299 100644 --- a/src/q_eol.cc +++ b/src/q_eol.cc @@ -8,6 +8,7 @@ #include "tables.hpp" #include "traps.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_evil.cc b/src/q_evil.cc index a857a193..b3491d78 100644 --- a/src/q_evil.cc +++ b/src/q_evil.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_EVIL]) diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc index ae13dbe9..9eed970e 100644 --- a/src/q_fireprof.cc +++ b/src/q_fireprof.cc @@ -7,6 +7,7 @@ #include "tables.hpp" #include "traps.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_god.cc b/src/q_god.cc index 35f8355c..8186ce96 100644 --- a/src/q_god.cc +++ b/src/q_god.cc @@ -4,6 +4,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_haunted.cc b/src/q_haunted.cc index b4b5f62a..395c6e4a 100644 --- a/src/q_haunted.cc +++ b/src/q_haunted.cc @@ -7,6 +7,7 @@ #include "traps.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_HAUNTED]) diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc index 17754e0a..9893e483 100644 --- a/src/q_hobbit.cc +++ b/src/q_hobbit.cc @@ -7,6 +7,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_invas.cc b/src/q_invas.cc index d322ff54..739d3c67 100644 --- a/src/q_invas.cc +++ b/src/q_invas.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_INVASION]) diff --git a/src/q_library.cc b/src/q_library.cc index 3037565c..4645150b 100644 --- a/src/q_library.cc +++ b/src/q_library.cc @@ -9,6 +9,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include diff --git a/src/q_main.cc b/src/q_main.cc index 3c105307..a71ec15f 100644 --- a/src/q_main.cc +++ b/src/q_main.cc @@ -3,6 +3,7 @@ #include "hooks.h" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_narsil.cc b/src/q_narsil.cc index d6d9d590..c9f2d365 100644 --- a/src/q_narsil.cc +++ b/src/q_narsil.cc @@ -4,6 +4,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_NARSIL]) diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc index 9b1b5c06..53f5d430 100644 --- a/src/q_nazgul.cc +++ b/src/q_nazgul.cc @@ -6,6 +6,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_nirna.cc b/src/q_nirna.cc index 728b8c03..0bfeb453 100644 --- a/src/q_nirna.cc +++ b/src/q_nirna.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_NIRNAETH]) diff --git a/src/q_one.cc b/src/q_one.cc index 3d8738da..514ed0e0 100644 --- a/src/q_one.cc +++ b/src/q_one.cc @@ -7,6 +7,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_ONE]) diff --git a/src/q_poison.cc b/src/q_poison.cc index 8681bebe..124894c2 100644 --- a/src/q_poison.cc +++ b/src/q_poison.cc @@ -8,6 +8,7 @@ #include "hooks.h" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_POISON]) diff --git a/src/q_rand.cc b/src/q_rand.cc index 30fa722b..cfb76ff0 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -13,6 +13,7 @@ #include "skills.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_shroom.cc b/src/q_shroom.cc index a8385612..c22cbe56 100644 --- a/src/q_shroom.cc +++ b/src/q_shroom.cc @@ -7,6 +7,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_spider.cc b/src/q_spider.cc index 382a4a81..e838414d 100644 --- a/src/q_spider.cc +++ b/src/q_spider.cc @@ -8,6 +8,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_SPIDER]) diff --git a/src/q_thief.cc b/src/q_thief.cc index 76311c99..452c6739 100644 --- a/src/q_thief.cc +++ b/src/q_thief.cc @@ -8,6 +8,7 @@ #include "spells2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_THIEVES]) diff --git a/src/q_thrain.cc b/src/q_thrain.cc index 9505b5f9..8ddf3d1c 100644 --- a/src/q_thrain.cc +++ b/src/q_thrain.cc @@ -12,6 +12,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_troll.cc b/src/q_troll.cc index 6dc57ddc..5c4ddaa2 100644 --- a/src/q_troll.cc +++ b/src/q_troll.cc @@ -7,6 +7,7 @@ #include "object2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_ultrag.cc b/src/q_ultrag.cc index 4138a8da..632c6bc3 100644 --- a/src/q_ultrag.cc +++ b/src/q_ultrag.cc @@ -7,6 +7,7 @@ #include "options.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_ULTRA_GOOD]) diff --git a/src/q_wight.cc b/src/q_wight.cc index 7a9117b0..7ac376eb 100644 --- a/src/q_wight.cc +++ b/src/q_wight.cc @@ -8,6 +8,7 @@ #include "quark.h" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/q_wolves.cc b/src/q_wolves.cc index 5ab28fb0..2585a449 100644 --- a/src/q_wolves.cc +++ b/src/q_wolves.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #define cquest (quest[QUEST_WOLVES]) diff --git a/src/randart.cc b/src/randart.cc index 42cdb79b..7d88ada6 100644 --- a/src/randart.cc +++ b/src/randart.cc @@ -14,6 +14,8 @@ #include "quark.h" #include "spells2.hpp" #include "util.hpp" +#include "variable.h" +#include "variable.hpp" #include #include diff --git a/src/skills.cc b/src/skills.cc index b67c8cae..c6d609c0 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -26,6 +26,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/spells1.cc b/src/spells1.cc index b7d73aa8..180fdd75 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -30,6 +30,7 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.hpp" #include "wizard2.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/spells2.cc b/src/spells2.cc index 01772d68..f128700d 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -27,6 +27,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/spells3.cc b/src/spells3.cc index ebf2091d..16a016bd 100644 --- a/src/spells3.cc +++ b/src/spells3.cc @@ -18,6 +18,7 @@ #include "spells5.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/spells4.cc b/src/spells4.cc index 4d91e5a1..d4aa7a72 100644 --- a/src/spells4.cc +++ b/src/spells4.cc @@ -12,6 +12,7 @@ #include "spells6.hpp" #include "util.hpp" #include "util.h" +#include "variable.hpp" #include #include diff --git a/src/spells5.cc b/src/spells5.cc index 32de8771..6dcb8f84 100644 --- a/src/spells5.cc +++ b/src/spells5.cc @@ -5,6 +5,7 @@ #include "device_allocation.h" #include "spells3.hpp" #include "spells4.hpp" +#include "variable.hpp" #include diff --git a/src/spells6.cc b/src/spells6.cc index 2f2b0493..c0adceb3 100644 --- a/src/spells6.cc +++ b/src/spells6.cc @@ -7,6 +7,7 @@ #include "skills.hpp" #include "spell_type.hpp" #include "spells4.hpp" +#include "variable.hpp" #include #include diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc index 44d3e750..786a1b29 100644 --- a/src/squelch/condition.cc +++ b/src/squelch/condition.cc @@ -10,6 +10,7 @@ #include "skills.hpp" #include "quark.h" #include "util.hpp" +#include "variable.hpp" namespace squelch { diff --git a/src/squelch/object_status.cc b/src/squelch/object_status.cc index 09882a9e..2d4f07f9 100644 --- a/src/squelch/object_status.cc +++ b/src/squelch/object_status.cc @@ -3,6 +3,7 @@ #include "angband.h" #include "object1.hpp" +#include "variable.hpp" namespace squelch { diff --git a/src/squelch/rule.cc b/src/squelch/rule.cc index 3db3dae6..a8bcd19e 100644 --- a/src/squelch/rule.cc +++ b/src/squelch/rule.cc @@ -11,6 +11,7 @@ #include "../quark.h" #include "../tables.hpp" #include "../util.hpp" +#include "../variable.hpp" namespace squelch { diff --git a/src/squeltch.cc b/src/squeltch.cc index 594cd67c..4b2fd0b7 100644 --- a/src/squeltch.cc +++ b/src/squeltch.cc @@ -23,6 +23,8 @@ #include "tome/squelch/automatizer.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include #include diff --git a/src/status.cc b/src/status.cc index 5cd4241c..0c6dfd10 100644 --- a/src/status.cc +++ b/src/status.cc @@ -21,6 +21,8 @@ #include "object1.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" static void row_trival(const char*, s16b, u32b, s16b, u32b, int, u32b[INVEN_TOTAL - INVEN_WIELD + 2][7]); diff --git a/src/store.cc b/src/store.cc index 142c59d8..e61e3685 100644 --- a/src/store.cc +++ b/src/store.cc @@ -25,6 +25,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/tables.cc b/src/tables.cc index a1b2d698..c11bc60d 100644 --- a/src/tables.cc +++ b/src/tables.cc @@ -39,7 +39,7 @@ #include "q_one.h" #include "q_main.h" #include "q_rand.h" - +#include "variable.hpp" diff --git a/src/traps.cc b/src/traps.cc index 9b271167..ad20e0aa 100644 --- a/src/traps.cc +++ b/src/traps.cc @@ -20,6 +20,7 @@ #include "spells2.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/util.cc b/src/util.cc index bb632066..c35eab78 100644 --- a/src/util.cc +++ b/src/util.cc @@ -14,6 +14,8 @@ #include "quark.h" #include "tables.h" #include "tables.hpp" +#include "variable.h" +#include "variable.hpp" #include "xtra1.hpp" #include diff --git a/src/variable.cc b/src/variable.cc index 3307dbbe..ca7696dd 100644 --- a/src/variable.cc +++ b/src/variable.cc @@ -1,7 +1,3 @@ -/* File: variable.c */ - -/* Purpose: Angband variables */ - /* * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke * @@ -10,7 +6,8 @@ * included in all such copies. */ -#include "angband.h" +#include "variable.hpp" +#include "variable.h" #include "util.hpp" @@ -952,11 +949,6 @@ bool_ *m_allow_special; bool_ *k_allow_special; bool_ *a_allow_special; -/* - * Center view - */ -bool_ center_player = FALSE; - /* * Plots */ diff --git a/src/variable.h b/src/variable.h new file mode 100644 index 00000000..3687ec90 --- /dev/null +++ b/src/variable.h @@ -0,0 +1,42 @@ +#pragma once + +#include "angband.h" + +// C linkage required for these functions since main-* code uses them. +#ifdef __cplusplus +extern "C" { +#endif + +extern cptr ANGBAND_SYS; +extern cptr ANGBAND_KEYBOARD; +extern char *ANGBAND_DIR_MODULES; +extern char *ANGBAND_DIR_SAVE; +extern char *ANGBAND_DIR_CORE; +extern char *ANGBAND_DIR_DNGN; +extern char *ANGBAND_DIR_DATA; +extern char *ANGBAND_DIR_EDIT; +extern char *ANGBAND_DIR_FILE; +extern char *ANGBAND_DIR_HELP; +extern char *ANGBAND_DIR_INFO; +extern char *ANGBAND_DIR_NOTE; +extern char *ANGBAND_DIR_PREF; +extern char *ANGBAND_DIR_USER; +extern char *ANGBAND_DIR_XTRA; +extern term *angband_term[ANGBAND_TERM_MAX]; +extern char angband_term_name[ANGBAND_TERM_MAX][80]; +extern byte angband_color_table[256][4]; +extern bool_ arg_wizard; +extern bool_ arg_force_original; +extern bool_ arg_force_roguelike; +extern hist_type *bg; +extern bool_ character_generated; +extern bool_ character_icky; +extern bool_ inkey_flag; +extern bool_ msg_flag; +extern char player_name[32]; +extern char player_base[32]; +extern char savefile[1024]; + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/src/variable.hpp b/src/variable.hpp new file mode 100644 index 00000000..6ba3cea9 --- /dev/null +++ b/src/variable.hpp @@ -0,0 +1,272 @@ +#pragma once + +#include "angband.h" + +extern int max_macrotrigger; +extern char *macro_template; +extern char *macro_modifier_chr; +extern char *macro_modifier_name[MAX_MACRO_MOD]; +extern char *macro_trigger_name[MAX_MACRO_TRIG]; +extern char *macro_trigger_keycode[2][MAX_MACRO_TRIG]; +extern byte version_major; +extern byte version_minor; +extern byte version_patch; +extern byte sf_major; +extern byte sf_minor; +extern byte sf_patch; +extern u32b sf_when; +extern u16b sf_lives; +extern u16b sf_saves; +extern bool_ character_dungeon; +extern bool_ character_loaded; +extern bool_ character_xtra; +extern u32b seed_flavor; +extern s16b command_cmd; +extern s16b command_arg; +extern s16b command_rep; +extern s16b command_dir; +extern s16b command_wrk; +extern s16b command_new; +extern s32b energy_use; +extern bool_ create_up_stair; +extern bool_ create_down_stair; +extern bool_ create_up_shaft; +extern bool_ create_down_shaft; +extern bool_ alive; +extern bool_ death; +extern s16b running; +extern s16b resting; +extern s16b cur_hgt; +extern s16b cur_wid; +extern s16b dun_level; +extern s16b old_dun_level; +extern s16b num_repro; +extern s16b object_level; +extern s16b monster_level; +extern s32b turn; +extern s32b old_turn; +extern bool_ wizard; +extern u16b total_winner; +extern u16b has_won; +extern u16b noscore; +extern bool_ inkey_base; +extern s16b coin_type; +extern bool_ opening_chest; +extern bool_ shimmer_monsters; +extern bool_ shimmer_objects; +extern bool_ repair_monsters; +extern s16b inven_cnt; +extern s16b equip_cnt; +extern s16b o_max; +extern s16b o_cnt; +extern s16b m_max; +extern s16b m_cnt; +extern s16b hack_m_idx; +extern int total_friends; +extern s32b total_friend_levels; +extern int leaving_quest; +extern char summon_kin_type; +extern bool_ hack_mind; +extern bool_ is_autosave; +extern int artifact_bias; +extern FILE *text_out_file; +extern void (*text_out_hook)(byte a, cptr str); +extern int text_out_indent; +extern bool_ cheat_peek; +extern bool_ cheat_hear; +extern bool_ cheat_room; +extern bool_ cheat_xtra; +extern bool_ cheat_know; +extern bool_ cheat_live; +extern byte hitpoint_warn; +extern byte delay_factor; +extern s16b autosave_freq; +extern bool_ autosave_t; +extern bool_ autosave_l; +extern s16b feeling; +extern s16b rating; +extern bool_ good_item_flag; +extern s16b max_panel_rows, max_panel_cols; +extern s16b panel_row_min, panel_row_max; +extern s16b panel_col_min, panel_col_max; +extern s16b panel_col_prt, panel_row_prt; +extern byte feat_wall_outer; +extern byte feat_wall_inner; +extern s16b floor_type[100]; +extern s16b fill_type[100]; +extern s16b target_who; +extern s16b target_col; +extern s16b target_row; +extern s16b health_who; +extern s16b monster_race_idx; +extern s16b monster_ego_idx; +extern object_type *tracked_object; +extern char died_from[80]; +extern char history[4][60]; +extern s16b lite_n; +extern s16b lite_y[LITE_MAX]; +extern s16b lite_x[LITE_MAX]; +extern s16b view_n; +extern byte view_y[VIEW_MAX]; +extern byte view_x[VIEW_MAX]; +extern s16b temp_n; +extern byte temp_y[TEMP_MAX]; +extern byte temp_x[TEMP_MAX]; +extern s16b macro__num; +extern char **macro__pat; +extern char **macro__act; +extern bool_ *macro__cmd; +extern char *macro__buf; +extern u32b option_flag[8]; +extern u32b option_mask[8]; +extern u32b window_flag[ANGBAND_TERM_MAX]; +extern u32b window_mask[ANGBAND_TERM_MAX]; +extern cave_type **cave; +extern object_type *o_list; +extern monster_type *m_list; +extern monster_type *km_list; +extern u16b max_real_towns; +extern u16b max_towns; +extern town_type *town_info; +extern s16b alloc_kind_size; +extern alloc_entry *alloc_kind_table; +extern bool_ alloc_kind_table_valid; +extern s16b alloc_race_size; +extern alloc_entry *alloc_race_table; +extern byte misc_to_attr[256]; +extern char misc_to_char[256]; +extern byte tval_to_attr[128]; +extern char tval_to_char[128]; +extern char *keymap_act[KEYMAP_MODES][256]; +extern player_type *p_ptr; +extern player_sex *sp_ptr; +extern player_race *rp_ptr; +extern player_race_mod *rmp_ptr; +extern player_class *cp_ptr; +extern player_spec *spp_ptr; +extern u32b alchemist_known_egos[32]; +extern alchemist_recipe *alchemist_recipes; +extern u32b alchemist_known_artifacts[6]; +extern u32b alchemist_gained; +extern s16b player_hp[PY_MAX_LEVEL]; +extern artifact_select_flag *a_select_flags; +extern ability_type *ab_info; +extern skill_type *s_info; +extern vault_type *v_info; +extern feature_type *f_info; +extern object_kind *k_info; +extern artifact_type *a_info; +extern ego_item_type *e_info; +extern randart_part_type *ra_info; +extern randart_gen_type ra_gen[30]; +extern monster_race *r_info; +extern monster_ego *re_info; +extern dungeon_info_type *d_info; +extern player_class *class_info; +extern meta_class_type *meta_class_info; +extern player_race *race_info; +extern player_race_mod *race_mod_info; +extern trap_type *t_info; +extern wilderness_type_info *wf_info; +extern int wildc2i[256]; +extern store_info_type *st_info; +extern store_action_type *ba_info; +extern owner_type *ow_info; +extern set_type *set_info; +extern cptr DEFAULT_FEAT_TEXT; +extern cptr DEFAULT_FEAT_TUNNEL; +extern cptr DEFAULT_FEAT_BLOCK; +extern cptr ANGBAND_GRAF; +extern char *ANGBAND_DIR; +extern bool_ item_tester_full; +extern byte item_tester_tval; +extern bool_ (*item_tester_hook)(object_type *o_ptr); +extern bool_ (*get_mon_num_hook)(int r_idx); +extern bool_ (*get_mon_num2_hook)(int r_idx); +extern bool_ (*get_obj_num_hook)(int k_idx); +extern u16b max_wild_x; +extern u16b max_wild_y; +extern wilderness_map **wild_map; +extern u16b old_max_s_idx; +extern u16b max_ab_idx; +extern u16b max_s_idx; +extern u16b max_al_idx; +extern u16b max_r_idx; +extern u16b max_re_idx; +extern u16b max_k_idx; +extern u16b max_v_idx; +extern u16b max_f_idx; +extern u16b max_a_idx; +extern u16b max_e_idx; +extern u16b max_ra_idx; +extern u16b max_d_idx; +extern u16b max_o_idx; +extern u16b max_m_idx; +extern u16b max_t_idx; +extern u16b max_rp_idx; +extern u16b max_c_idx; +extern u16b max_mc_idx; +extern u16b max_rmp_idx; +extern u16b max_st_idx; +extern u16b max_ba_idx; +extern u16b max_ow_idx; +extern u16b max_wf_idx; +extern s16b max_set_idx; +extern int init_flags; +extern bool_ ambush_flag; +extern bool_ fate_flag; +extern s16b no_breeds; +extern bool_ carried_monster_hit; +extern random_artifact random_artifacts[MAX_RANDARTS]; +extern s32b RANDART_WEAPON; +extern s32b RANDART_ARMOR; +extern s32b RANDART_JEWEL; +extern random_spell random_spells[MAX_SPELLS]; +extern s16b spell_num; +extern rune_spell rune_spells[MAX_RUNES]; +extern s16b rune_num; +extern fate fates[MAX_FATES]; +extern byte dungeon_type; +extern s16b *max_dlv; +extern s16b doppleganger; +extern bool_ generate_encounter; +extern bool_ special_lvls; +extern bool_ *m_allow_special; +extern bool_ *k_allow_special; +extern bool_ *a_allow_special; +extern s16b plots[MAX_PLOTS]; +extern random_quest random_quests[MAX_RANDOM_QUEST]; +extern bool_ *special_lvl[MAX_DUNGEON_DEPTH]; +extern bool_ generate_special_feeling; +extern u32b dungeon_flags1; +extern u32b dungeon_flags2; +extern birther previous_char; +extern int max_bg_idx; +extern s16b schools_count; +extern school_type schools[SCHOOLS_MAX]; +extern int project_time; +extern s32b project_time_effect; +extern effect_type effects[MAX_EFFECTS]; +extern char gen_skill_basem[MAX_SKILLS]; +extern u32b gen_skill_base[MAX_SKILLS]; +extern char gen_skill_modm[MAX_SKILLS]; +extern s16b gen_skill_mod[MAX_SKILLS]; +extern int max_bact; +extern bool_ automatizer_enabled; +extern s16b last_teleportation_y; +extern s16b last_teleportation_x; +extern cptr game_module; +extern s32b game_module_idx; +extern s32b VERSION_MAJOR; +extern s32b VERSION_MINOR; +extern s32b VERSION_PATCH; +extern s32b max_plev; +extern s32b DUNGEON_BASE; +extern s32b DUNGEON_DEATH; +extern s32b DUNGEON_ASTRAL; +extern s32b DUNGEON_ASTRAL_WILD_X; +extern s32b DUNGEON_ASTRAL_WILD_Y; +extern deity_type deity_info[MAX_GODS]; +extern timer_type *gl_timers; +extern const char *get_version_string(); +extern tval_desc2 tvals[]; diff --git a/src/wild.cc b/src/wild.cc index 307705bc..5ac9f739 100644 --- a/src/wild.cc +++ b/src/wild.cc @@ -16,6 +16,7 @@ #include "options.hpp" #include "tables.hpp" #include "util.hpp" +#include "variable.hpp" #include diff --git a/src/wizard1.cc b/src/wizard1.cc index ad830625..c8477ba1 100644 --- a/src/wizard1.cc +++ b/src/wizard1.cc @@ -7,6 +7,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include diff --git a/src/wizard2.cc b/src/wizard2.cc index 2c499fce..37f31156 100644 --- a/src/wizard2.cc +++ b/src/wizard2.cc @@ -25,6 +25,8 @@ #include "traps.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "wizard1.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/xtra1.cc b/src/xtra1.cc index f1805c38..c01f9c24 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -29,6 +29,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "xtra2.hpp" #include diff --git a/src/xtra2.cc b/src/xtra2.cc index e6deb848..fcd71db3 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -31,6 +31,8 @@ #include "tables.hpp" #include "util.hpp" #include "util.h" +#include "variable.h" +#include "variable.hpp" #include "wizard2.hpp" #include "xtra1.hpp" -- cgit v1.2.3