From cb76a08c3a3dd942133b040634eae4615f743bac Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 4 Aug 2025 00:02:15 -0400 Subject: [PATCH] Fix some missing enum usages --- include/f_op/f_op_msg.h | 2 ++ src/d/actor/d_a_coming2.cpp | 2 +- src/d/actor/d_a_obj_barrel2.cpp | 2 +- src/d/actor/d_a_player_main.cpp | 2 +- src/d/actor/d_a_wbird.cpp | 2 +- src/f_op/f_op_msg_mng.cpp | 18 +++++++++--------- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h index 0c9f65443..ebc846512 100644 --- a/include/f_op/f_op_msg.h +++ b/include/f_op/f_op_msg.h @@ -11,6 +11,8 @@ enum fopMsg_MessageStatus_e { fopMsgStts_BOX_OPENING_e = 0x02, fopMsgStts_MSG_TYPING_e = 0x06, fopMsgStts_UNKA_e = 0x0A, + fopMsgStts_UNKB_e = 0x0B, + fopMsgStts_UNKD_e = 0x0D, fopMsgStts_MSG_DISPLAYED_e = 0x0E, fopMsgStts_MSG_CONTINUES_e = 0x0F, fopMsgStts_MSG_ENDS_e = 0x10, diff --git a/src/d/actor/d_a_coming2.cpp b/src/d/actor/d_a_coming2.cpp index 712982914..3afb4d636 100644 --- a/src/d/actor/d_a_coming2.cpp +++ b/src/d/actor/d_a_coming2.cpp @@ -364,7 +364,7 @@ BOOL daComing2::Act_c::coming_wait_init() { void daComing2::Act_c::coming_wait_main() { daPy_py_c* player = daPy_getPlayerActorClass(); if (player != NULL) { - if (dComIfGp_checkPlayerStatus0(0, 0x10000)) { + if (dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) { if (unk_2A0 > 35.0f && get_coming_point() >= 2) { if (unk_2A6 > 0) { unk_2A6--; diff --git a/src/d/actor/d_a_obj_barrel2.cpp b/src/d/actor/d_a_obj_barrel2.cpp index 3aa592d40..9d865e25f 100644 --- a/src/d/actor/d_a_obj_barrel2.cpp +++ b/src/d/actor/d_a_obj_barrel2.cpp @@ -979,7 +979,7 @@ bool daObjBarrel2::Act_c::mine_chk_range_damage() { if (ship != NULL && fopAcM_searchActorDistanceXZ2(this, ship) < sq) { if (ship->current.pos.y < current.pos.y + attr()->m4C) { - if (dComIfGp_checkPlayerStatus0(0, 0x10000)) { + if (dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) { cXyz sp14(ship->current.pos.x - current.pos.x, 0.0f, ship->current.pos.z - current.pos.z); cXyz sp08(ship->speed.x, 0.0f, ship->speed.z); diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 9da5a25d4..7309dc449 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -5646,7 +5646,7 @@ BOOL daPy_lk_c::checkPhotoBoxItem(int itemNo) const { /* 80112064-80112100 .text checkScopeEnd__9daPy_lk_cFv */ BOOL daPy_lk_c::checkScopeEnd() { - if (dComIfGp_getScopeMesgStatus() == 11 && + if (dComIfGp_getScopeMesgStatus() == fopMsgStts_UNKB_e && (cancelTrigger() || checkNoResetFlg0(daPyFlg0_SCOPE_CANCEL))) { if (dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) || cancelTrigger()) { diff --git a/src/d/actor/d_a_wbird.cpp b/src/d/actor/d_a_wbird.cpp index 02660a97e..f5a68549d 100644 --- a/src/d/actor/d_a_wbird.cpp +++ b/src/d/actor/d_a_wbird.cpp @@ -139,7 +139,7 @@ void daWbird_c::actionSelect() { sVar2 = current.angle.y + 0x7fff; mAngle = player->shape_angle.y; player->setPlayerPosAndAngle(&player->current.pos, sVar2); - if(dComIfGp_checkPlayerStatus0(0, 0x00010000)){ + if(dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)){ mEventIdx = dComIfGp_evmng_getEventIdx("TACT_WINDOW2_SHIP"); } else{ mEventIdx = dComIfGp_evmng_getEventIdx("TACT_WINDOW2"); diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 81410a8c7..97b1d9d42 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -526,8 +526,8 @@ fpc_ProcID fopMsgM_scopeMessageSet(u32 msgNo) { i_msgID = fpcM_ERROR_PROCESS_ID_e; } else { - if(dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) && dComIfGp_getScopeMesgStatus() == 0xB) { - dComIfGp_setScopeMesgStatus(0x2); + if(dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) && dComIfGp_getScopeMesgStatus() == fopMsgStts_UNKB_e) { + dComIfGp_setScopeMesgStatus(fopMsgStts_BOX_OPENING_e); } pMsg->mMsgNo = msgNo; @@ -794,12 +794,12 @@ bool fopMsgM_nextMsgFlagCheck() { /* 8002C5BC-8002C624 .text fopMsgM_getScopeMode__Fv */ bool fopMsgM_getScopeMode() { - if(dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) && dComIfGp_getScopeMesgStatus() == 0xB && !dComIfGp_event_runCheck()) { - dComIfGp_setScopeMesgStatus(0xD); + if(dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) && dComIfGp_getScopeMesgStatus() == fopMsgStts_UNKB_e && !dComIfGp_event_runCheck()) { + dComIfGp_setScopeMesgStatus(fopMsgStts_UNKD_e); return true; } - if(dComIfGp_getScopeMesgStatus() == 0x11) { - dComIfGp_setMesgStatus(0xD); + if(dComIfGp_getScopeMesgStatus() == fopMsgStts_BOX_CLOSING_e) { + dComIfGp_setMesgStatus(fopMsgStts_UNKD_e); return true; } @@ -808,7 +808,7 @@ bool fopMsgM_getScopeMode() { /* 8002C624-8002C650 .text fopMsgM_forceSendOn__Fv */ bool fopMsgM_forceSendOn() { - if (dComIfGp_getScopeMesgStatus() == 10) { + if (dComIfGp_getScopeMesgStatus() == fopMsgStts_UNKA_e) { pushButton = true; return true; } @@ -843,8 +843,8 @@ bool fopMsgM_checkMessageSend() { /* 8002C684-8002C6B0 .text fopMsgM_releaseScopeMode__Fv */ bool fopMsgM_releaseScopeMode() { - if (dComIfGp_getScopeMesgStatus() == 13) { - dComIfGp_setScopeMesgStatus(11); + if (dComIfGp_getScopeMesgStatus() == fopMsgStts_UNKD_e) { + dComIfGp_setScopeMesgStatus(fopMsgStts_UNKB_e); return true; }