OSDN Git Service

[Refactor] #37353 building と building_type 構造体を bldg.h へ移動。
authordeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 14:49:06 +0000 (23:49 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 25 Apr 2019 14:49:06 +0000 (23:49 +0900)
src/bldg.c
src/bldg.h
src/dungeon-file.c
src/externs.h
src/init.c
src/types.h
src/variable.c
src/xtra2.c

index 5fb44c7..599b18f 100644 (file)
 #include "shoot.h"
 #include "view-mainwindow.h"
 
+
+/*
+ * Buildings
+ */
+building_type building[MAX_BLDG];
+
+
 /*!
  * @brief 闘技場のモンスターID及び報酬アイテムテーブル
  */
index b0df2a6..9503c70 100644 (file)
@@ -1,6 +1,32 @@
 #pragma once
 
 /*
+ * A structure to describe a building.
+ * From Kamband
+ */
+typedef struct building_type building_type;
+
+struct building_type
+{
+       GAME_TEXT name[20];                  /* proprietor name */
+       GAME_TEXT owner_name[20];            /* proprietor name */
+       GAME_TEXT owner_race[20];            /* proprietor race */
+
+       GAME_TEXT act_names[8][30];          /* action names */
+       PRICE member_costs[8];           /* Costs for class members of building */
+       PRICE other_costs[8];               /* Costs for nonguild members */
+       char letters[8];                /* action letters */
+       BACT_IDX actions[8];                /* action codes */
+       BACT_RESTRICT_IDX action_restr[8];           /* action restrictions */
+
+       CLASS_IDX member_class[MAX_CLASS];   /* which classes are part of guild */
+       RACE_IDX member_race[MAX_RACES];    /* which classes are part of guild */
+       REALM_IDX member_realm[MAX_MAGIC + 1]; /* which realms are part of guild */
+};
+
+extern building_type building[MAX_BLDG];
+
+/*
  * Buildings actions
  */
 #define BACT_NOTHING                 0
index 7275fab..f402359 100644 (file)
@@ -10,6 +10,7 @@
 #include "files.h"
 #include "player-skill.h"
 #include "floor.h"
+#include "bldg.h"
 
 dungeon_grid letter[255];
 
index fedb549..719d442 100644 (file)
@@ -286,7 +286,7 @@ extern bool (*item_tester_hook)(object_type *o_ptr);
 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 building_type building[MAX_BLDG];
+
 extern QUEST_IDX max_q_idx;
 extern MONRACE_IDX max_r_idx;
 extern KIND_OBJECT_IDX max_k_idx;
index ee3c214..e3e805c 100644 (file)
@@ -36,6 +36,7 @@
 #include "util.h"
 
 #include "artifact.h"
+#include "bldg.h"
 #include "init.h"
 #include "quest.h"
 #include "trap.h"
index 6c86b1f..ac060fb 100644 (file)
@@ -1795,31 +1795,6 @@ struct monster_power
 };
 
 
-/*
- * A structure to describe a building.
- * From Kamband
- */
-typedef struct building_type building_type;
-
-struct building_type
-{
-       GAME_TEXT name[20];                  /* proprietor name */
-       GAME_TEXT owner_name[20];            /* proprietor name */
-       GAME_TEXT owner_race[20];            /* proprietor race */
-
-       GAME_TEXT act_names[8][30];          /* action names */
-       PRICE member_costs[8];           /* Costs for class members of building */
-       PRICE other_costs[8];               /* Costs for nonguild members */
-       char letters[8];                /* action letters */
-       BACT_IDX actions[8];                /* action codes */
-       BACT_RESTRICT_IDX action_restr[8];           /* action restrictions */
-
-       CLASS_IDX member_class[MAX_CLASS];   /* which classes are part of guild */
-       RACE_IDX member_race[MAX_RACES];    /* which classes are part of guild */
-       REALM_IDX member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
-};
-
-
 /* Border */
 typedef struct border_type border_type;
 struct border_type
index dce75b3..05067bb 100644 (file)
@@ -642,12 +642,6 @@ monsterrace_hook_type get_mon_num2_hook;
 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
 
 /*
- * Buildings
- */
-building_type building[MAX_BLDG];
-
-
-/*
  * Maximum number of quests
  */
 QUEST_IDX max_q_idx;
index de0a1e4..f6d6c79 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "bldg.h"
 #include "cmd-pet.h"
 #include "dungeon-file.h"
 #include "object-curse.h"