From b3009b49191beecd77a6d41425347c9d6faf648e Mon Sep 17 00:00:00 2001 From: deskull Date: Thu, 2 May 2019 19:41:04 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20store=5Ftype=20=E6=A7=8B?= =?utf8?q?=E9=80=A0=E4=BD=93=E5=AE=9A=E7=BE=A9=E3=82=92=20store.h=20?= =?utf8?q?=E3=81=AB=E7=A7=BB=E5=8B=95=E3=81=97=E3=81=A6=E9=96=A2=E9=80=A3?= =?utf8?q?=E5=A4=89=E6=95=B0=E3=82=92=E6=95=B4=E7=90=86=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/floor-town.h | 1 + src/store.h | 32 ++++++++++++++++++++++++++++++++ src/types.h | 33 --------------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/floor-town.h b/src/floor-town.h index c0ceeeac3..8f4fc2ab5 100644 --- a/src/floor-town.h +++ b/src/floor-town.h @@ -1,4 +1,5 @@ #pragma once +#include "store.h" /* * A structure describing a town with diff --git a/src/store.h b/src/store.h index 9f731d895..a6bc43a33 100644 --- a/src/store.h +++ b/src/store.h @@ -16,6 +16,38 @@ struct owner_type byte owner_race; /* Owner race */ }; + +/* + * A store, with an owner, various state flags, a current stock + * of items, and a table of items that are often purchased. + */ +typedef struct store_type store_type; + +struct store_type +{ + byte type; /* Store type */ + + byte owner; /* Owner index */ + byte extra; /* Unused for now */ + + s16b insult_cur; /* Insult counter */ + + s16b good_buy; /* Number of "good" buys */ + s16b bad_buy; /* Number of "bad" buys */ + + s32b store_open; /* Closed until this current_world_ptr->game_turn */ + + s32b last_visit; /* Last visited on this current_world_ptr->game_turn */ + + s16b table_num; /* Table -- Number of entries */ + s16b table_size; /* Table -- Total Size of Array */ + s16b *table; /* Table -- Legal item kinds */ + + s16b stock_num; /* Stock -- Number of entries */ + s16b stock_size; /* Stock -- Total Size of Array */ + object_type *stock; /* Stock -- Actual stock items */ +}; + /* * Store types */ diff --git a/src/types.h b/src/types.h index a29e45d6b..2fe2a0d0b 100644 --- a/src/types.h +++ b/src/types.h @@ -61,39 +61,6 @@ struct mbe_info_type int explode_type; /* Explosion effect */ }; - -/* - * A store, with an owner, various state flags, a current stock - * of items, and a table of items that are often purchased. - */ -typedef struct store_type store_type; - -struct store_type -{ - byte type; /* Store type */ - - byte owner; /* Owner index */ - byte extra; /* Unused for now */ - - s16b insult_cur; /* Insult counter */ - - s16b good_buy; /* Number of "good" buys */ - s16b bad_buy; /* Number of "bad" buys */ - - s32b store_open; /* Closed until this current_world_ptr->game_turn */ - - s32b last_visit; /* Last visited on this current_world_ptr->game_turn */ - - s16b table_num; /* Table -- Number of entries */ - s16b table_size; /* Table -- Total Size of Array */ - s16b *table; /* Table -- Legal item kinds */ - - s16b stock_num; /* Stock -- Number of entries */ - s16b stock_size; /* Stock -- Total Size of Array */ - object_type *stock; /* Stock -- Actual stock items */ -}; - - /* * The "name" of spell 'N' is stored as spell_names[X][N], * where X is 0 for mage-spells and 1 for priest-spells. -- 2.11.0