• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision277715da33b7db52b0c3ac034614ac0bfb8a8c53 (tree)
Time2019-04-25 23:49:06
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 building と building_type 構造体を bldg.h へ移動。

Change Summary

Incremental Difference

--- a/src/bldg.c
+++ b/src/bldg.c
@@ -47,6 +47,13 @@
4747 #include "shoot.h"
4848 #include "view-mainwindow.h"
4949
50+
51+/*
52+ * Buildings
53+ */
54+building_type building[MAX_BLDG];
55+
56+
5057 /*!
5158 * @brief 闘技場のモンスターID及び報酬アイテムテーブル
5259 */
--- a/src/bldg.h
+++ b/src/bldg.h
@@ -1,6 +1,32 @@
11 #pragma once
22
33 /*
4+ * A structure to describe a building.
5+ * From Kamband
6+ */
7+typedef struct building_type building_type;
8+
9+struct building_type
10+{
11+ GAME_TEXT name[20]; /* proprietor name */
12+ GAME_TEXT owner_name[20]; /* proprietor name */
13+ GAME_TEXT owner_race[20]; /* proprietor race */
14+
15+ GAME_TEXT act_names[8][30]; /* action names */
16+ PRICE member_costs[8]; /* Costs for class members of building */
17+ PRICE other_costs[8]; /* Costs for nonguild members */
18+ char letters[8]; /* action letters */
19+ BACT_IDX actions[8]; /* action codes */
20+ BACT_RESTRICT_IDX action_restr[8]; /* action restrictions */
21+
22+ CLASS_IDX member_class[MAX_CLASS]; /* which classes are part of guild */
23+ RACE_IDX member_race[MAX_RACES]; /* which classes are part of guild */
24+ REALM_IDX member_realm[MAX_MAGIC + 1]; /* which realms are part of guild */
25+};
26+
27+extern building_type building[MAX_BLDG];
28+
29+/*
430 * Buildings actions
531 */
632 #define BACT_NOTHING 0
--- a/src/dungeon-file.c
+++ b/src/dungeon-file.c
@@ -10,6 +10,7 @@
1010 #include "files.h"
1111 #include "player-skill.h"
1212 #include "floor.h"
13+#include "bldg.h"
1314
1415 dungeon_grid letter[255];
1516
--- a/src/externs.h
+++ b/src/externs.h
@@ -286,7 +286,7 @@ extern bool (*item_tester_hook)(object_type *o_ptr);
286286 extern monsterrace_hook_type get_mon_num_hook;
287287 extern monsterrace_hook_type get_mon_num2_hook;
288288 extern bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
289-extern building_type building[MAX_BLDG];
289+
290290 extern QUEST_IDX max_q_idx;
291291 extern MONRACE_IDX max_r_idx;
292292 extern KIND_OBJECT_IDX max_k_idx;
--- a/src/init.c
+++ b/src/init.c
@@ -36,6 +36,7 @@
3636 #include "util.h"
3737
3838 #include "artifact.h"
39+#include "bldg.h"
3940 #include "init.h"
4041 #include "quest.h"
4142 #include "trap.h"
--- a/src/types.h
+++ b/src/types.h
@@ -1795,31 +1795,6 @@ struct monster_power
17951795 };
17961796
17971797
1798-/*
1799- * A structure to describe a building.
1800- * From Kamband
1801- */
1802-typedef struct building_type building_type;
1803-
1804-struct building_type
1805-{
1806- GAME_TEXT name[20]; /* proprietor name */
1807- GAME_TEXT owner_name[20]; /* proprietor name */
1808- GAME_TEXT owner_race[20]; /* proprietor race */
1809-
1810- GAME_TEXT act_names[8][30]; /* action names */
1811- PRICE member_costs[8]; /* Costs for class members of building */
1812- PRICE other_costs[8]; /* Costs for nonguild members */
1813- char letters[8]; /* action letters */
1814- BACT_IDX actions[8]; /* action codes */
1815- BACT_RESTRICT_IDX action_restr[8]; /* action restrictions */
1816-
1817- CLASS_IDX member_class[MAX_CLASS]; /* which classes are part of guild */
1818- RACE_IDX member_race[MAX_RACES]; /* which classes are part of guild */
1819- REALM_IDX member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
1820-};
1821-
1822-
18231798 /* Border */
18241799 typedef struct border_type border_type;
18251800 struct border_type
--- a/src/variable.c
+++ b/src/variable.c
@@ -642,12 +642,6 @@ monsterrace_hook_type get_mon_num2_hook;
642642 bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
643643
644644 /*
645- * Buildings
646- */
647-building_type building[MAX_BLDG];
648-
649-
650-/*
651645 * Maximum number of quests
652646 */
653647 QUEST_IDX max_q_idx;
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -14,6 +14,7 @@
1414 #include "angband.h"
1515 #include "util.h"
1616
17+#include "bldg.h"
1718 #include "cmd-pet.h"
1819 #include "dungeon-file.h"
1920 #include "object-curse.h"
Show on old repository browser