From: deskull Date: Mon, 13 May 2019 11:54:18 +0000 (+0900) Subject: [Refactor] #37353 init_flags, INIT_* フラグを core.h へ移動. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=eefa4c7ba1d8f2e030003bccba151e6ae18d527d;p=hengband%2Fhengband.git [Refactor] #37353 init_flags, INIT_* フラグを core.h へ移動. --- diff --git a/src/birth.c b/src/birth.c index 937a4ff34..32b6248ad 100644 --- a/src/birth.c +++ b/src/birth.c @@ -14,6 +14,7 @@ #include "angband.h" #include "util.h" #include "bldg.h" +#include "core.h" #include "artifact.h" #include "avatar.h" diff --git a/src/cmd-basic.c b/src/cmd-basic.c index 18713febf..5a67543ec 100644 --- a/src/cmd-basic.c +++ b/src/cmd-basic.c @@ -12,6 +12,7 @@ #include "angband.h" #include "util.h" +#include "core.h" #include "cmd-dump.h" #include "chest.h" diff --git a/src/cmd-dump.c b/src/cmd-dump.c index 5f32597bc..911b787de 100644 --- a/src/cmd-dump.c +++ b/src/cmd-dump.c @@ -44,6 +44,7 @@ #include "cmd-dump.h" #include "term.h" #include "inet.h" +#include "core.h" #include "autopick.h" diff --git a/src/core.c b/src/core.c index 41ba0a220..02937d187 100644 --- a/src/core.c +++ b/src/core.c @@ -109,6 +109,11 @@ concptr ANGBAND_GRAF = "ascii"; //!< Hack -- The special Angband "Graphics Suffi static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/ static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/ +/* + * Flags for initialization + */ +int init_flags; + /*! * @brief 擬似鑑定を実際に行い判定を反映する * @param slot 擬似鑑定を行うプレイヤーの所持リストID diff --git a/src/core.h b/src/core.h index a444bf81f..0cc1e8525 100644 --- a/src/core.h +++ b/src/core.h @@ -2,6 +2,18 @@ extern const concptr copyright[5]; + +/* + * Initialization flags + */ +#define INIT_NAME_ONLY 0x01 +#define INIT_SHOW_TEXT 0x02 +#define INIT_ASSIGN 0x04 +#define INIT_CREATE_DUNGEON 0x08 +#define INIT_ONLY_FEATURES 0x10 +#define INIT_ONLY_BUILDINGS 0x20 +extern int init_flags; + extern concptr ANGBAND_SYS; extern concptr ANGBAND_KEYBOARD; extern concptr ANGBAND_GRAF; diff --git a/src/defines.h b/src/defines.h index 5cb3c7bab..bcd4f663b 100644 --- a/src/defines.h +++ b/src/defines.h @@ -2591,15 +2591,6 @@ extern int PlayerUID; -/* - * Initialization flags - */ -#define INIT_NAME_ONLY 0x01 -#define INIT_SHOW_TEXT 0x02 -#define INIT_ASSIGN 0x04 -#define INIT_CREATE_DUNGEON 0x08 -#define INIT_ONLY_FEATURES 0x10 -#define INIT_ONLY_BUILDINGS 0x20 /* diff --git a/src/externs.h b/src/externs.h index 015c278c7..c3e4f12e0 100644 --- a/src/externs.h +++ b/src/externs.h @@ -112,7 +112,6 @@ extern monsterrace_hook_type get_mon_num_hook; extern monsterrace_hook_type get_mon_num2_hook; extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx); -extern int init_flags; extern int highscore_fd; extern bool can_save; diff --git a/src/floor-generate.c b/src/floor-generate.c index acf2c2666..05a960fa3 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -98,6 +98,7 @@ #include "angband.h" #include "util.h" +#include "core.h" #include "bldg.h" #include "cmd-dump.h" diff --git a/src/load.c b/src/load.c index 9e1eed32e..6983d915d 100644 --- a/src/load.c +++ b/src/load.c @@ -42,8 +42,9 @@ #include "angband.h" #include "util.h" -#include "load.h" +#include "core.h" +#include "load.h" #include "bldg.h" #include "report.h" diff --git a/src/targeting.c b/src/targeting.c index 0e8fdb9c8..049aa007d 100644 --- a/src/targeting.c +++ b/src/targeting.c @@ -13,6 +13,7 @@ #include "angband.h" #include "util.h" +#include "core.h" #include "targeting.h" #include "bldg.h" diff --git a/src/variable.c b/src/variable.c index 7ea8b714c..e6b1bb925 100644 --- a/src/variable.c +++ b/src/variable.c @@ -191,11 +191,6 @@ monsterrace_hook_type get_mon_num2_hook; */ bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx); -/* - * Flags for initialization - */ -int init_flags; - /* * The "highscore" file descriptor, if available. diff --git a/src/wild.c b/src/wild.c index b49505253..9178fbc55 100644 --- a/src/wild.c +++ b/src/wild.c @@ -12,6 +12,7 @@ #include "angband.h" #include "util.h" +#include "core.h" #include "dungeon.h" #include "floor.h"