From b7bc5b42a57f7e351c04af1244b3014e228716d3 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Thu, 18 May 2023 12:08:41 +0300 Subject: Work on d_msg_flow --- include/d/com/d_com_inf_game.h | 39 ++++++++++++++++++++++++++++++++++++++- include/d/com/d_com_static.h | 2 ++ include/d/d_attention.h | 2 +- include/d/meter/d_meter2_info.h | 10 ++++++++++ include/d/msg/d_msg_flow.h | 8 ++++---- include/d/msg/d_msg_object.h | 23 +++++++++++++++++++---- include/f_op/f_op_msg_mng.h | 2 ++ 7 files changed, 76 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index 88e1846ab2..2d252ffc36 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -436,6 +436,24 @@ public: void setMsgDtArchive(int i, JKRArchive* arc) { mMsgDtArchive[i] = arc; } void setMsgCommonArchive(JKRArchive* arc) { mMsgCommonArchive = arc; } void setMsgArchive(int i, JKRArchive* arc) { mMsgArchive[i] = arc; } + void setMesgCamInfoActor(fopAc_ac_c* param_1, fopAc_ac_c* param_2, fopAc_ac_c* param_3, + fopAc_ac_c* param_4, fopAc_ac_c* param_5, fopAc_ac_c* param_6, + fopAc_ac_c* param_7, fopAc_ac_c* param_8, fopAc_ac_c* param_9, + fopAc_ac_c* param_10) { + mMesgCamInfoActor1 = param_1; + mMesgCamInfoActor2 = param_2; + mMesgCamInfoActor3 = param_3; + mMesgCamInfoActor4 = param_4; + mMesgCamInfoActor5 = param_5; + mMesgCamInfoActor6 = param_6; + mMesgCamInfoActor7 = param_7; + mMesgCamInfoActor8 = param_8; + mMesgCamInfoActor9 = param_9; + mMesgCamInfoActor10 = param_10; + } + int getMesgCamInfo() { + return mMesgCamInfoBasicID; + } void setFontArchive(JKRArchive* arc) { mFontArchive = arc; } void setRubyArchive(JKRArchive* arc) { mRubyArchive = arc; } void setMain2DArchive(JKRArchive* arc) { mMain2DArchive = arc; } @@ -1377,6 +1395,10 @@ inline u8 dComIfGs_getArrowNum() { return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getArrowNum(); } +inline u8 dComIfGs_checkEmptyBottle() { + return g_dComIfG_gameInfo.info.getPlayer().getItem().checkEmptyBottle(); +} + inline void dComIfGs_initZone() { g_dComIfG_gameInfo.info.initZone(); } @@ -1579,7 +1601,7 @@ inline void dComIfGs_setTmpReg(u16 i_reg, u8 i_no) { g_dComIfG_gameInfo.info.getTmp().setEventReg(i_reg, i_no); } -inline int dComIfGs_getTmpReg(u16 i_reg) { +inline u8 dComIfGs_getTmpReg(u16 i_reg) { return g_dComIfG_gameInfo.info.getTmp().getEventReg(i_reg); } @@ -2690,6 +2712,21 @@ inline void dComIfGp_setMesgCameraTagInfo(int param_0) { g_dComIfG_gameInfo.play.setMesgCamInfoID(param_0); } +inline void dComIfGp_setMesgCameraInfoActor(fopAc_ac_c* param_1, fopAc_ac_c* param_2, + fopAc_ac_c* param_3, fopAc_ac_c* param_4, + fopAc_ac_c* param_5, fopAc_ac_c* param_6, + fopAc_ac_c* param_7, fopAc_ac_c* param_8, + fopAc_ac_c* param_9, fopAc_ac_c* param_10) + +{ + g_dComIfG_gameInfo.play.setMesgCamInfoActor(param_1, param_2, param_3, param_4, param_5, + param_6, param_7, param_8, param_9, param_10); +} + +inline int dComIfGp_getMesgCameraInfo() { + return g_dComIfG_gameInfo.play.getMesgCamInfo(); +} + inline s32 dComIfGp_roomControl_getStayNo() { return dStage_roomControl_c::getStayNo(); } diff --git a/include/d/com/d_com_static.h b/include/d/com/d_com_static.h index e4ab5deb75..1404ac468c 100644 --- a/include/d/com/d_com_static.h +++ b/include/d/com/d_com_static.h @@ -4,5 +4,7 @@ #include "rel/d/a/d_a_suspend/d_a_suspend.h" int daNpcKakashi_getSwdTutorialStep(); +bool daNpcKakashi_getSwdTutorialResult(); +int daNpcKakashi_getSuccessCount(); #endif /* D_COM_D_COM_STATIC_H */ diff --git a/include/d/d_attention.h b/include/d/d_attention.h index ccf6630703..09f28ad8d7 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -204,7 +204,7 @@ public: /* 8016E424 */ void LockEdge(); /* 80182994 */ void GetCheckObjectCount(); /* 80182AD0 */ void keepLock(int); - /* 8014B010 */ void getDistTable(int); + /* 8014B010 */ static dist_entry& getDistTable(int); dAttCatch_c& getCatghTarget() { return mCatghTarget; } u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); } diff --git a/include/d/meter/d_meter2_info.h b/include/d/meter/d_meter2_info.h index 27a9d90192..e840817d0f 100644 --- a/include/d/meter/d_meter2_info.h +++ b/include/d/meter/d_meter2_info.h @@ -146,11 +146,13 @@ public: void setGameOverType(u8 i_gameoverType) { mGameOverType = i_gameoverType; } void setMsgKeyWaitTimer(s16 i_waitTimer) { mMsgKeyWaitTimer = i_waitTimer; } u32 getMsgTimeMs() { return mMsgTimeMs; } + void setMsgTimeMs(u32 msgTime) { mMsgTimeMs = msgTime; } u32 getTimeMs() { return mTimeMs; } u8 getNowCount() { return mNowCount; } void setScopeZoomPointer(u8 param_0) { mScopeZoomPointer = param_0; } u8 getItemExplainWindowStatus() { return mItemExplainWindowStatus; } void resetDirectUseItem() { mDirectUseItem = 0; } + u16 getFloatingFlowID() { return mFloatingFlowID; } public: /* 0x04 */ u8 unk4[4]; @@ -522,6 +524,10 @@ inline u32 dMeter2Info_getTimeMs() { return g_meter2_info.getTimeMs(); } +inline void dMeter2Info_setMsgTimeMs(u32 msgTime) { + g_meter2_info.setMsgTimeMs(msgTime); +} + inline u8 dMeter2Info_getNowCount() { return g_meter2_info.getNowCount(); } @@ -542,6 +548,10 @@ inline void dMeter2Info_resetDirectUseItem() { g_meter2_info.resetDirectUseItem(); } +inline u16 dMeter2Info_getFloatingFlowID() { + return g_meter2_info.getFloatingFlowID(); +} + const char* dMeter2Info_getNumberTextureName(int pIndex); void dMeter2Info_recieveLetter(); u8 dMeter2Info_getNewLetterNum(); diff --git a/include/d/msg/d_msg_flow.h b/include/d/msg/d_msg_flow.h index 4e975d941b..74dec026b4 100644 --- a/include/d/msg/d_msg_flow.h +++ b/include/d/msg/d_msg_flow.h @@ -35,7 +35,7 @@ public: /* 80249F48 */ virtual ~dMsgFlow_c(); /* 80249F90 */ void init(fopAc_ac_c*, int, int, fopAc_ac_c**); - /* 8024A13C */ void checkOpenDoor(fopAc_ac_c*, int*); + /* 8024A13C */ int checkOpenDoor(fopAc_ac_c*, int*); /* 8024A2D8 */ int doFlow(fopAc_ac_c*, fopAc_ac_c**, int); /* 8024A424 */ int checkEventRender(int*, int*, int*, int*); /* 8024A4C4 */ void remove(); @@ -48,8 +48,8 @@ public: /* 8024A6EC */ u8* getMsgDataBlock(char const*); /* 8024A784 */ u16 getInitNodeIndex(u16); /* 8024A7CC */ void setNodeIndex(u16, fopAc_ac_c**); - /* 8024A95C */ void setSelectMsg(mesg_flow_node*, mesg_flow_node*, fopAc_ac_c*); - /* 8024AA50 */ void setNormalMsg(mesg_flow_node*, fopAc_ac_c*); + /* 8024A95C */ int setSelectMsg(mesg_flow_node*, mesg_flow_node*, fopAc_ac_c*); + /* 8024AA50 */ int setNormalMsg(mesg_flow_node*, fopAc_ac_c*); /* 8024AB30 */ int messageNodeProc(fopAc_ac_c*, fopAc_ac_c**); /* 8024AD54 */ int branchNodeProc(fopAc_ac_c*, fopAc_ac_c**); /* 8024ADEC */ int eventNodeProc(fopAc_ac_c*, fopAc_ac_c**); @@ -170,7 +170,7 @@ private: /* 0x10 */ u16 field_0x10; /* 0x12 */ u16 field_0x12; /* 0x14 */ u16* field_0x14; - /* 0x18 */ int field_0x18; + /* 0x18 */ u16* field_0x18; /* 0x1C */ u16 mFlow; /* 0x1E */ u8 field_0x1e[2]; /* 0x20 */ u32 mMsg; diff --git a/include/d/msg/d_msg_object.h b/include/d/msg/d_msg_object.h index e82c0ecc33..75a0e42eba 100644 --- a/include/d/msg/d_msg_object.h +++ b/include/d/msg/d_msg_object.h @@ -93,7 +93,7 @@ public: /* 802379AC */ static void setKillMessageFlag(); /* 802379D8 */ void setKillMessageFlagLocal(); /* 80237A74 */ static void setTalkPartner(fopAc_ac_c*); - /* 80237A88 */ void setNowTalkFlowNo(s16); + /* 80237A88 */ static void setNowTalkFlowNo(s16); /* 80237A9C */ void getNowTalkFlowNo(); /* 80237AB0 */ void setDemoMessage(u32); /* 80237AE0 */ void setTalkHeap(void*); @@ -146,12 +146,12 @@ public: /* 80238500 */ void getMsgOutputType(); /* 80238514 */ static const char* getWord(); /* 80238528 */ void getSelectWord(int); - /* 80238544 */ void setSelectWordFlag(u8); + /* 80238544 */ static void setSelectWordFlag(u8); /* 80238574 */ void getSelectWordFlag(); /* 80238588 */ bool isHowlHearingMode(); /* 802385B4 */ static u8 getSelectBombBagID(); /* 802385E0 */ static s16 getSelectBombPrice(); - /* 8023860C */ void setEquipBombInfo(); + /* 8023860C */ static void setEquipBombInfo(); /* 80238638 */ u8 getItemEquipButton(); /* 8023864C */ static void setSelectCancelPos(u8); @@ -334,6 +334,21 @@ inline void dMsgObject_setSmellType(u8 type) { dMsgObject_c::setSmellType(type); } +inline void dMsgObject_setTalkPartner(fopAc_ac_c *actor) { + dMsgObject_getMsgObjectClass()->setTalkPartner(actor); +} + +inline void dMsgObject_setSelectWordFlag(u8 flag) { + dMsgObject_getMsgObjectClass()->setSelectWordFlag(flag); +} + +inline void dMsgObject_setNowTalkFlowNo(s16 nowTalkFlowNo) { + dMsgObject_c::setNowTalkFlowNo(nowTalkFlowNo); +} + +inline void dMsgObject_setEquipBombInfo() { + dMsgObject_c::setEquipBombInfo(); +} class dMsgObject_HowlHIO_c { public: @@ -488,7 +503,7 @@ public: /* 0x2F0 */ u16 mPikariHaloDelay_spirit; /* 0x2F2 */ u8 mStageTitleDisplayType; /* 0x2F4 */ s16 mMsgIndex; - /* 0x2F6 */ u16 mFlowIndex; + /* 0x2F6 */ s16 mFlowIndex; /* 0x2F8 */ u16 mSaveSeqMsgIndex; /* 0x2FA */ u16 mSelWeightFrame; /* 0x2FC */ u16 mBoxAppearBound; diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h index 15fa6eae40..6c74b566e1 100644 --- a/include/f_op/f_op_msg_mng.h +++ b/include/f_op/f_op_msg_mng.h @@ -42,7 +42,9 @@ void fopMsgM_Delete(void* process); fopMsg_prm_class* fopMsgM_GetAppend(void* msg); void fopMsgM_setMessageID(unsigned int); void fopMsgM_destroyExpHeap(JKRExpHeap*); +f32 fopMsgM_valueIncrease(int param_0, int param_1, u8 param_2); s32 fopMsgM_setStageLayer(void*); +int fopMsgM_messageSet(u32 i_msgIdx, fopAc_ac_c* i_actorP, u32 param_2); int fopMsgM_messageSet(u32 param_0, u32 param_1); int fopMsgM_messageSetDemo(u32 param_0); msg_class* fopMsgM_SearchByID(unsigned int param_0); -- cgit v1.2.3 From c504812d1a0a12dcfbb55a7f095229e3c69fa8cf Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Fri, 19 May 2023 08:06:01 +0300 Subject: Match dMsgFlow_c::event032 --- include/d/msg/d_msg_flow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/d/msg/d_msg_flow.h b/include/d/msg/d_msg_flow.h index cc14bff58e..1374caae9d 100644 --- a/include/d/msg/d_msg_flow.h +++ b/include/d/msg/d_msg_flow.h @@ -188,7 +188,7 @@ private: /* 0x34 */ int field_0x34; /* 0x38 */ u16 field_0x38; /* 0x3A */ u16 mChoiceNo; - /* 0x3C */ int field_0x3c; + /* 0x3C */ s32 field_0x3c; /* 0x40 */ u8 field_0x40; /* 0x41 */ u8 field_0x41; /* 0x42 */ u8 field_0x42; -- cgit v1.2.3