From 4af6841cc8ca893310a4d2ef5867506d56014964 Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 6 Mar 2019 22:23:32 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E5=9E=8B=E3=81=AE?= =?utf8?q?=E7=BD=AE=E6=8F=9B=E3=80=82=20/=20Type=20replacement.=E3=80=80(P?= =?utf8?q?OSITION=20/=20A=5FMAX)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/grid.c | 5 +++-- src/types.h | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/grid.c b/src/grid.c index 779e3f876..cdbd690a4 100644 --- a/src/grid.c +++ b/src/grid.c @@ -3208,7 +3208,8 @@ void do_cmd_view_map(void) */ void forget_lite(void) { - int i, x, y; + int i; + POSITION x, y; /* None to forget */ if (!current_floor_ptr->lite_n) return; @@ -3299,7 +3300,7 @@ void update_lite(void) { int i; POSITION x, y, min_x, max_x, min_y, max_y; - int p = p_ptr->cur_lite; + POSITION p = p_ptr->cur_lite; grid_type *g_ptr; /*** Special case ***/ diff --git a/src/types.h b/src/types.h index bbe36377a..651713509 100644 --- a/src/types.h +++ b/src/types.h @@ -1320,7 +1320,7 @@ struct player_type bool old_riding_ryoute; bool old_monlite; - s16b old_lite; /* Old radius of lite (if any) */ + POSITION old_lite; /* Old radius of lite (if any) */ bool cumber_armor; /* Mana draining armor */ bool cumber_glove; /* Mana draining gloves */ @@ -1331,7 +1331,7 @@ struct player_type bool riding_ryoute; /* Riding weapon */ bool monlite; - s16b cur_lite; /* Radius of lite (if any) */ + POSITION cur_lite; /* Radius of lite (if any) */ BIT_FLAGS update; /* Pending Updates */ #define PU_BONUS 0x00000001L /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */ @@ -1355,8 +1355,8 @@ struct player_type BIT_FLAGS redraw; /* Normal Redraws */ BIT_FLAGS window; /* Window Redraws */ - s16b stat_use[6]; /* Current modified stats */ - s16b stat_top[6]; /* Maximal modified stats */ + s16b stat_use[A_MAX]; /* Current modified stats */ + s16b stat_top[A_MAX]; /* Maximal modified stats */ bool sutemi; bool counter; @@ -1371,8 +1371,8 @@ struct player_type WEIGHT total_weight; /*!< 所持品と装備品の計算総重量 / Total weight being carried */ - s16b stat_add[6]; /* Modifiers to stat values */ - s16b stat_ind[6]; /* Indexes into stat tables */ + s16b stat_add[A_MAX]; /* Modifiers to stat values */ + s16b stat_ind[A_MAX]; /* Indexes into stat tables */ bool immune_acid; /* Immunity to acid */ bool immune_elec; /* Immunity to lightning */ -- 2.11.0