From 15e46fdca0ce3ffcf0c62586be6ff2173fc2b581 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 27 Dec 2023 22:51:07 -0800 Subject: [PATCH] d_a_tag_etc minor cleanup --- include/d/actor/d_a_npc_md.h | 4 ++-- src/d/actor/d_a_tag_etc.cpp | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/d/actor/d_a_npc_md.h b/include/d/actor/d_a_npc_md.h index 9709903b3..9a5cd961c 100644 --- a/include/d/actor/d_a_npc_md.h +++ b/include/d/actor/d_a_npc_md.h @@ -273,8 +273,8 @@ public: void calcFlyingTimer() {} void checkBitEffectStatus(u8) {} void checkStatus(u32) {} - u8 checkStatusCamTagIn() { return cLib_checkBit(m30F0, 0x20UL); } - void checkStatusFly() {} + bool checkStatusCamTagIn() { return cLib_checkBit(m30F0, 0x20UL); } + bool checkStatusFly() { return cLib_checkBit(m30F0, 0x10UL); } void clearJntAng() {} void clearStatus() {} void clearStatus(u32) {} diff --git a/src/d/actor/d_a_tag_etc.cpp b/src/d/actor/d_a_tag_etc.cpp index 44a9dd990..601e582d6 100644 --- a/src/d/actor/d_a_tag_etc.cpp +++ b/src/d/actor/d_a_tag_etc.cpp @@ -19,7 +19,7 @@ enum Action { /* 00000078-00000084 .text getEventNo__11daTag_Etc_cFv */ u8 daTag_Etc_c::getEventNo() { - return fopAcM_GetParam(this) >> 0x18; + return fopAcM_GetParam(this) >> 24; } /* 00000084-00000090 .text getType2__11daTag_Etc_cFv */ @@ -27,7 +27,6 @@ u8 daTag_Etc_c::getType2() { return fopAcM_GetParam(this) >> 8 & 0xF; } -/* Not Matching */ /* 00000090-000001B4 .text rangeCheck__11daTag_Etc_cFP10fopAc_ac_c */ BOOL daTag_Etc_c::rangeCheck(fopAc_ac_c* pActor) { float distanceMagnitude; @@ -47,11 +46,9 @@ BOOL daTag_Etc_c::rangeCheck(fopAc_ac_c* pActor) { BOOL daTag_Etc_c::otherCheck(fopAc_ac_c* pActor) { BOOL result; - u8 cVar2 = getType2(); - - switch (cVar2) { + switch (getType2()) { case 0: - if (pActor != NULL && (((daNpc_Md_c*)pActor)->m30F0 & 0x10) != 0) { + if (pActor != NULL && ((daNpc_Md_c*)pActor)->checkStatusFly()) { result = TRUE; } else { result = FALSE;