diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-07-22 12:36:48 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-07-22 12:36:48 -0400 |
| commit | 5c556d3c5356c2cc9ce93688902c62e7a7f47811 (patch) | |
| tree | 608dd87c0ec238896ac96226eabee60c054b496c | |
| parent | ebc8cd2caf8a948c6f730a171cc3e88416cad1cb (diff) | |
Enum usage
| -rw-r--r-- | include/d/actor/d_a_npc_bmsw.h | 12 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_btsw.h | 16 | ||||
| -rw-r--r-- | include/d/actor/d_a_npc_md.h | 4 | ||||
| -rw-r--r-- | include/d/actor/d_a_tag_mk.h | 6 | ||||
| -rw-r--r-- | include/f_op/f_op_msg.h | 1 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_ah.cpp | 12 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_bmsw.cpp | 14 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_btsw.cpp | 12 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_jb1.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_ls1.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_rsh1.cpp | 4 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_tc.cpp | 16 | ||||
| -rw-r--r-- | src/d/actor/d_a_npc_zl1.cpp | 8 | ||||
| -rw-r--r-- | src/d/actor/d_a_tag_mk.cpp | 8 | ||||
| -rw-r--r-- | src/d/d_attention.cpp | 2 | ||||
| -rw-r--r-- | src/d/d_camera.cpp | 2 | ||||
| -rw-r--r-- | src/d/d_grass.cpp | 3 | ||||
| -rw-r--r-- | src/d/d_message.cpp | 27 | ||||
| -rw-r--r-- | src/d/d_meter.cpp | 7 | ||||
| -rw-r--r-- | src/d/d_picture_box.cpp | 2 | ||||
| -rw-r--r-- | src/f_op/f_op_msg_mng.cpp | 32 |
21 files changed, 102 insertions, 90 deletions
diff --git a/include/d/actor/d_a_npc_bmsw.h b/include/d/actor/d_a_npc_bmsw.h index bfda5e82..2b2bfef9 100644 --- a/include/d/actor/d_a_npc_bmsw.h +++ b/include/d/actor/d_a_npc_bmsw.h @@ -141,13 +141,13 @@ public: BOOL initTexPatternAnm(bool); void playTexPatternAnm(); - void setAnm(signed char); - bool chkAttention(cXyz, short); + void setAnm(s8); + bool chkAttention(cXyz, s16); void eventOrder(); void checkOrder(); - u16 next_msgStatus(unsigned long*); + u16 next_msgStatus(u32*); u32 getMsg(); - void anmAtr(unsigned short); + void anmAtr(u16); BOOL CreateInit(); void set_mtx(); void setAttention(); @@ -156,7 +156,7 @@ public: void talk01(); BOOL wait_action(void*); BOOL checkNextMailThrowOK(); - void setGameGetRupee(short); + void setGameGetRupee(s16); void TimerCountDown(); BOOL shiwake_game_action(void*); BOOL _draw(); @@ -173,7 +173,7 @@ public: /* 0x6C8 */ s8 m_body_ArmR; /* 0x6C9 */ s8 m_body_ArmL; /* 0x6CA */ s8 m_neck_jnt_num; - /* 0x6CB */ u8 field_0x6CB[0x6CC - 0x6CB]; +private: /* 0x6CC */ request_of_phase_process_class mPhs; /* 0x6D4 */ J3DModel* field_0x6D4; /* 0x6D8 */ J3DModel* field_0x6D8; diff --git a/include/d/actor/d_a_npc_btsw.h b/include/d/actor/d_a_npc_btsw.h index d22dd3c5..73370ebd 100644 --- a/include/d/actor/d_a_npc_btsw.h +++ b/include/d/actor/d_a_npc_btsw.h @@ -19,7 +19,7 @@ public: } BOOL MailCreateInit(cXyz*, cXyz*); - static u8 getNextNo(unsigned char); + static u8 getNextNo(u8); void init(); void set_mtx(); void set_mtx_throw(); @@ -29,7 +29,7 @@ public: void Appear(); void WaitInit(); void Wait(); - void ThrowInit(cXyz, unsigned char); + void ThrowInit(cXyz, u8); void Throw(); void EndInit(); void End(); @@ -40,7 +40,7 @@ public: static u8 m_same_count; static u8 m_no_buff; -public: +private: /* 0x00 */ SwMail_Func mFunc; /* 0x0C */ J3DModel* mpModel; /* 0x10 */ mDoExt_btpAnm field_0x10; @@ -132,13 +132,13 @@ public: BOOL initTexPatternAnm(bool); void playTexPatternAnm(); - void setAnm(signed char); - bool chkAttention(cXyz, short); + void setAnm(s8); + bool chkAttention(cXyz, s16); void eventOrder(); void checkOrder(); - u16 next_msgStatus(unsigned long*); + u16 next_msgStatus(u32*); u32 getMsg(); - void anmAtr(unsigned short); + void anmAtr(u16 s16); BOOL CreateInit(); void set_mtx(); void setAttention(); @@ -157,7 +157,7 @@ public: cPhs_State _create(); BOOL CreateHeap(); -public: +private: /* 0x6C4 */ s8 m_handL; /* 0x6C5 */ s8 m_handR; /* 0x6C6 */ u8 field_0x6C6[0x6C8 - 0x6C6]; diff --git a/include/d/actor/d_a_npc_md.h b/include/d/actor/d_a_npc_md.h index 6a47968a..5b6d43cb 100644 --- a/include/d/actor/d_a_npc_md.h +++ b/include/d/actor/d_a_npc_md.h @@ -19,7 +19,7 @@ public: cXyz& getPos() { return mPos; } void setAngle(s16 x, s16 y, s16 z) { mAngle.set(x, y, z); } -public: +private: /* 0x04 */ JPABaseEmitter* mpEmitter; /* 0x08 */ cXyz mPos; /* 0x14 */ csXyz mAngle; @@ -341,7 +341,7 @@ public: static void onPlayerRoom() { m_playerRoom = true; } static void offPlayerRoom() { m_playerRoom = false; } -public: +private: /* 0x04EC */ request_of_phase_process_class mPhase; /* 0x04F4 */ J3DModel* mpHarpModel; /* 0x04F8 */ J3DModel* mpHarpLightModel; diff --git a/include/d/actor/d_a_tag_mk.h b/include/d/actor/d_a_tag_mk.h index 7a17a210..5869f9b5 100644 --- a/include/d/actor/d_a_tag_mk.h +++ b/include/d/actor/d_a_tag_mk.h @@ -27,8 +27,8 @@ public: u8 getSwbit(); u8 getSwbit2(); u8 getType(); - BOOL checkArea(float, float, float); - u16 next_msgStatus(unsigned long*); + BOOL checkArea(f32, f32, f32); + u16 next_msgStatus(u32*); u32 getMsg(); void talkInit(); u16 talk(); @@ -55,7 +55,7 @@ public: BOOL actionDaichi(); BOOL execute(); -public: +private: /* 0x290 */ u32 m290; /* 0x294 */ s8 m294; /* 0x295 */ u8 m295[0x296 - 0x295]; diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h index 760c8a21..60cc1363 100644 --- a/include/f_op/f_op_msg.h +++ b/include/f_op/f_op_msg.h @@ -10,6 +10,7 @@ enum fopMsg_MessageStatus_e { fopMsgStts_MSG_UNK0_e = 0x00, fopMsgStts_MSG_PREPARING_e = 0x01, fopMsgStts_BOX_OPENING_e = 0x02, + fopMsgStts_MSG_UNK5_e = 0x05, fopMsgStts_MSG_TYPING_e = 0x06, fopMsgStts_STOP_e = 0x07, fopMsgStts_SELECT_2_e = 0x08, // Selection box with 2 choices diff --git a/src/d/actor/d_a_npc_ah.cpp b/src/d/actor/d_a_npc_ah.cpp index 50451613..7944caa5 100644 --- a/src/d/actor/d_a_npc_ah.cpp +++ b/src/d/actor/d_a_npc_ah.cpp @@ -571,7 +571,7 @@ void daNpcAh_c::eventGetItemInit() { /* 00001718-00001860 .text talk2__9daNpcAh_cFi */ u16 daNpcAh_c::talk2(int i_param) { - u16 ret = 0xff; + u16 msg_status = 0xff; if(mCurrMsgBsPcId == fpcM_ERROR_PROCESS_ID_e){ if(i_param == 1) mCurrMsgNo = getMsg(); mCurrMsgBsPcId = fopMsgM_messageSet(mCurrMsgNo, this); @@ -580,8 +580,8 @@ u16 daNpcAh_c::talk2(int i_param) { } else{ if(mpCurrMsg != NULL) { - ret = mpCurrMsg->mStatus; - switch(ret){ + msg_status = mpCurrMsg->mStatus; + switch(msg_status){ case fopMsgStts_MSG_DISPLAYED_e: mpCurrMsg->mStatus = next_msgStatus(&mCurrMsgNo); if(mpCurrMsg->mStatus == fopMsgStts_MSG_CONTINUES_e) fopMsgM_messageSet(mCurrMsgNo); @@ -594,14 +594,14 @@ u16 daNpcAh_c::talk2(int i_param) { mCurrMsgBsPcId = -1; break; } - field_0x734 = ret; - anmAtr(ret); + field_0x734 = msg_status; + anmAtr(msg_status); } else{ mpCurrMsg = fopMsgM_SearchByID(mCurrMsgBsPcId); } } - return ret; + return msg_status; } /* 00001860-000018B0 .text next_msgStatus__9daNpcAh_cFPUl */ diff --git a/src/d/actor/d_a_npc_bmsw.cpp b/src/d/actor/d_a_npc_bmsw.cpp index dea9cfb7..eca67e80 100644 --- a/src/d/actor/d_a_npc_bmsw.cpp +++ b/src/d/actor/d_a_npc_bmsw.cpp @@ -185,7 +185,7 @@ static BOOL nodeCallBackArm(J3DNode* node, int calcTiming) { } /* 00000550-000006F4 .text daNpc_Bmsw_getGameEndMsg__Fs */ -static u32 daNpc_Bmsw_getGameEndMsg(short rupees) { +static u32 daNpc_Bmsw_getGameEndMsg(s16 rupees) { u8 reg_val = dComIfGs_getEventReg(dSv_event_flag_c::UNK_C203); u32 msgNo; switch (reg_val) { @@ -271,7 +271,7 @@ void daNpc_Bmsw_c::playTexPatternAnm() { } /* 00000894-00000984 .text setAnm__12daNpc_Bmsw_cFSc */ -void daNpc_Bmsw_c::setAnm(signed char idx) { +void daNpc_Bmsw_c::setAnm(s8 idx) { static u32 a_play_mode_tbl[] = { J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, @@ -304,7 +304,7 @@ void daNpc_Bmsw_c::setAnm(signed char idx) { } /* 00000984-00000AD8 .text chkAttention__12daNpc_Bmsw_cF4cXyzs */ -bool daNpc_Bmsw_c::chkAttention(cXyz pos, short angle) { +bool daNpc_Bmsw_c::chkAttention(cXyz pos, s16 angle) { fopAc_ac_c* player = dComIfGp_getPlayer(0); f32 maxAttnDistXZ = l_HIO.mNpc.mMaxAttnDistXZ; @@ -349,7 +349,7 @@ void daNpc_Bmsw_c::checkOrder() { } /* 00000B68-00000EF8 .text next_msgStatus__12daNpc_Bmsw_cFPUl */ -u16 daNpc_Bmsw_c::next_msgStatus(unsigned long* currMsgNo) { +u16 daNpc_Bmsw_c::next_msgStatus(u32* currMsgNo) { u16 ret = fopMsgStts_MSG_CONTINUES_e; switch (*currMsgNo) { @@ -806,7 +806,7 @@ BOOL daNpc_Bmsw_c::checkNextMailThrowOK() { } /* 00001C70-00001DA4 .text setGameGetRupee__12daNpc_Bmsw_cFs */ -void daNpc_Bmsw_c::setGameGetRupee(short rupees) { +void daNpc_Bmsw_c::setGameGetRupee(s16 rupees) { u8 reg_val = dComIfGs_getEventReg(dSv_event_flag_c::UNK_C203); switch (reg_val) { case 0: @@ -1320,7 +1320,7 @@ BOOL SwMail_c::MailCreateInit(cXyz* param_1, cXyz* param_2) { } /* 00003DBC-00003FE8 .text getNextNo__8SwMail_cFUc */ -u8 SwMail_c::getNextNo(unsigned char previous_no) { +u8 SwMail_c::getNextNo(u8 previous_no) { f32 random = cM_rndF(10.0f); f32 fVar4 = 2.5f - (m_same_count * 1.25f); @@ -1513,7 +1513,7 @@ void SwMail_c::Wait() { } /* 00004628-00004670 .text ThrowInit__8SwMail_cF4cXyzUc */ -void SwMail_c::ThrowInit(cXyz param_1, unsigned char param_2) { +void SwMail_c::ThrowInit(cXyz param_1, u8 param_2) { field_0x30 = param_1; field_0x56 = 0; field_0x55 = param_2; diff --git a/src/d/actor/d_a_npc_btsw.cpp b/src/d/actor/d_a_npc_btsw.cpp index 5f1c8d35..221ba7ca 100644 --- a/src/d/actor/d_a_npc_btsw.cpp +++ b/src/d/actor/d_a_npc_btsw.cpp @@ -165,7 +165,7 @@ static BOOL nodeCallBack(J3DNode* node, int calcTiming) { } /* 00000430-0000046C .text daNpc_Btsw_getGameEndMsg__Fs */ -u32 daNpc_Btsw_getGameEndMsg(short rupees) { +u32 daNpc_Btsw_getGameEndMsg(s16 rupees) { u32 msgNo; if (rupees == 0) { msgNo = 0x1A9D; @@ -207,7 +207,7 @@ void daNpc_Btsw_c::playTexPatternAnm() { } /* 00000610-00000708 .text setAnm__12daNpc_Btsw_cFSc */ -void daNpc_Btsw_c::setAnm(signed char idx) { +void daNpc_Btsw_c::setAnm(s8 idx) { static u32 a_play_mode_tbl[] = { J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_LOOP, @@ -252,7 +252,7 @@ void daNpc_Btsw_c::setAnm(signed char idx) { } /* 00000708-0000085C .text chkAttention__12daNpc_Btsw_cF4cXyzs */ -bool daNpc_Btsw_c::chkAttention(cXyz pos, short angle) { +bool daNpc_Btsw_c::chkAttention(cXyz pos, s16 angle) { fopAc_ac_c* player = dComIfGp_getPlayer(0); f32 maxAttnDistXZ = l_HIO.mNpc.mMaxAttnDistXZ; @@ -309,7 +309,7 @@ void daNpc_Btsw_c::checkOrder() { } /* 00000AC4-00000CBC .text next_msgStatus__12daNpc_Btsw_cFPUl */ -u16 daNpc_Btsw_c::next_msgStatus(unsigned long* currMsgNo) { +u16 daNpc_Btsw_c::next_msgStatus(u32* currMsgNo) { u16 ret = fopMsgStts_MSG_CONTINUES_e; switch (*currMsgNo) { @@ -1108,7 +1108,7 @@ BOOL SwMail2_c::MailCreateInit(cXyz* param_1, cXyz* param_2) { } /* 00003838-00003A64 .text getNextNo__9SwMail2_cFUc */ -u8 SwMail2_c::getNextNo(unsigned char previous_no) { +u8 SwMail2_c::getNextNo(u8 previous_no) { f32 random = cM_rndF(10.0f); f32 fVar4 = 2.5f - (m_same_count * 1.25f); @@ -1301,7 +1301,7 @@ void SwMail2_c::Wait() { } /* 000040A4-000040EC .text ThrowInit__9SwMail2_cF4cXyzUc */ -void SwMail2_c::ThrowInit(cXyz param_1, unsigned char param_2) { +void SwMail2_c::ThrowInit(cXyz param_1, u8 param_2) { field_0x30 = param_1; field_0x56 = 0; field_0x55 = param_2; diff --git a/src/d/actor/d_a_npc_jb1.cpp b/src/d/actor/d_a_npc_jb1.cpp index 0475a23f..714c3eb8 100644 --- a/src/d/actor/d_a_npc_jb1.cpp +++ b/src/d/actor/d_a_npc_jb1.cpp @@ -275,7 +275,7 @@ void daNpc_Jb1_c::checkOrder() { /* 000007AC-000007B4 .text next_msgStatus__11daNpc_Jb1_cFPUl */ u16 daNpc_Jb1_c::next_msgStatus(u32* pMsgNo) { - return 0x10; + return fopMsgStts_MSG_ENDS_e; } /* 000007B4-000007BC .text getMsg_JB1_0__11daNpc_Jb1_cFv */ diff --git a/src/d/actor/d_a_npc_ls1.cpp b/src/d/actor/d_a_npc_ls1.cpp index b34d80e8..441f054c 100644 --- a/src/d/actor/d_a_npc_ls1.cpp +++ b/src/d/actor/d_a_npc_ls1.cpp @@ -1564,7 +1564,7 @@ bool daNpc_Ls1_c::telescope_proc() { } u8 scope_mesg_status = dComIfGp_getScopeMesgStatus(); - if (scope_mesg_status == 0) { + if (scope_mesg_status == fopMsgStts_MSG_UNK0_e) { if (dComIfGp_checkPlayerStatus0(0, daPyStts0_TELESCOPE_LOOK_e) != 0) { if (g_dComIfG_gameInfo.play.field_0x4978) { daPy_getPlayerLinkActorClass()->setPlayerPosAndAngle(&m7CC[1], 0xCC70); diff --git a/src/d/actor/d_a_npc_rsh1.cpp b/src/d/actor/d_a_npc_rsh1.cpp index 6d83d6f5..77200d3f 100644 --- a/src/d/actor/d_a_npc_rsh1.cpp +++ b/src/d/actor/d_a_npc_rsh1.cpp @@ -506,9 +506,9 @@ void daNpc_Rsh1_c::checkOrder() { /* 0000126C-00001650 .text next_msgStatus__12daNpc_Rsh1_cFPUl */ u16 daNpc_Rsh1_c::next_msgStatus(u32* o_pMsgNo) { - u16 msg_status; + u16 msg_status = fopMsgStts_MSG_CONTINUES_e; s32 msg_rupee; - msg_status = fopMsgStts_MSG_CONTINUES_e; + switch (*o_pMsgNo) { case 0x2845: case 0x2846: diff --git a/src/d/actor/d_a_npc_tc.cpp b/src/d/actor/d_a_npc_tc.cpp index 4c826d4d..9ade0000 100644 --- a/src/d/actor/d_a_npc_tc.cpp +++ b/src/d/actor/d_a_npc_tc.cpp @@ -881,28 +881,28 @@ u16 daNpc_Tc_c::next_msgStatusNormal(u32* pMsgNo) { /* 00001AEC-00001B64 .text next_msgStatus__10daNpc_Tc_cFPUl */ u16 daNpc_Tc_c::next_msgStatus(u32* pMsgNo) { - u16 msg; + u16 msg_status; switch(mType) { case TYPE_NORMAL: - msg = next_msgStatusNormal(pMsgNo); + msg_status = next_msgStatusNormal(pMsgNo); break; case TYPE_NORMAL2: - msg = next_msgStatusNormal2(pMsgNo); + msg_status = next_msgStatusNormal2(pMsgNo); break; case TYPE_BLUE: - msg = next_msgStatusBlue(pMsgNo); + msg_status = next_msgStatusBlue(pMsgNo); break; case TYPE_RED: - msg = next_msgStatusRed(pMsgNo); + msg_status = next_msgStatusRed(pMsgNo); break; case TYPE_WHITE: - msg = next_msgStatusWhite(pMsgNo); + msg_status = next_msgStatusWhite(pMsgNo); break; default: - msg = fopMsgStts_MSG_ENDS_e; + msg_status = fopMsgStts_MSG_ENDS_e; break; } - return msg; + return msg_status; } /* 00001B64-00001B88 .text setFirstMsg__10daNpc_Tc_cFPbUlUl */ diff --git a/src/d/actor/d_a_npc_zl1.cpp b/src/d/actor/d_a_npc_zl1.cpp index 4c9da119..bbaf9219 100644 --- a/src/d/actor/d_a_npc_zl1.cpp +++ b/src/d/actor/d_a_npc_zl1.cpp @@ -963,7 +963,7 @@ void daNpc_Zl1_c::anmAtr(u16 mesgNo) { /* 00001ED4-00001FA0 .text next_msgStatus__11daNpc_Zl1_cFPUl */ u16 daNpc_Zl1_c::next_msgStatus(u32* pMsgNo) { - u16 ret = fopMsgStts_MSG_CONTINUES_e; + u16 msg_status = fopMsgStts_MSG_CONTINUES_e; switch(*pMsgNo) { case 0xCA2: @@ -973,7 +973,7 @@ u16 daNpc_Zl1_c::next_msgStatus(u32* pMsgNo) { case 0xC90: { switch(mpCurrMsg->mSelectNum) { case 0: - ret = fopMsgStts_MSG_ENDS_e; + msg_status = fopMsgStts_MSG_ENDS_e; break; case 1: *pMsgNo = 0xC91; @@ -999,11 +999,11 @@ u16 daNpc_Zl1_c::next_msgStatus(u32* pMsgNo) { break; default: - ret = fopMsgStts_MSG_ENDS_e; + msg_status = fopMsgStts_MSG_ENDS_e; break; } - return ret; + return msg_status; } /* 00001FA0-00001FF0 .text getMsg_ZL1_2__11daNpc_Zl1_cFv */ diff --git a/src/d/actor/d_a_tag_mk.cpp b/src/d/actor/d_a_tag_mk.cpp index ff23be06..db9083f3 100644 --- a/src/d/actor/d_a_tag_mk.cpp +++ b/src/d/actor/d_a_tag_mk.cpp @@ -57,8 +57,8 @@ BOOL daTag_Mk_c::checkArea(float arg1, float arg2, float arg3) { } /* 000001F8-00000228 .text next_msgStatus__10daTag_Mk_cFPUl */ -u16 daTag_Mk_c::next_msgStatus(unsigned long* arg1) { - u16 ret = 0xF; +u16 daTag_Mk_c::next_msgStatus(u32* arg1) { + u16 msg_status = fopMsgStts_MSG_CONTINUES_e; switch (*arg1) { case 0x1BC0: @@ -68,10 +68,10 @@ u16 daTag_Mk_c::next_msgStatus(unsigned long* arg1) { break; default: - ret = 0x10; + msg_status = fopMsgStts_MSG_ENDS_e; break; } - return ret; + return msg_status; } /* 00000228-00000270 .text getMsg__10daTag_Mk_cFv */ diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index 4737d1ad..23f47ba2 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -908,7 +908,7 @@ void dAttention_c::Draw() { Mtx invCamera; cMtx_inverse(dComIfGd_getViewRotMtx(), invCamera); fopAc_ac_c *target = LockonTarget(0); - if (dComIfGp_event_runCheck() || dComIfGp_getScopeMesgStatus() != 0) + if (dComIfGp_event_runCheck() || dComIfGp_getScopeMesgStatus() != fopMsgStts_MSG_UNK0_e) return; if (target != NULL) { if (target != NULL) { diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index e8533cac..5f3cf9de 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -5414,7 +5414,7 @@ void view_setup(camera_process_class* i_this) { dComIfGd_setView(view); f32 far; - if (dComIfGp_getScopeMesgStatus() != 0) { + if (dComIfGp_getScopeMesgStatus() != fopMsgStts_MSG_UNK0_e) { far = view->mFar; } else { far = dStage_stagInfo_GetCullPoint(dComIfGp_getStageStagInfo()); diff --git a/src/d/d_grass.cpp b/src/d/d_grass.cpp index 6f2fe6f1..b05807f7 100644 --- a/src/d/d_grass.cpp +++ b/src/d/d_grass.cpp @@ -140,7 +140,8 @@ void dGrass_data_c::WorkAt(fopAc_ac_c* ac, u32 p1, int roomNo, dCcMassS_HitInf* hitObj->ChkAtType(AT_TYPE_FIRE_ARROW) || hitObj->ChkAtType(AT_TYPE_ICE_ARROW) || hitObj->ChkAtType(AT_TYPE_LIGHT_ARROW) || - hitObj->ChkAtType(AT_TYPE_HOOKSHOT))) { + hitObj->ChkAtType(AT_TYPE_HOOKSHOT)) + ) { WorkAt_NoCutAnim(ac, p1, roomNo, inf, hitObj); } else { if (mAnimIdx >= 8) { diff --git a/src/d/d_message.cpp b/src/d/d_message.cpp index abd9960c..d193f951 100644 --- a/src/d/d_message.cpp +++ b/src/d/d_message.cpp @@ -447,7 +447,12 @@ void dMsg2_textPosition(sub_msg2_class* i_Msg, u8 i_index) { /* 801E8798-801E880C .text dMsg2_rubySet__FP14sub_msg2_class */ void dMsg2_rubySet(sub_msg2_class* i_Msg) { - if (i_Msg->msg.mStatus == 5 || i_Msg->msg.mStatus == 6 || i_Msg->msg.mStatus == 7 || i_Msg->msg.mStatus == 10) { + if ( + i_Msg->msg.mStatus == fopMsgStts_MSG_UNK5_e || + i_Msg->msg.mStatus == fopMsgStts_MSG_TYPING_e || + i_Msg->msg.mStatus == fopMsgStts_STOP_e || + i_Msg->msg.mStatus == fopMsgStts_CLOSE_WAIT_e + ) { for (int i = 0; i < 3; i++) { if (!g_messageHIO.field_0x4b) { i_Msg->ruby_pane[i].pane->hide(); @@ -657,7 +662,7 @@ int dMsg2_stopProc(sub_msg2_class* i_Msg) { dMsg2_screenDataSet(i_Msg, r4); i_Msg->field_0xec0 = 3; i_Msg->field_0xec4 -= i_Msg->mesgEntry.field_0x16; - i_Msg->msg.mStatus = 5; + i_Msg->msg.mStatus = fopMsgStts_MSG_UNK5_e; mDoAud_seStart(JA_SE_SCROLL_1, NULL); } } else if (CPad_CHECK_TRIG_A(0) || CPad_GET_STICK_POS_Y(0) < -0.7f || CPad_GET_STICK_POS_Y(3) < -0.7f) { @@ -666,7 +671,7 @@ int dMsg2_stopProc(sub_msg2_class* i_Msg) { dMsg2_screenDataSet(i_Msg, r4); i_Msg->field_0xec0 = 1; i_Msg->field_0xec4 += i_Msg->mesgEntry.field_0x16; - i_Msg->msg.mStatus = 5; + i_Msg->msg.mStatus = fopMsgStts_MSG_UNK5_e; mDoAud_seStart(JA_SE_SCROLL_1, NULL); } #if VERSION > VERSION_DEMO @@ -691,13 +696,13 @@ int dMsg2_closewaitProc(sub_msg2_class* i_Msg) { dMsg2_screenDataSet(i_Msg, r4); i_Msg->field_0xec0 = 3; i_Msg->field_0xec4 -= i_Msg->mesgEntry.field_0x16; - i_Msg->msg.mStatus = 5; + i_Msg->msg.mStatus = fopMsgStts_MSG_UNK5_e; mDoAud_seStart(JA_SE_SCROLL_1, NULL); } } else if (CPad_CHECK_TRIG_A(0) || CPad_GET_STICK_POS_Y(0) < -0.7f || CPad_GET_STICK_POS_Y(3) < -0.7f) { i_Msg->field_0xedd = 2; mDoAud_seStart(JA_SE_TALK_WIN_CLOSE, NULL); - i_Msg->msg.mStatus = 16; + i_Msg->msg.mStatus = fopMsgStts_MSG_ENDS_e; } #if VERSION > VERSION_DEMO else { @@ -750,7 +755,7 @@ int dMsg2_closeProc(sub_msg2_class* i_Msg) { } JKRFileLoader::removeResource(i_Msg->head_p, NULL); - i_Msg->msg.mStatus = 0x12; + i_Msg->msg.mStatus = fopMsgStts_BOX_CLOSED_e; } i_Msg->field_0xe98--; @@ -867,10 +872,10 @@ int dMsg2_outwaitProc(sub_msg2_class* i_Msg) { i_Msg->field_0xec0 = 0; if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) { - i_Msg->msg.mStatus = 7; + i_Msg->msg.mStatus = fopMsgStts_STOP_e; dMsg2_arrowDownShow(i_Msg); } else { - i_Msg->msg.mStatus = 14; + i_Msg->msg.mStatus = fopMsgStts_MSG_DISPLAYED_e; dMsg2_dotShow(i_Msg); } @@ -895,7 +900,7 @@ int dMsg2_outwaitProc(sub_msg2_class* i_Msg) { i_Msg->text_pane[i_Msg->field_0xe9e].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y + i_Msg->field_0xe94; i_Msg->field_0xec0 = 0; - i_Msg->msg.mStatus = 7; + i_Msg->msg.mStatus = fopMsgStts_STOP_e; i_Msg->field_0xede = 0xFF; dMsg2_arrowDownShow(i_Msg); @@ -1024,7 +1029,7 @@ static BOOL dMsg2_Draw(sub_msg2_class* i_Msg) { static BOOL dMsg2_Execute(sub_msg2_class* i_Msg) { if (i_Msg->msg.mStatus == fopMsgStts_BOX_OPENING_e) { dMsg2_openProc(i_Msg); - } else if (i_Msg->msg.mStatus == 5) { + } else if (i_Msg->msg.mStatus == fopMsgStts_MSG_UNK5_e) { dMsg2_outwaitProc(i_Msg); } else if (i_Msg->msg.mStatus == fopMsgStts_STOP_e) { dMsg2_stopProc(i_Msg); @@ -1199,7 +1204,7 @@ static cPhs_State dMsg2_Create(msg_class* i_this) { i_Msg->message = (char*)i_Msg->msgGet.getMessage(i_Msg->head_p); i_Msg->mesgEntry = i_Msg->msgGet.getMesgEntry(i_Msg->head_p); i_Msg->mesgNumber = i_Msg->msgGet.getMesgNumber(); - i_this->mStatus = 2; + i_this->mStatus = fopMsgStts_BOX_OPENING_e; dMsg2_multiTexInit(i_Msg); diff --git a/src/d/d_meter.cpp b/src/d/d_meter.cpp index daf41de9..299157a8 100644 --- a/src/d/d_meter.cpp +++ b/src/d/d_meter.cpp @@ -2119,11 +2119,10 @@ void dMeter_actionForce(sub_meter_class* i_Meter) { if (dComIfGp_getDoStatusForce() != dActStts_BLANK_e) { dComIfGp_setDoStatusForce(dActStts_BLANK_e); } - if (dComIfGp_getAStatusForce() == dActStts_BLANK_e) { - return; + if (dComIfGp_getAStatusForce() != dActStts_BLANK_e) { + dComIfGp_setAStatus(dComIfGp_getDoStatusForce()); + dComIfGp_setAStatusForce(dActStts_BLANK_e); } - dComIfGp_setAStatus(dComIfGp_getDoStatusForce()); - dComIfGp_setAStatusForce(dActStts_BLANK_e); } /* 801F3B60-801F3CFC .text dMeter_actionChange__FP15sub_meter_class */ diff --git a/src/d/d_picture_box.cpp b/src/d/d_picture_box.cpp index 2da1d6f0..6b56870c 100644 --- a/src/d/d_picture_box.cpp +++ b/src/d/d_picture_box.cpp @@ -2416,7 +2416,7 @@ static cPhs_State dPb_Create(msg_class* i_this) { dComIfGp_setDoStatusForce(dActStts_TAKE_PHOTO_e); } else { - dComIfGp_setDoStatusForce(dComIfGp_getScopeMesgStatus()); + dComIfGp_setDoStatusForce(dActStts_BLANK_e); } if (dComIfGp_getPictureStatus() == 2) { diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp index 03a12906..d20dbab1 100644 --- a/src/f_op/f_op_msg_mng.cpp +++ b/src/f_op/f_op_msg_mng.cpp @@ -1630,7 +1630,7 @@ fopMsgM_msgDataProc_c::fopMsgM_msgDataProc_c() { field_0x292 = 0; field_0x291 = 0; field_0x290 = 0; - mesgStatus = 6; + mesgStatus = fopMsgStts_MSG_TYPING_e; field_0x27D = 0; field_0x27E = 0; field_0x27F = 0; @@ -1715,7 +1715,7 @@ void fopMsgM_msgDataProc_c::dataInit() { field_0x292 = 0; field_0x291 = 0; field_0x290 = 0; - mesgStatus = 6; + mesgStatus = fopMsgStts_MSG_TYPING_e; field_0x27D = 0; field_0x27E = 0; field_0x27F = 0; @@ -2069,7 +2069,7 @@ void fopMsgM_msgDataProc_c::stringSet() { field_0x64 = field_0x44; field_0x68 = field_0x48; field_0x6C = field_0x4C; - mesgStatus = 6; + mesgStatus = fopMsgStts_MSG_TYPING_e; if (bmgData[count] == '\0') { if (field_0x27E != 0) { @@ -2086,7 +2086,10 @@ void fopMsgM_msgDataProc_c::stringSet() { strcat(field_0x64, field_0x70); strcat(field_0x6C, field_0x70); } - if (mesgStatus != 8 && mesgStatus != 9 && mesgStatus != 0x14 && mesgStatus != 0x15) { + if ( + mesgStatus != fopMsgStts_SELECT_2_e && mesgStatus != fopMsgStts_SELECT_3_e && + mesgStatus != fopMsgStts_SELECT_YOKO_e && mesgStatus != fopMsgStts_INPUT_e + ) { if (mesgEntry->mTextboxType != 2 && mesgEntry->mTextboxType != 6 && mesgEntry->mTextboxType != 7 && mesgEntry->mTextboxType != 0xB && mesgEntry->mTextboxType != 5 && mesgEntry->mTextboxType != 0xD && mesgEntry->mTextboxType != 9) { @@ -2100,15 +2103,15 @@ void fopMsgM_msgDataProc_c::stringSet() { if (fopMsgM_nextMsgFlagCheck()) { if (mesgEntry->mNextMsgNo != 0) { fopMsgM_messageSet(mesgEntry->mNextMsgNo); - mesgStatus = 0xF; + mesgStatus = fopMsgStts_MSG_CONTINUES_e; } else { - mesgStatus = 0x10; + mesgStatus = fopMsgStts_MSG_ENDS_e; } } else { if (getAutoSendFlag() || getHandSendFlag()) { - mesgStatus = 0xA; + mesgStatus = fopMsgStts_CLOSE_WAIT_e; } else { - mesgStatus = 0xE; + mesgStatus = fopMsgStts_MSG_DISPLAYED_e; } } } @@ -2138,7 +2141,10 @@ void fopMsgM_msgDataProc_c::stringSet() { strcat(field_0x6C, field_0x70); } - if (mesgStatus == 8 || mesgStatus == 9 || mesgStatus == 0x14 || mesgStatus == 0x15) { + if ( + mesgStatus == fopMsgStts_SELECT_2_e || mesgStatus == fopMsgStts_SELECT_3_e || + mesgStatus == fopMsgStts_SELECT_YOKO_e || mesgStatus == fopMsgStts_INPUT_e + ) { return; } @@ -2155,15 +2161,15 @@ void fopMsgM_msgDataProc_c::stringSet() { if (fopMsgM_nextMsgFlagCheck()) { if (mesgEntry->mNextMsgNo != 0) { fopMsgM_messageSet(mesgEntry->mNextMsgNo); - mesgStatus = 0xF; + mesgStatus = fopMsgStts_MSG_CONTINUES_e; } else { - mesgStatus = 0x10; + mesgStatus = fopMsgStts_MSG_ENDS_e; } } else { if (getAutoSendFlag() || getHandSendFlag()) { - mesgStatus = 0xA; + mesgStatus = fopMsgStts_CLOSE_WAIT_e; } else { - mesgStatus = 0xE; + mesgStatus = fopMsgStts_MSG_DISPLAYED_e; } } } |
