From f93c700dc8320da438ad46b59b2541e29d9b6d68 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 7 Mar 2015 16:55:42 +0100 Subject: Split tables.cc declarations into separate header files --- src/birth.cc | 1 + src/bldg.cc | 1 + src/cave.cc | 1 + src/cmd1.cc | 1 + src/cmd2.cc | 1 + src/cmd3.cc | 1 + src/cmd4.cc | 1 + src/cmd5.cc | 1 + src/cmd6.cc | 1 + src/cmd7.cc | 1 + src/dungeon.cc | 1 + src/externs.h | 69 -------------------------- src/files.cc | 1 + src/generate.cc | 1 + src/init1.cc | 1 + src/init2.cc | 1 + src/loadsave.cc | 1 + src/lua_bind.cc | 1 + src/melee1.cc | 1 + src/melee2.cc | 1 + src/modules.cc | 1 + src/monster2.cc | 1 + src/monster3.cc | 1 + src/object1.cc | 1 + src/object2.cc | 1 + src/powers.cc | 1 + 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 | 1 + 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/quest.cc | 3 ++ src/skills.cc | 1 + src/spells1.cc | 1 + src/spells2.cc | 1 + src/spells3.cc | 1 + src/squelch/rule.cc | 1 + src/store.cc | 1 + src/tables.cc | 136 ++-------------------------------------------------- src/tables.h | 12 +++++ src/tables.hpp | 62 ++++++++++++++++++++++++ src/traps.cc | 1 + src/util.cc | 2 + src/wild.cc | 1 + src/wizard1.cc | 1 + src/wizard2.cc | 1 + src/xtra1.cc | 1 + src/xtra2.cc | 1 + 69 files changed, 145 insertions(+), 202 deletions(-) create mode 100644 src/tables.h create mode 100644 src/tables.hpp diff --git a/src/birth.cc b/src/birth.cc index 3127cb28..c3d0f3a6 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -31,6 +31,7 @@ #include "spells3.hpp" #include "spells5.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/bldg.cc b/src/bldg.cc index 0f6ccbf1..248a6d4e 100644 --- a/src/bldg.cc +++ b/src/bldg.cc @@ -25,6 +25,7 @@ #include "q_bounty.h" #include "spells2.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/cave.cc b/src/cave.cc index 5a38e7d6..75a5a205 100644 --- a/src/cave.cc +++ b/src/cave.cc @@ -5,6 +5,7 @@ #include "options.hpp" #include "q_rand.h" #include "spells1.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" diff --git a/src/cmd1.cc b/src/cmd1.cc index 5b1e4562..65056cf6 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -29,6 +29,7 @@ #include "spells1.hpp" #include "spells2.hpp" #include "spells3.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/cmd2.cc b/src/cmd2.cc index 454c9a00..58c2aacc 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -25,6 +25,7 @@ #include "spells1.hpp" #include "spells2.hpp" #include "spells3.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/cmd3.cc b/src/cmd3.cc index 43950710..e878c3dc 100644 --- a/src/cmd3.cc +++ b/src/cmd3.cc @@ -19,6 +19,7 @@ #include "quark.h" #include "squeltch.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/cmd4.cc b/src/cmd4.cc index d791ff51..f5c3ff57 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -20,6 +20,7 @@ #include "object2.hpp" #include "skills.hpp" #include "squeltch.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/cmd5.cc b/src/cmd5.cc index 43357cef..2725f4ea 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -22,6 +22,7 @@ #include "spells2.hpp" #include "spells4.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "quark.h" diff --git a/src/cmd6.cc b/src/cmd6.cc index 6b6d5705..705ef14b 100644 --- a/src/cmd6.cc +++ b/src/cmd6.cc @@ -28,6 +28,7 @@ #include "spells2.hpp" #include "spells5.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "wild.hpp" #include "wizard2.hpp" diff --git a/src/cmd7.cc b/src/cmd7.cc index 2228132e..e2e3772d 100644 --- a/src/cmd7.cc +++ b/src/cmd7.cc @@ -24,6 +24,7 @@ #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/dungeon.cc b/src/dungeon.cc index d2af3ef4..d640795b 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -52,6 +52,7 @@ #include "spells5.hpp" #include "squeltch.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "wild.hpp" diff --git a/src/externs.h b/src/externs.h index 90d1f310..62fa3151 100644 --- a/src/externs.h +++ b/src/externs.h @@ -25,75 +25,6 @@ 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]; -/* tables.c */ -extern s16b ddd[9]; -extern s16b ddx[10]; -extern s16b ddy[10]; -extern s16b ddx_ddd[9]; -extern s16b ddy_ddd[9]; -extern char hexsym[16]; -extern byte adj_val_min[]; -extern byte adj_val_max[]; -extern byte adj_mag_study[]; -extern byte adj_mag_mana[]; -extern byte adj_mag_fail[]; -extern byte adj_mag_stat[]; -extern byte adj_chr_gold[]; -extern byte adj_int_dev[]; -extern byte adj_wis_sav[]; -extern byte adj_dex_dis[]; -extern byte adj_int_dis[]; -extern byte adj_dex_ta[]; -extern byte adj_str_td[]; -extern byte adj_dex_th[]; -extern byte adj_str_th[]; -extern byte adj_str_wgt[]; -extern byte adj_str_hold[]; -extern byte adj_str_dig[]; -extern byte adj_str_blow[]; -extern byte adj_dex_blow[]; -extern byte adj_dex_safe[]; -extern byte adj_con_fix[]; -extern byte adj_con_mhp[]; -extern byte blows_table[12][12]; -extern byte extract_energy[300]; -extern s32b player_exp[PY_MAX_LEVEL]; -extern player_sex sex_info[MAX_SEXES]; -extern cptr color_names[16]; -extern cptr stat_names[6]; -extern cptr stat_names_reduced[6]; -extern cptr window_flag_desc[32]; -extern option_type option_info[]; -extern martial_arts bear_blows[MAX_BEAR]; -extern martial_arts ma_blows[MAX_MA]; -extern magic_power mindcraft_powers[MAX_MINDCRAFT_POWERS]; -extern magic_power necro_powers[MAX_NECRO_POWERS]; -extern magic_power mimic_powers[MAX_MIMIC_POWERS]; -extern magic_power symbiotic_powers[MAX_SYMBIOTIC_POWERS]; -extern cptr deity_rarity[2]; -extern cptr deity_niceness[10]; -extern cptr deity_standing[11]; -extern move_info_type move_info[9]; -extern tactic_info_type tactic_info[9]; -extern activation activation_info[MAX_T_ACT]; -extern inscription_info_type inscription_info[MAX_INSCRIPTIONS]; -extern cptr sense_desc[]; -extern flags_group flags_groups[MAX_FLAG_GROUP]; -extern power_type powers_type[POWER_MAX]; -extern cptr artifact_names_list; -extern monster_power monster_powers[96]; -extern tval_desc tval_descs[]; -extern between_exit between_exits[MAX_BETWEEN_EXITS]; -extern int month_day[9]; -extern cptr month_name[9]; -extern cli_comm *cli_info; -extern int cli_total; -extern quest_type quest[MAX_Q_IDX]; -extern int max_body_part[BODY_MAX]; -extern gf_name_type gf_names[]; -extern module_type modules[MAX_MODULES]; - - /* variable.c */ extern byte version_major; extern byte version_minor; diff --git a/src/files.cc b/src/files.cc index 4a5b46fa..07d6ed3a 100644 --- a/src/files.cc +++ b/src/files.cc @@ -28,6 +28,7 @@ #include "options.hpp" #include "skills.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/generate.cc b/src/generate.cc index 40a65ec4..9a28b2d4 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -17,6 +17,7 @@ #include "options.hpp" #include "randart.hpp" #include "spells1.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "wild.hpp" diff --git a/src/init1.cc b/src/init1.cc index cc6c265e..fe6abb87 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -10,6 +10,7 @@ #include "object2.hpp" #include "skills.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/init2.cc b/src/init2.cc index 6b6fc343..6a1f7c02 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -17,6 +17,7 @@ #include "script.h" #include "spells3.hpp" #include "squeltch.hpp" +#include "tables.hpp" #include "tome/make_array.hpp" #include "util.hpp" #include "util.h" diff --git a/src/loadsave.cc b/src/loadsave.cc index 456ba777..b2c9b2ec 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -13,6 +13,7 @@ #include "object2.hpp" #include "quark.h" #include "hooks.h" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra2.hpp" diff --git a/src/lua_bind.cc b/src/lua_bind.cc index e1b07c2f..99311804 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -18,6 +18,7 @@ #include "spell_type.hpp" #include "spells2.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/melee1.cc b/src/melee1.cc index 30f94bb9..43ed3ef1 100644 --- a/src/melee1.cc +++ b/src/melee1.cc @@ -20,6 +20,7 @@ #include "spells1.hpp" #include "spells2.hpp" #include "store.hpp" +#include "tables.hpp" #include "util.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/melee2.cc b/src/melee2.cc index 58aa68cb..e1c8eaf1 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -29,6 +29,7 @@ #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "xtra2.hpp" diff --git a/src/modules.cc b/src/modules.cc index 300c862a..0a2d2a33 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -19,6 +19,7 @@ #include "monster2.hpp" #include "object2.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" diff --git a/src/monster2.cc b/src/monster2.cc index 47e1c9ea..9439c74f 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -19,6 +19,7 @@ #include "randart.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/monster3.cc b/src/monster3.cc index b17a0815..12f0fcb6 100644 --- a/src/monster3.cc +++ b/src/monster3.cc @@ -15,6 +15,7 @@ #include "monster2.hpp" #include "object2.hpp" #include "skills.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra2.hpp" diff --git a/src/object1.cc b/src/object1.cc index 5d1e80f4..4280e88a 100644 --- a/src/object1.cc +++ b/src/object1.cc @@ -26,6 +26,7 @@ #include "spell_type.hpp" #include "spells5.hpp" #include "squeltch.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/object2.cc b/src/object2.cc index f6941f90..9d3ef232 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -21,6 +21,7 @@ #include "spells2.hpp" #include "spells3.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "util.hpp" #include "traps.hpp" #include "xtra1.hpp" diff --git a/src/powers.cc b/src/powers.cc index 12a46b15..e0305c2d 100644 --- a/src/powers.cc +++ b/src/powers.cc @@ -24,6 +24,7 @@ #include "quark.h" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/q_betwen.cc b/src/q_betwen.cc index 5cb0718c..9539b410 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -5,6 +5,7 @@ #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_BETWEEN]) diff --git a/src/q_bounty.cc b/src/q_bounty.cc index 836c8a61..5ac204ca 100644 --- a/src/q_bounty.cc +++ b/src/q_bounty.cc @@ -3,6 +3,7 @@ #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_BOUNTY]) diff --git a/src/q_dragons.cc b/src/q_dragons.cc index af781440..1ed48086 100644 --- a/src/q_dragons.cc +++ b/src/q_dragons.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "init1.hpp" #include "monster2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_DRAGONS]) diff --git a/src/q_eol.cc b/src/q_eol.cc index fb74dfc5..f026fc89 100644 --- a/src/q_eol.cc +++ b/src/q_eol.cc @@ -5,6 +5,7 @@ #include "hooks.h" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" diff --git a/src/q_evil.cc b/src/q_evil.cc index ba3c1b59..a857a193 100644 --- a/src/q_evil.cc +++ b/src/q_evil.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "init1.hpp" #include "monster2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_EVIL]) diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc index 4e9dd659..ae13dbe9 100644 --- a/src/q_fireprof.cc +++ b/src/q_fireprof.cc @@ -4,6 +4,7 @@ #include "lua_bind.hpp" #include "object1.hpp" #include "object2.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" diff --git a/src/q_god.cc b/src/q_god.cc index a1b05607..35f8355c 100644 --- a/src/q_god.cc +++ b/src/q_god.cc @@ -2,6 +2,7 @@ #include "quark.h" #include "hooks.h" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_haunted.cc b/src/q_haunted.cc index 5197a0d0..b4b5f62a 100644 --- a/src/q_haunted.cc +++ b/src/q_haunted.cc @@ -5,6 +5,7 @@ #include "init1.hpp" #include "monster2.hpp" #include "traps.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_HAUNTED]) diff --git a/src/q_hobbit.cc b/src/q_hobbit.cc index 06079f92..17754e0a 100644 --- a/src/q_hobbit.cc +++ b/src/q_hobbit.cc @@ -5,6 +5,7 @@ #include "messages.h" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_invas.cc b/src/q_invas.cc index 9ce23286..d322ff54 100644 --- a/src/q_invas.cc +++ b/src/q_invas.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "init1.hpp" #include "monster2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_INVASION]) diff --git a/src/q_library.cc b/src/q_library.cc index cb863a30..3037565c 100644 --- a/src/q_library.cc +++ b/src/q_library.cc @@ -6,6 +6,7 @@ #include "object2.hpp" #include "spells3.hpp" #include "spells4.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" diff --git a/src/q_main.cc b/src/q_main.cc index 866e7ffa..3c105307 100644 --- a/src/q_main.cc +++ b/src/q_main.cc @@ -1,6 +1,7 @@ #include "q_main.h" #include "hooks.h" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_narsil.cc b/src/q_narsil.cc index 33fb6006..d6d9d590 100644 --- a/src/q_narsil.cc +++ b/src/q_narsil.cc @@ -2,6 +2,7 @@ #include "hooks.h" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_NARSIL]) diff --git a/src/q_nazgul.cc b/src/q_nazgul.cc index e2ef3e44..9b1b5c06 100644 --- a/src/q_nazgul.cc +++ b/src/q_nazgul.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_nirna.cc b/src/q_nirna.cc index a594584c..728b8c03 100644 --- a/src/q_nirna.cc +++ b/src/q_nirna.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "init1.hpp" #include "monster2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_NIRNAETH]) diff --git a/src/q_one.cc b/src/q_one.cc index bdee1c6e..3d8738da 100644 --- a/src/q_one.cc +++ b/src/q_one.cc @@ -5,6 +5,7 @@ #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_ONE]) diff --git a/src/q_poison.cc b/src/q_poison.cc index 26b6ef54..8681bebe 100644 --- a/src/q_poison.cc +++ b/src/q_poison.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "object2.hpp" #include "hooks.h" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_POISON]) diff --git a/src/q_rand.cc b/src/q_rand.cc index 175c08b0..30fa722b 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -11,6 +11,7 @@ #include "object1.hpp" #include "object2.hpp" #include "skills.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_shroom.cc b/src/q_shroom.cc index 56a3cf2f..a8385612 100644 --- a/src/q_shroom.cc +++ b/src/q_shroom.cc @@ -5,6 +5,7 @@ #include "messages.h" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_spider.cc b/src/q_spider.cc index 0ec5ac93..382a4a81 100644 --- a/src/q_spider.cc +++ b/src/q_spider.cc @@ -6,6 +6,7 @@ #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_SPIDER]) diff --git a/src/q_thief.cc b/src/q_thief.cc index 9c11eb58..76311c99 100644 --- a/src/q_thief.cc +++ b/src/q_thief.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "object2.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_THIEVES]) diff --git a/src/q_thrain.cc b/src/q_thrain.cc index 496448a2..9505b5f9 100644 --- a/src/q_thrain.cc +++ b/src/q_thrain.cc @@ -10,6 +10,7 @@ #include "messages.h" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_troll.cc b/src/q_troll.cc index 08109c5a..6dc57ddc 100644 --- a/src/q_troll.cc +++ b/src/q_troll.cc @@ -5,6 +5,7 @@ #include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_ultrag.cc b/src/q_ultrag.cc index d0ed41be..4138a8da 100644 --- a/src/q_ultrag.cc +++ b/src/q_ultrag.cc @@ -5,6 +5,7 @@ #include "object1.hpp" #include "object2.hpp" #include "options.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_ULTRA_GOOD]) diff --git a/src/q_wight.cc b/src/q_wight.cc index fec3ba6b..7a9117b0 100644 --- a/src/q_wight.cc +++ b/src/q_wight.cc @@ -6,6 +6,7 @@ #include "monster2.hpp" #include "object2.hpp" #include "quark.h" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/q_wolves.cc b/src/q_wolves.cc index b1d325cf..5ab28fb0 100644 --- a/src/q_wolves.cc +++ b/src/q_wolves.cc @@ -4,6 +4,7 @@ #include "hooks.h" #include "init1.hpp" #include "monster2.hpp" +#include "tables.hpp" #include "util.hpp" #define cquest (quest[QUEST_WOLVES]) diff --git a/src/quest.cc b/src/quest.cc index 301fc4f9..f93abefe 100644 --- a/src/quest.cc +++ b/src/quest.cc @@ -1,5 +1,8 @@ #include "quest.h" + #include "angband.h" +#include "tables.hpp" + #include void init_hooks_quests() diff --git a/src/skills.cc b/src/skills.cc index 0832f294..b67c8cae 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -22,6 +22,7 @@ #include "object2.hpp" #include "spells1.hpp" #include "spells4.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/spells1.cc b/src/spells1.cc index 178df200..b7d73aa8 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -26,6 +26,7 @@ #include "spells4.hpp" #include "spells5.hpp" #include "squeltch.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/spells2.cc b/src/spells2.cc index e25e606e..01772d68 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -24,6 +24,7 @@ #include "skills.hpp" #include "spells1.hpp" #include "spells3.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/spells3.cc b/src/spells3.cc index ad60494f..ebf2091d 100644 --- a/src/spells3.cc +++ b/src/spells3.cc @@ -16,6 +16,7 @@ #include "spells2.hpp" #include "spells4.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "util.hpp" #include "xtra2.hpp" diff --git a/src/squelch/rule.cc b/src/squelch/rule.cc index e8850247..3db3dae6 100644 --- a/src/squelch/rule.cc +++ b/src/squelch/rule.cc @@ -9,6 +9,7 @@ #include "../object1.hpp" #include "../object2.hpp" #include "../quark.h" +#include "../tables.hpp" #include "../util.hpp" namespace squelch { diff --git a/src/store.cc b/src/store.cc index 64a95a88..142c59d8 100644 --- a/src/store.cc +++ b/src/store.cc @@ -22,6 +22,7 @@ #include "spell_type.hpp" #include "skills.hpp" #include "spells5.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra1.hpp" diff --git a/src/tables.cc b/src/tables.cc index eb2c9ae1..c13ad2f4 100644 --- a/src/tables.cc +++ b/src/tables.cc @@ -1,7 +1,3 @@ -/* File: tables.c */ - -/* Purpose: Angband Tables */ - /* * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke * @@ -10,6 +6,9 @@ * included in all such copies. */ +#include "tables.hpp" +#include "tables.h" + #include "angband.h" #include "modules.hpp" #include "options.hpp" @@ -81,52 +80,6 @@ char hexsym[16] = }; -/* - * Stat Table (INT/WIS) -- Number of half-spells per level - */ -byte adj_mag_study[] = -{ - 0 /* 3 */, - 0 /* 4 */, - 0 /* 5 */, - 0 /* 6 */, - 0 /* 7 */, - 1 /* 8 */, - 1 /* 9 */, - 1 /* 10 */, - 1 /* 11 */, - 2 /* 12 */, - 2 /* 13 */, - 2 /* 14 */, - 2 /* 15 */, - 2 /* 16 */, - 2 /* 17 */, - 2 /* 18/00-18/09 */, - 2 /* 18/10-18/19 */, - 2 /* 18/20-18/29 */, - 2 /* 18/30-18/39 */, - 2 /* 18/40-18/49 */, - 3 /* 18/50-18/59 */, - 3 /* 18/60-18/69 */, - 3 /* 18/70-18/79 */, - 3 /* 18/80-18/89 */, - 4 /* 18/90-18/99 */, - 4 /* 18/100-18/109 */, - 4 /* 18/110-18/119 */, - 5 /* 18/120-18/129 */, - 5 /* 18/130-18/139 */, - 5 /* 18/140-18/149 */, - 5 /* 18/150-18/159 */, - 5 /* 18/160-18/169 */, - 5 /* 18/170-18/179 */, - 5 /* 18/180-18/189 */, - 5 /* 18/190-18/199 */, - 5 /* 18/200-18/209 */, - 6 /* 18/210-18/219 */, - 6 /* 18/220+ */ -}; - - /* * Stat Table (INT/WIS) -- extra half-mana-points per level */ @@ -311,52 +264,6 @@ byte adj_chr_gold[] = }; -/* - * Stat Table (INT) -- Magic devices - */ -byte adj_int_dev[] = -{ - 0 /* 3 */, - 0 /* 4 */, - 0 /* 5 */, - 0 /* 6 */, - 0 /* 7 */, - 1 /* 8 */, - 1 /* 9 */, - 1 /* 10 */, - 1 /* 11 */, - 1 /* 12 */, - 1 /* 13 */, - 1 /* 14 */, - 2 /* 15 */, - 2 /* 16 */, - 2 /* 17 */, - 3 /* 18/00-18/09 */, - 3 /* 18/10-18/19 */, - 4 /* 18/20-18/29 */, - 4 /* 18/30-18/39 */, - 5 /* 18/40-18/49 */, - 5 /* 18/50-18/59 */, - 6 /* 18/60-18/69 */, - 6 /* 18/70-18/79 */, - 7 /* 18/80-18/89 */, - 7 /* 18/90-18/99 */, - 8 /* 18/100-18/109 */, - 9 /* 18/110-18/119 */, - 10 /* 18/120-18/129 */, - 11 /* 18/130-18/139 */, - 12 /* 18/140-18/149 */, - 13 /* 18/150-18/159 */, - 14 /* 18/160-18/169 */, - 15 /* 18/170-18/179 */, - 16 /* 18/180-18/189 */, - 17 /* 18/190-18/199 */, - 18 /* 18/200-18/209 */, - 19 /* 18/210-18/219 */, - 20 /* 18/220+ */ -}; - - /* * Stat Table (WIS) -- Saving throw */ @@ -2433,43 +2340,6 @@ magic_power symbiotic_powers[MAX_SYMBIOTIC_POWERS] = }; -/* - * Textual translation of your god's "niceness". - */ - -cptr deity_niceness[10] = -{ - "a lovable deity", - "a friendly deity", - "an easygoing deity", - "a forgiving deity", - "an uncaring deity", - "a wary deity", - "an unforgiving deity", - "an impatient deity", - "a wrathful deity", - "an easily angered deity" -}; - -/* - * Textual translation of your standing with your god. - */ - -cptr deity_standing[11] = -{ - "cursed", - "persecuted", - "punished", - "despised", - "disliked", - "watched", - "unnoticed", - "noticed", - "rewarded", - "favored", - "championed" -}; - /* * Name and description (max. 10 lines) of the gods. * Only the first four lines are printed at birth. diff --git a/src/tables.h b/src/tables.h new file mode 100644 index 00000000..9a5cfb58 --- /dev/null +++ b/src/tables.h @@ -0,0 +1,12 @@ +#pragma once + +// C linkage required for these functions since main-* code uses them. +#ifdef __cplusplus +extern "C" { +#endif + +extern char hexsym[16]; + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/src/tables.hpp b/src/tables.hpp new file mode 100644 index 00000000..ac478008 --- /dev/null +++ b/src/tables.hpp @@ -0,0 +1,62 @@ +#pragma once + +#include "angband.h" + +extern s16b ddd[9]; +extern s16b ddx[10]; +extern s16b ddy[10]; +extern s16b ddx_ddd[9]; +extern s16b ddy_ddd[9]; +extern byte adj_mag_mana[]; +extern byte adj_mag_fail[]; +extern byte adj_mag_stat[]; +extern byte adj_chr_gold[]; +extern byte adj_wis_sav[]; +extern byte adj_dex_dis[]; +extern byte adj_int_dis[]; +extern byte adj_dex_ta[]; +extern byte adj_str_td[]; +extern byte adj_dex_th[]; +extern byte adj_str_th[]; +extern byte adj_str_wgt[]; +extern byte adj_str_hold[]; +extern byte adj_str_dig[]; +extern byte adj_str_blow[]; +extern byte adj_dex_blow[]; +extern byte adj_dex_safe[]; +extern byte adj_con_fix[]; +extern byte adj_con_mhp[]; +extern byte blows_table[12][12]; +extern byte extract_energy[300]; +extern s32b player_exp[PY_MAX_LEVEL]; +extern player_sex sex_info[MAX_SEXES]; +extern cptr color_names[16]; +extern cptr stat_names[6]; +extern cptr stat_names_reduced[6]; +extern cptr window_flag_desc[32]; +extern option_type option_info[]; +extern martial_arts bear_blows[MAX_BEAR]; +extern martial_arts ma_blows[MAX_MA]; +extern magic_power mindcraft_powers[MAX_MINDCRAFT_POWERS]; +extern magic_power necro_powers[MAX_NECRO_POWERS]; +extern magic_power mimic_powers[MAX_MIMIC_POWERS]; +extern magic_power symbiotic_powers[MAX_SYMBIOTIC_POWERS]; +extern move_info_type move_info[9]; +extern tactic_info_type tactic_info[9]; +extern activation activation_info[MAX_T_ACT]; +extern inscription_info_type inscription_info[MAX_INSCRIPTIONS]; +extern cptr sense_desc[]; +extern flags_group flags_groups[MAX_FLAG_GROUP]; +extern power_type powers_type[POWER_MAX]; +extern cptr artifact_names_list; +extern monster_power monster_powers[96]; +extern tval_desc tval_descs[]; +extern between_exit between_exits[MAX_BETWEEN_EXITS]; +extern int month_day[9]; +extern cptr month_name[9]; +extern cli_comm *cli_info; +extern int cli_total; +extern quest_type quest[MAX_Q_IDX]; +extern int max_body_part[BODY_MAX]; +extern gf_name_type gf_names[]; +extern module_type modules[MAX_MODULES]; diff --git a/src/traps.cc b/src/traps.cc index 73d4cc5a..9b271167 100644 --- a/src/traps.cc +++ b/src/traps.cc @@ -18,6 +18,7 @@ #include "object2.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "xtra1.hpp" #include "xtra2.hpp" diff --git a/src/util.cc b/src/util.cc index 76327883..bb632066 100644 --- a/src/util.cc +++ b/src/util.cc @@ -12,6 +12,8 @@ #include "messages.h" #include "options.hpp" #include "quark.h" +#include "tables.h" +#include "tables.hpp" #include "xtra1.hpp" #include diff --git a/src/wild.cc b/src/wild.cc index f0fe451c..307705bc 100644 --- a/src/wild.cc +++ b/src/wild.cc @@ -14,6 +14,7 @@ #include "init1.hpp" #include "monster2.hpp" #include "options.hpp" +#include "tables.hpp" #include "util.hpp" #include diff --git a/src/wizard1.cc b/src/wizard1.cc index 1014fab0..ad830625 100644 --- a/src/wizard1.cc +++ b/src/wizard1.cc @@ -4,6 +4,7 @@ #include "cmd7.hpp" #include "object1.hpp" #include "object2.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" diff --git a/src/wizard2.cc b/src/wizard2.cc index 27e964cc..2c499fce 100644 --- a/src/wizard2.cc +++ b/src/wizard2.cc @@ -21,6 +21,7 @@ #include "status.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "traps.hpp" #include "util.hpp" #include "util.h" diff --git a/src/xtra1.cc b/src/xtra1.cc index 27a8eb81..f1805c38 100644 --- a/src/xtra1.cc +++ b/src/xtra1.cc @@ -26,6 +26,7 @@ #include "skills.hpp" #include "spells3.hpp" #include "spells6.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "xtra2.hpp" diff --git a/src/xtra2.cc b/src/xtra2.cc index 16d1f432..e6deb848 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -28,6 +28,7 @@ #include "skills.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "tables.hpp" #include "util.hpp" #include "util.h" #include "wizard2.hpp" -- cgit v1.2.3