From 3c3505a81445fa43b7a4a9d65f7f9cdb858bec14 Mon Sep 17 00:00:00 2001 From: deskull Date: Thu, 23 May 2019 00:32:00 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20is=5Foriginal=5Fap=20?= =?utf8?q?=E3=81=A8=20is=5Foriginal=5Fap=5Fand=5Fseen=20=E3=82=92=20monste?= =?utf8?q?r.h=20=E3=81=B8=E7=A7=BB=E5=8B=95=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/defines.h | 7 ------- src/monster.h | 9 ++++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/defines.h b/src/defines.h index 336ade24b..67944ab58 100644 --- a/src/defines.h +++ b/src/defines.h @@ -2244,13 +2244,6 @@ #define MR1_SINKA 0x01 -/* Hack -- Determine monster race appearance index is same as race index */ -#define is_original_ap(A) \ - (bool)(((A)->ap_r_idx == (A)->r_idx) ? TRUE : FALSE) - -#define is_original_ap_and_seen(A) \ - (bool)((A)->ml && !p_ptr->image && ((A)->ap_r_idx == (A)->r_idx)) - /* * Is the monster seen by the player? */ diff --git a/src/monster.h b/src/monster.h index 4fb2c2a4e..15d0ab062 100644 --- a/src/monster.h +++ b/src/monster.h @@ -460,4 +460,11 @@ extern void monster_drop_carried_objects(monster_type *m_ptr); (bool)(((A)->smart & SM_PET) ? TRUE : FALSE) #define is_hostile(A) \ - (bool)((is_friendly(A) || is_pet(A)) ? FALSE : TRUE) \ No newline at end of file + (bool)((is_friendly(A) || is_pet(A)) ? FALSE : TRUE) + +/* Hack -- Determine monster race appearance index is same as race index */ +#define is_original_ap(A) \ + (bool)(((A)->ap_r_idx == (A)->r_idx) ? TRUE : FALSE) + +#define is_original_ap_and_seen(A) \ + (bool)((A)->ml && !p_ptr->image && ((A)->ap_r_idx == (A)->r_idx)) \ No newline at end of file -- 2.11.0