From 4279cdc5290b212d1b0f095a6392f1e5262fe09b Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 8 Aug 2025 00:47:02 -0400 Subject: [PATCH] Remove fake inlines from obj_warpt --- include/d/actor/d_a_obj_warpt.h | 14 ++------------ src/d/actor/d_a_obj_warpt.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/include/d/actor/d_a_obj_warpt.h b/include/d/actor/d_a_obj_warpt.h index b71a3d9a8..fc0fbf687 100644 --- a/include/d/actor/d_a_obj_warpt.h +++ b/include/d/actor/d_a_obj_warpt.h @@ -16,16 +16,6 @@ public: PROC_RUN_e, }; - inline u8 onEventReg(u8 arg0){ - u8 tmp = dComIfGs_getEventReg(m_event_reg[m2B8]); - return tmp | arg0; - } - - inline u8 isEventReg(u8 arg0){ - u8 tmp = (u8)dComIfGs_getEventReg(m_event_reg[m2B8]); - return tmp & arg0; - } - void modeProcInit(int) {} BOOL _createHeap(); @@ -37,8 +27,8 @@ public: bool isOtherHuta(); bool isRealHuta(); void warp(int); - void onWarpBit(unsigned char); - bool isWarpBit(unsigned char); + void onWarpBit(u8); + bool isWarpBit(u8); void setMtx(); void initCollision(); void setCollision(); diff --git a/src/d/actor/d_a_obj_warpt.cpp b/src/d/actor/d_a_obj_warpt.cpp index 4a066aafd..4fa5c06ab 100644 --- a/src/d/actor/d_a_obj_warpt.cpp +++ b/src/d/actor/d_a_obj_warpt.cpp @@ -276,13 +276,16 @@ void daObj_Warpt_c::warp(int sclsnum) { } /* 000008E8-00000968 .text onWarpBit__13daObj_Warpt_cFUc */ -void daObj_Warpt_c::onWarpBit(unsigned char arg1) { - dComIfGs_setEventReg(m_event_reg[m2B8], onEventReg(arg1)); +void daObj_Warpt_c::onWarpBit(u8 bit) { + u8 tmp = dComIfGs_getEventReg(m_event_reg[m2B8]); + cLib_onBit(tmp, bit); + dComIfGs_setEventReg(m_event_reg[m2B8], tmp); } /* 00000968-000009D0 .text isWarpBit__13daObj_Warpt_cFUc */ -bool daObj_Warpt_c::isWarpBit(unsigned char arg1) { - return isEventReg(arg1); +bool daObj_Warpt_c::isWarpBit(u8 bit) { + u8 tmp = (u8)dComIfGs_getEventReg(m_event_reg[m2B8]); + return cLib_checkBit(tmp, bit); } /* 000009D0-00000BB8 .text setMtx__13daObj_Warpt_cFv */