diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-10-24 01:01:06 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-10-24 01:01:06 -0400 |
| commit | 8018710181ca147e898907a803e9db1a4548a0f8 (patch) | |
| tree | 3e40c34d5bc5ee6c68ae21db54f4ff5bde1dd37f /src/d/d_event_data.cpp | |
| parent | d53c702bb7529884e56e2eb0da59223b0751e970 (diff) | |
d_event_data start
Diffstat (limited to 'src/d/d_event_data.cpp')
| -rw-r--r-- | src/d/d_event_data.cpp | 126 |
1 files changed, 123 insertions, 3 deletions
diff --git a/src/d/d_event_data.cpp b/src/d/d_event_data.cpp index 619f1eb1..734815ce 100644 --- a/src/d/d_event_data.cpp +++ b/src/d/d_event_data.cpp @@ -3,8 +3,8 @@ // Translation Unit: d_event_data.cpp // -#include "d_event_data.h" -#include "dolphin/types.h" +#include "d/d_event_data.h" +#include "d/d_com_inf_game.h" /* 80071778-8007195C .text dEvDt_Next_Stage__Fii */ void dEvDt_Next_Stage(int, int) { @@ -73,7 +73,127 @@ void dEvDtStaff_c::specialProcLight() { /* 80071F58-80072458 .text specialProcMessage__12dEvDtStaff_cFv */ void dEvDtStaff_c::specialProcMessage() { - /* Nonmatching */ + int staffIdx = dComIfGp_evmng_getMyStaffId("MESSAGE", NULL, 0); + if (staffIdx == -1) { + JUT_ASSERT(0x1C2, 0); + return; + } + + static char* action_table[] = { + "WAIT", + "CREATE_MSG", + "PUSHBUTTON", + "FINISH", + "CONTINUE", + "END", + "DELETE", + "TELOP_ON", + "TELOP_OFF", + }; + static u32 l_msgId; + static msg_class* l_msg; + static int l_msgNo; + + int actIdx = dComIfGp_evmng_getMyActIdx(staffIdx, action_table, ARRAY_SIZE(action_table), 0, 0); + if (dComIfGp_evmng_getIsAddvance(staffIdx)) { + switch (actIdx) { + case 0: // WAIT + specialProc_WaitStart(staffIdx); + break; + case 1: // CREATE_MSG + l_msgId = -1; + l_msg = NULL; + u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo"); + JUT_ASSERT(0x1D2, idata); + l_msgNo = *idata; + mWipeDirection = 0; + break; + case 3: // FINISH + case 5: // END + JUT_ASSERT(0x1D8, l_msg); + l_msg->mMode = 0x10; + break; + case 4: // CONTINUE + JUT_ASSERT(0x1DC, l_msg); + l_msg->mMode = 0xF; + idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo"); + JUT_ASSERT(0x1DF, idata); + l_msgNo = *idata; + fopMsgM_messageSet(l_msgNo); + break; + case 7: // TELOP_ON + idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "tlpNo"); + JUT_ASSERT(0x1E5, idata); + dComIfGp_setStageNameOn(*idata); + specialProc_WaitStart(staffIdx); + break; + case 8: // TELOP_OFF + dComIfGp_setStageNameOff(); + break; + } + } + + switch (actIdx) { + case 0: // WAIT + case 7: // TELOP_ON + specialProc_WaitProc(staffIdx); + break; + case 1: // CREATE_MSG + switch (mWipeDirection) { + case 0: + l_msgId = fopMsgM_messageSet(l_msgNo); + if (l_msgId != -1) { + mWipeDirection++; + } + break; + case 1: + l_msg = fopMsgM_SearchByID(l_msgId); + if (l_msg) { + mWipeDirection++; + } + break; + case 2: + dComIfGp_evmng_cutEnd(staffIdx); + break; + } + break; + case 2: // PUSHBUTTON + JUT_ASSERT(0x209, l_msg); + if (l_msg->mMode == 0xE) { + dComIfGp_evmng_cutEnd(staffIdx); + } + break; + case 3: // FINISH + case 6: // DELETE + if (!l_msg) { + dComIfGp_evmng_cutEnd(staffIdx); + } else if (l_msg->mMode == 0x12) { + l_msg->mMode = 0x13; + l_msgId = -1; + l_msg = NULL; + dComIfGp_evmng_cutEnd(staffIdx); + } + break; + case 4: // CONTINUE + dComIfGp_evmng_cutEnd(staffIdx); + break; + case 5: // END + switch (l_msg->mMode) { + case 0x11: + case 0x12: + dComIfGp_evmng_cutEnd(staffIdx); + break; + } + break; + case 8: // TELOP_OFF + if (dComIfGp_checkStageName() == 0) { + dComIfGp_evmng_cutEnd(staffIdx); + } + break; + default: + dComIfGp_evmng_cutEnd(staffIdx); + break; + } } /* 80072458-80072748 .text specialProcSound__12dEvDtStaff_cFv */ |
