From 938e740dd6d8e12c8beb7017aba2a3f271397127 Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 10 Jun 2019 23:40:37 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20p=5Fptr,=20p=5Fbody=20?= =?utf8?q?=E3=82=92=20player-status.c/h=20=E3=81=B8=E7=A7=BB=E5=8B=95?= =?utf8?q?=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 9 --------- src/player-status.c | 11 +++++++++++ src/player-status.h | 1 + src/variable.c | 15 --------------- 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/externs.h b/src/externs.h index 7b78092c0..5e64fafd8 100644 --- a/src/externs.h +++ b/src/externs.h @@ -47,12 +47,3 @@ extern const byte adj_chr_chm[]; extern bool repair_monsters; extern bool repair_objects; - - - -/* - * Software options (set via the '=' command). See "tables.c" - */ - - -extern player_type *p_ptr; diff --git a/src/player-status.c b/src/player-status.c index d6fbe42c7..7a08bbd25 100644 --- a/src/player-status.c +++ b/src/player-status.c @@ -335,6 +335,17 @@ const s32b player_exp_a[PY_MAX_LEVEL] = 5000000L }; +/*** Player information ***/ + +/* + * Static player info record + */ +player_type p_body; + +/* + * Pointer to the player info + */ +player_type *p_ptr = &p_body; /* * Return alignment title diff --git a/src/player-status.h b/src/player-status.h index 00c7628d6..4016c2e5d 100644 --- a/src/player-status.h +++ b/src/player-status.h @@ -700,6 +700,7 @@ struct player_type char base_name[32]; /*!< Stripped version of "player_name" */ }; +extern player_type *p_ptr; extern concptr your_alignment(void); extern int weapon_exp_level(int weapon_exp); diff --git a/src/variable.c b/src/variable.c index 589d2923d..f2227b38a 100644 --- a/src/variable.c +++ b/src/variable.c @@ -16,18 +16,3 @@ bool repair_monsters; /* Hack -- optimize detect monsters */ bool repair_objects; /* Hack -- optimize detect objects */ - - -/*** Player information ***/ - -/* - * Static player info record - */ -player_type p_body; - -/* - * Pointer to the player info - */ -player_type *p_ptr = &p_body; - - -- 2.11.0