• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionb3009b49191beecd77a6d41425347c9d6faf648e (tree)
Time2019-05-02 20:19:25
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 store_type 構造体定義を store.h に移動して関連変数を整理.

Change Summary

Incremental Difference

--- a/src/floor-town.h
+++ b/src/floor-town.h
@@ -1,4 +1,5 @@
11 #pragma once
2+#include "store.h"
23
34 /*
45 * A structure describing a town with
--- a/src/store.h
+++ b/src/store.h
@@ -16,6 +16,38 @@ struct owner_type
1616 byte owner_race; /* Owner race */
1717 };
1818
19+
20+/*
21+ * A store, with an owner, various state flags, a current stock
22+ * of items, and a table of items that are often purchased.
23+ */
24+typedef struct store_type store_type;
25+
26+struct store_type
27+{
28+ byte type; /* Store type */
29+
30+ byte owner; /* Owner index */
31+ byte extra; /* Unused for now */
32+
33+ s16b insult_cur; /* Insult counter */
34+
35+ s16b good_buy; /* Number of "good" buys */
36+ s16b bad_buy; /* Number of "bad" buys */
37+
38+ s32b store_open; /* Closed until this current_world_ptr->game_turn */
39+
40+ s32b last_visit; /* Last visited on this current_world_ptr->game_turn */
41+
42+ s16b table_num; /* Table -- Number of entries */
43+ s16b table_size; /* Table -- Total Size of Array */
44+ s16b *table; /* Table -- Legal item kinds */
45+
46+ s16b stock_num; /* Stock -- Number of entries */
47+ s16b stock_size; /* Stock -- Total Size of Array */
48+ object_type *stock; /* Stock -- Actual stock items */
49+};
50+
1951 /*
2052 * Store types
2153 */
--- a/src/types.h
+++ b/src/types.h
@@ -61,39 +61,6 @@ struct mbe_info_type
6161 int explode_type; /* Explosion effect */
6262 };
6363
64-
65-/*
66- * A store, with an owner, various state flags, a current stock
67- * of items, and a table of items that are often purchased.
68- */
69-typedef struct store_type store_type;
70-
71-struct store_type
72-{
73- byte type; /* Store type */
74-
75- byte owner; /* Owner index */
76- byte extra; /* Unused for now */
77-
78- s16b insult_cur; /* Insult counter */
79-
80- s16b good_buy; /* Number of "good" buys */
81- s16b bad_buy; /* Number of "bad" buys */
82-
83- s32b store_open; /* Closed until this current_world_ptr->game_turn */
84-
85- s32b last_visit; /* Last visited on this current_world_ptr->game_turn */
86-
87- s16b table_num; /* Table -- Number of entries */
88- s16b table_size; /* Table -- Total Size of Array */
89- s16b *table; /* Table -- Legal item kinds */
90-
91- s16b stock_num; /* Stock -- Number of entries */
92- s16b stock_size; /* Stock -- Total Size of Array */
93- object_type *stock; /* Stock -- Actual stock items */
94-};
95-
96-
9764 /*
9865 * The "name" of spell 'N' is stored as spell_names[X][N],
9966 * where X is 0 for mage-spells and 1 for priest-spells.
Show on old repository browser