From 3d13f588b3927f2a2732959a7702b577a4642d34 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 7 Mar 2015 16:55:41 +0100 Subject: Split init2.cc declarations to separate header files --- src/birth.cc | 1 + src/dungeon.cc | 1 + src/externs.h | 11 ----------- src/init1.cc | 1 + src/init2.cc | 3 +++ src/init2.h | 14 ++++++++++++++ src/init2.hpp | 9 +++++++++ src/loadsave.cc | 1 + src/main-win.c | 1 + src/main.c | 1 + src/script.cc | 1 + 11 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 src/init2.h create mode 100644 src/init2.hpp diff --git a/src/birth.cc b/src/birth.cc index f8c5d5f7..6de84478 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -16,6 +16,7 @@ #include "gods.hpp" #include "help.hpp" #include "hooks.h" +#include "init2.hpp" #include "mimic.hpp" #include "messages.h" #include "modules.hpp" diff --git a/src/dungeon.cc b/src/dungeon.cc index 771d47c1..b4a12438 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -27,6 +27,7 @@ #include "gods.hpp" #include "help.hpp" #include "hooks.h" +#include "init2.hpp" #include "levels.hpp" #include "loadsave.h" #include "loadsave.hpp" diff --git a/src/externs.h b/src/externs.h index 853951f9..78551007 100644 --- a/src/externs.h +++ b/src/externs.h @@ -462,17 +462,6 @@ extern const char *get_version_string(); /* birth.c */ extern bool_ no_begin_screen; -/* init2.c */ -extern void init_corruptions(); -extern void create_stores_stock(int t); -extern errr init_v_info(void); -extern void init_file_paths(char *path); -extern void init_file_paths_with_env(); -extern void init_angband(void); -extern errr init_buildings(void); -extern s16b error_idx; -extern s16b error_line; - /* joke.c */ extern bool_ gen_joke_monsters(void *data, void *in, void *out); diff --git a/src/init1.cc b/src/init1.cc index b3b1f22d..cc6c265e 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -4,6 +4,7 @@ #include "cave.hpp" #include "files.hpp" #include "gods.hpp" +#include "init2.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/init2.cc b/src/init2.cc index 9669279b..d43a0c6d 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -1,3 +1,6 @@ +#include "init2.hpp" +#include "init2.h" + #include "angband.h" #include "cave.hpp" #include "files.hpp" diff --git a/src/init2.h b/src/init2.h new file mode 100644 index 00000000..5697e4ef --- /dev/null +++ b/src/init2.h @@ -0,0 +1,14 @@ +#pragma once + +// C linkage required for these functions since main-* code uses them. +#ifdef __cplusplus +extern "C" { +#endif + +extern void init_file_paths(char *path); +extern void init_file_paths_with_env(); +extern void init_angband(void); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/src/init2.hpp b/src/init2.hpp new file mode 100644 index 00000000..707a2706 --- /dev/null +++ b/src/init2.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "h-basic.h" + +extern void init_corruptions(); +extern void create_stores_stock(int t); +extern errr init_v_info(void); +extern s16b error_idx; +extern s16b error_line; diff --git a/src/loadsave.cc b/src/loadsave.cc index 0080e40c..456ba777 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -4,6 +4,7 @@ #include "angband.h" #include "birth.hpp" #include "init1.hpp" +#include "init2.hpp" #include "levels.hpp" #include "messages.h" #include "modules.hpp" diff --git a/src/main-win.c b/src/main-win.c index 0caecbd5..b532c138 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -70,6 +70,7 @@ #include "angband.h" #include "dungeon.h" #include "files.h" +#include "init2.h" #include "util.h" #ifdef WINDOWS diff --git a/src/main.c b/src/main.c index f93bcb87..e6a0514f 100644 --- a/src/main.c +++ b/src/main.c @@ -11,6 +11,7 @@ #include "angband.h" #include "dungeon.h" #include "files.h" +#include "init2.h" #include "util.h" diff --git a/src/script.cc b/src/script.cc index 1c1cab68..4c964c0c 100644 --- a/src/script.cc +++ b/src/script.cc @@ -11,6 +11,7 @@ */ #include "angband.h" +#include "init2.hpp" #include "q_library.h" #include "spells4.hpp" #include "spells5.hpp" -- cgit v1.2.3