From 5fbaba97d2613e30671a447a10093c4fd9df2e96 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 7 Mar 2015 16:55:41 +0100 Subject: Split init1.cc declarations into separate header file --- src/cmd4.cc | 1 + src/corrupt.cc | 3 ++- src/externs.h | 25 ------------------------- src/files.cc | 1 + src/generate.cc | 1 + src/init1.cc | 2 ++ src/init1.hpp | 27 +++++++++++++++++++++++++++ src/init2.cc | 1 + src/levels.cc | 1 + src/loadsave.cc | 1 + src/lua_bind.cc | 1 + src/q_betwen.cc | 1 + src/q_dragons.cc | 1 + src/q_evil.cc | 1 + src/q_haunted.cc | 1 + src/q_invas.cc | 1 + src/q_nirna.cc | 1 + src/q_rand.cc | 1 + src/q_spider.cc | 1 + src/q_thief.cc | 1 + src/q_thrain.cc | 1 + src/q_troll.cc | 1 + src/q_wight.cc | 1 + src/q_wolves.cc | 1 + src/util.cc | 2 ++ src/wild.cc | 1 + 26 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 src/init1.hpp (limited to 'src') diff --git a/src/cmd4.cc b/src/cmd4.cc index 0b8a52b6..73af4b7d 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -11,6 +11,7 @@ #include "corrupt.hpp" #include "files.hpp" #include "hooks.h" +#include "init1.hpp" #include "levels.hpp" #include "messages.h" #include "monster2.hpp" diff --git a/src/corrupt.cc b/src/corrupt.cc index c5dd5c51..7dc1bdc6 100644 --- a/src/corrupt.cc +++ b/src/corrupt.cc @@ -1,6 +1,7 @@ #include "angband.h" -#include "xtra2.hpp" +#include "init1.hpp" #include "util.hpp" +#include "xtra2.hpp" #include diff --git a/src/externs.h b/src/externs.h index 1446de5d..853951f9 100644 --- a/src/externs.h +++ b/src/externs.h @@ -462,31 +462,6 @@ extern const char *get_version_string(); /* birth.c */ extern bool_ no_begin_screen; -/* init1.c */ -extern int color_char_to_attr(char c); -extern byte conv_color[16]; -extern errr init_player_info_txt(FILE *fp, char *buf); -extern errr init_ab_info_txt(FILE *fp, char *buf); -extern errr init_s_info_txt(FILE *fp, char *buf); -extern errr init_set_info_txt(FILE *fp, char *buf); -extern errr init_v_info_txt(FILE *fp, char *buf); -extern errr init_f_info_txt(FILE *fp, char *buf); -extern errr init_k_info_txt(FILE *fp, char *buf); -extern errr init_a_info_txt(FILE *fp, char *buf); -extern errr init_al_info_txt(FILE *fp, char *buf); -extern errr init_ra_info_txt(FILE *fp, char *buf); -extern errr init_e_info_txt(FILE *fp, char *buf); -extern errr init_r_info_txt(FILE *fp, char *buf); -extern errr init_re_info_txt(FILE *fp, char *buf); -extern errr grab_one_dungeon_flag(u32b *flags1, u32b *flags2, cptr what); -extern errr init_d_info_txt(FILE *fp, char *buf); -extern errr init_t_info_txt(FILE *fp, char *buf); -extern errr init_ba_info_txt(FILE *fp, char *buf); -extern errr init_st_info_txt(FILE *fp, char *buf); -extern errr init_ow_info_txt(FILE *fp, char *buf); -extern errr init_wf_info_txt(FILE *fp, char *buf); -extern errr process_dungeon_file(cptr name, int *yval, int *xval, int ymax, int xmax, bool_ init, bool_ full); - /* init2.c */ extern void init_corruptions(); extern void create_stores_stock(int t); diff --git a/src/files.cc b/src/files.cc index e70ff16c..0a154c42 100644 --- a/src/files.cc +++ b/src/files.cc @@ -15,6 +15,7 @@ #include "cmd3.hpp" #include "hiscore.h" #include "hooks.h" +#include "init1.hpp" #include "levels.hpp" #include "loadsave.h" #include "loadsave.hpp" diff --git a/src/generate.cc b/src/generate.cc index fcc81b0c..edd7ea35 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -9,6 +9,7 @@ #include "angband.h" #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "levels.hpp" #include "loadsave.hpp" #include "monster2.hpp" diff --git a/src/init1.cc b/src/init1.cc index 23431fe4..b3b1f22d 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -1,3 +1,5 @@ +#include "init1.hpp" + #include "angband.h" #include "cave.hpp" #include "files.hpp" diff --git a/src/init1.hpp b/src/init1.hpp new file mode 100644 index 00000000..e21bf7bc --- /dev/null +++ b/src/init1.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "h-basic.h" + +extern int color_char_to_attr(char c); +extern byte conv_color[16]; +extern errr init_player_info_txt(FILE *fp, char *buf); +extern errr init_ab_info_txt(FILE *fp, char *buf); +extern errr init_s_info_txt(FILE *fp, char *buf); +extern errr init_set_info_txt(FILE *fp, char *buf); +extern errr init_v_info_txt(FILE *fp, char *buf); +extern errr init_f_info_txt(FILE *fp, char *buf); +extern errr init_k_info_txt(FILE *fp, char *buf); +extern errr init_a_info_txt(FILE *fp, char *buf); +extern errr init_al_info_txt(FILE *fp, char *buf); +extern errr init_ra_info_txt(FILE *fp, char *buf); +extern errr init_e_info_txt(FILE *fp, char *buf); +extern errr init_r_info_txt(FILE *fp, char *buf); +extern errr init_re_info_txt(FILE *fp, char *buf); +extern errr grab_one_dungeon_flag(u32b *flags1, u32b *flags2, cptr what); +extern errr init_d_info_txt(FILE *fp, char *buf); +extern errr init_t_info_txt(FILE *fp, char *buf); +extern errr init_ba_info_txt(FILE *fp, char *buf); +extern errr init_st_info_txt(FILE *fp, char *buf); +extern errr init_ow_info_txt(FILE *fp, char *buf); +extern errr init_wf_info_txt(FILE *fp, char *buf); +extern errr process_dungeon_file(cptr name, int *yval, int *xval, int ymax, int xmax, bool_ init, bool_ full); diff --git a/src/init2.cc b/src/init2.cc index a96e2cf2..9669279b 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -5,6 +5,7 @@ #include "gen_evol.hpp" #include "gen_maze.hpp" #include "hooks.h" +#include "init1.hpp" #include "messages.h" #include "modules.hpp" #include "quark.h" diff --git a/src/levels.cc b/src/levels.cc index d22f5e70..2ecb6e6c 100644 --- a/src/levels.cc +++ b/src/levels.cc @@ -9,6 +9,7 @@ #include "levels.hpp" #include "angband.h" +#include "init1.hpp" #include "util.hpp" #include "util.h" diff --git a/src/loadsave.cc b/src/loadsave.cc index d8016b3d..0080e40c 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -3,6 +3,7 @@ #include "angband.h" #include "birth.hpp" +#include "init1.hpp" #include "levels.hpp" #include "messages.h" #include "modules.hpp" diff --git a/src/lua_bind.cc b/src/lua_bind.cc index a4ee94d0..97b9029f 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -14,6 +14,7 @@ #include "angband.h" #include "cmd7.hpp" #include "corrupt.hpp" +#include "init1.hpp" #include "monster2.hpp" #include "range.h" #include "skills.hpp" diff --git a/src/q_betwen.cc b/src/q_betwen.cc index c43edc6b..5cb0718c 100644 --- a/src/q_betwen.cc +++ b/src/q_betwen.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "util.hpp" diff --git a/src/q_dragons.cc b/src/q_dragons.cc index 161674f0..af781440 100644 --- a/src/q_dragons.cc +++ b/src/q_dragons.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" diff --git a/src/q_evil.cc b/src/q_evil.cc index bde340ba..ba3c1b59 100644 --- a/src/q_evil.cc +++ b/src/q_evil.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" diff --git a/src/q_haunted.cc b/src/q_haunted.cc index 37bc3855..5197a0d0 100644 --- a/src/q_haunted.cc +++ b/src/q_haunted.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "traps.hpp" #include "util.hpp" diff --git a/src/q_invas.cc b/src/q_invas.cc index 5656bdf5..9ce23286 100644 --- a/src/q_invas.cc +++ b/src/q_invas.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" diff --git a/src/q_nirna.cc b/src/q_nirna.cc index 89f64f67..a594584c 100644 --- a/src/q_nirna.cc +++ b/src/q_nirna.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" diff --git a/src/q_rand.cc b/src/q_rand.cc index 6a874bbc..a46c7fc6 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -3,6 +3,7 @@ #include "cave.hpp" #include "generate.hpp" #include "hooks.h" +#include "init1.hpp" #include "messages.h" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/q_spider.cc b/src/q_spider.cc index 8bd11faa..0ec5ac93 100644 --- a/src/q_spider.cc +++ b/src/q_spider.cc @@ -3,6 +3,7 @@ #include "cave.hpp" #include "gods.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "util.hpp" diff --git a/src/q_thief.cc b/src/q_thief.cc index 405b98e7..9c11eb58 100644 --- a/src/q_thief.cc +++ b/src/q_thief.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "spells2.hpp" diff --git a/src/q_thrain.cc b/src/q_thrain.cc index e8379aa1..1407d746 100644 --- a/src/q_thrain.cc +++ b/src/q_thrain.cc @@ -3,6 +3,7 @@ #include "cave.hpp" #include "generate.hpp" #include "hooks.h" +#include "init1.hpp" #include "quark.h" #include "randart.hpp" #include "messages.h" diff --git a/src/q_troll.cc b/src/q_troll.cc index 7301606c..08109c5a 100644 --- a/src/q_troll.cc +++ b/src/q_troll.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "util.hpp" diff --git a/src/q_wight.cc b/src/q_wight.cc index e5b75edd..fec3ba6b 100644 --- a/src/q_wight.cc +++ b/src/q_wight.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "object2.hpp" #include "quark.h" diff --git a/src/q_wolves.cc b/src/q_wolves.cc index 190d774e..b1d325cf 100644 --- a/src/q_wolves.cc +++ b/src/q_wolves.cc @@ -2,6 +2,7 @@ #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" diff --git a/src/util.cc b/src/util.cc index fbd2020c..0d312e2b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -4,9 +4,11 @@ #include "util.hpp" #include "util.h" + #include "angband.h" #include "cmd3.hpp" #include "cmd4.hpp" +#include "init1.hpp" #include "messages.h" #include "quark.h" #include "xtra1.hpp" diff --git a/src/wild.cc b/src/wild.cc index eb6539e3..aed243ba 100644 --- a/src/wild.cc +++ b/src/wild.cc @@ -11,6 +11,7 @@ #include "angband.h" #include "cave.hpp" #include "hooks.h" +#include "init1.hpp" #include "monster2.hpp" #include "util.hpp" -- cgit v1.2.3