OSDN Git Service

[Refactor] #40399 Moved all global variables from object2.c/h to system-variables.c/h
authorHourier <hourier@users.sourceforge.jp>
Wed, 3 Jun 2020 11:08:14 +0000 (20:08 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 3 Jun 2020 11:08:14 +0000 (20:08 +0900)
src/floor/floor-object.c
src/monster/monster1.c
src/object-enchant/artifact.c
src/object/object2.c
src/object/object2.h
src/room/rooms-special.c
src/room/rooms-special.h
src/system/system-variables.c
src/system/system-variables.h

index f7327d6..3718538 100644 (file)
@@ -19,6 +19,7 @@
 #include "object/object-stack.h"
 #include "object/object2.h"
 #include "object-enchant/special-object-flags.h"
+#include "system/system-variables.h"
 #include "view/object-describer.h"
 #include "world/world-object.h"
 #include "world/world.h"
index 5911826..adb9a8f 100644 (file)
@@ -50,6 +50,7 @@
 #include "sv-definition/sv-protector-types.h"
 #include "sv-definition/sv-scroll-types.h"
 #include "sv-definition/sv-weapon-types.h"
+#include "system/system-variables.h"
 #include "object/object2.h"
 #include "object/object-generator.h"
 
index ca22ae6..3e5dd91 100644 (file)
@@ -33,6 +33,7 @@
 #include "object-enchant/special-object-flags.h"
 #include "sv-definition/sv-armor-types.h"
 #include "sv-definition/sv-weapon-types.h"
+#include "system/system-variables.h"
 #include "object-enchant/tr-types.h"
 #include "object-enchant/trc-types.h"
 #include "player/avatar.h"
index 73e8185..c01ab4c 100644 (file)
@@ -34,9 +34,3 @@
  * Chests, and activatable items, never stack (for various reasons).
  */
 
-/*!
- * Function hook to restrict "get_obj_num_prep()" function
- */
-bool(*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
-
-OBJECT_SUBTYPE_VALUE coin_type;        /* Hack -- force coin type */
index 604dccb..0d8a6f7 100644 (file)
@@ -3,6 +3,3 @@
 #include "system/angband.h"
 #include "floor/floor.h"
 #include "object-enchant/item-feeling.h"
-
-extern OBJECT_SUBTYPE_VALUE coin_type;
-extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
index 3e7492d..d08c1a5 100644 (file)
@@ -1,17 +1,17 @@
-#include "system/angband.h"
-#include "util/util.h"
-
-#include "grid/grid.h"
+#include "room/rooms-special.h"
+#include "dungeon/dungeon.h"
 #include "floor/floor-generate.h"
-#include "room/rooms.h"
-#include "monster/monster.h"
+#include "floor/floor.h"
+#include "grid/feature.h"
+#include "grid/grid.h"
 #include "monster/monster-race-hook.h"
+#include "monster/monster.h"
 #include "object-enchant/item-apply-magic.h"
 #include "object/object-kind-hook.h"
 #include "object/object2.h"
-#include "grid/feature.h"
-#include "floor/floor.h"
-#include "dungeon/dungeon.h"
+#include "room/rooms.h"
+#include "system/system-variables.h"
+#include "util/util.h"
 
 /*!
 * @brief タイプ15の部屋…ガラス部屋の生成 / Type 15 -- glass rooms
index 8baaf0f..f2e7bb7 100644 (file)
@@ -1,2 +1,5 @@
-extern bool build_type15(player_type *player_ptr);
+#pragma once
 
+#include "system/angband.h"
+
+bool build_type15(player_type *player_ptr);
index a9dd70b..45a00ab 100644 (file)
@@ -4,7 +4,6 @@
  * @date 2013/12/31
  */
 
-#include "system/angband.h"
 #include "system/system-variables.h"
 
  /*!
@@ -24,3 +23,10 @@ concptr ANGBAND_SYS = "xxx";
 concptr ANGBAND_KEYBOARD = _("JAPAN", "0");
 concptr ANGBAND_GRAF = "ascii";
 int init_flags;
+
+/*!
+ * Function hook to restrict "get_obj_num_prep()" function
+ */
+bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
+
+OBJECT_SUBTYPE_VALUE coin_type;
index 5564ea4..79d1653 100644 (file)
@@ -1,6 +1,11 @@
 #pragma once
 
+#include "system/angband.h"
+
 extern int init_flags;
 extern concptr ANGBAND_SYS;
 extern concptr ANGBAND_KEYBOARD;
 extern concptr ANGBAND_GRAF;
+
+extern OBJECT_SUBTYPE_VALUE coin_type;
+extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);