From 8b780fbd56a073dee693de0939cd8d5a4a5a09b1 Mon Sep 17 00:00:00 2001 From: Deskull Date: Wed, 12 Dec 2018 21:33:50 +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.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 4 ++-- src/monster1.c | 4 ++-- src/xtra2.c | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/externs.h b/src/externs.h index c3049f04c..a85b9cd3c 100644 --- a/src/externs.h +++ b/src/externs.h @@ -733,8 +733,8 @@ extern void set_friendly(monster_type *m_ptr); extern void set_pet(monster_type *m_ptr); extern void set_hostile(monster_type *m_ptr); extern void anger_monster(monster_type *m_ptr); -extern bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, u16b mode); -extern bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, u16b mode); +extern bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode); +extern bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode); extern bool are_enemies(monster_type *m_ptr1, monster_type *m_ptr2); extern bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr); extern void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg); diff --git a/src/monster1.c b/src/monster1.c index 913332af1..9bdfda2ae 100644 --- a/src/monster1.c +++ b/src/monster1.c @@ -2275,7 +2275,7 @@ void anger_monster(monster_type *m_ptr) * @param mode オプション * @return 踏破可能ならばTRUEを返す */ -bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, u16b mode) +bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode) { feature_type *f_ptr = &f_info[feat]; @@ -2340,7 +2340,7 @@ bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, u16b mode) * @param mode オプション * @return 踏破可能ならばTRUEを返す */ -bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, u16b mode) +bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode) { cave_type *c_ptr = &cave[y][x]; diff --git a/src/xtra2.c b/src/xtra2.c index b227e5fec..76d422647 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -886,7 +886,7 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item) for (i = 0; i < 2; i++) { - int wy = y, wx = x; + POSITION wy = y, wx = x; bool pet = is_pet(m_ptr); BIT_FLAGS mode = 0L; @@ -894,13 +894,11 @@ void monster_death(MONSTER_IDX m_idx, bool drop_item) if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode)) { - if (player_can_see_bold(wy, wx)) - notice = TRUE; + if (player_can_see_bold(wy, wx)) notice = TRUE; } } - if (notice) - msg_print(_("ピンク・ホラーは分裂した!", "The Pink horror divides!")); + if (notice) msg_print(_("ピンク・ホラーは分裂した!", "The Pink horror divides!")); } break; -- 2.11.0