From 0fdc8561931f1b66de4be552121542c07465d08d Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 10 Feb 2024 11:38:14 -0500 Subject: [PATCH] Add names for dialogue playlists --- LEGO1/lego/legoomni/include/infocenterstate.h | 16 +++---- .../legoomni/src/infocenter/infocenter.cpp | 28 ++++++------ .../src/infocenter/infocenterstate.cpp | 45 ++++++++++--------- .../legoomni/src/video/legomodelpresenter.cpp | 3 ++ 4 files changed, 49 insertions(+), 43 deletions(-) diff --git a/LEGO1/lego/legoomni/include/infocenterstate.h b/LEGO1/lego/legoomni/include/infocenterstate.h index 3375aaaf..ea6a4ac3 100644 --- a/LEGO1/lego/legoomni/include/infocenterstate.h +++ b/LEGO1/lego/legoomni/include/infocenterstate.h @@ -30,12 +30,12 @@ class InfocenterState : public LegoState { inline MxS16 GetInfocenterBufferSize() { return sizeof(m_buffer) / sizeof(m_buffer[0]); } inline MxStillPresenter* GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; } - inline Playlist& GetUnknown0x08() { return m_unk0x08; } - inline Playlist& GetUnknown0x14() { return m_unk0x14; } + inline Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; } + inline Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; } inline Playlist& GetUnknown0x68() { return m_unk0x68; } inline MxU32 GetUnknown0x74() { return m_unk0x74; } - inline Playlist* GetUnknown0x20() { return m_unk0x20; } - inline Playlist* GetUnknown0x44() { return m_unk0x44; } + inline Playlist* GetReturnDialogue() { return m_returnDialogue; } + inline Playlist* GetLeaveDialogue() { return m_leaveDialogue; } inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; } @@ -43,10 +43,10 @@ class InfocenterState : public LegoState { // InfocenterState::`scalar deleting destructor' private: - Playlist m_unk0x08; // 0x08 - Playlist m_unk0x14; // 0x14 - Playlist m_unk0x20[3]; // 0x20 - Playlist m_unk0x44[3]; // 0x44 + Playlist m_exitDialogueAct1; // 0x08 + Playlist m_exitDialogueAct23; // 0x14 + Playlist m_returnDialogue[3]; // 0x20 + Playlist m_leaveDialogue[3]; // 0x44 Playlist m_unk0x68; // 0x68 MxU32 m_unk0x74; // 0x74 MxStillPresenter* m_buffer[7]; // 0x78 diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp index 72c9c1f7..4d9c0199 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp @@ -368,7 +368,7 @@ void Infocenter::ReadyWorld() PlayMusic(JukeBox::e_informationCenter); InfomainScript script = - (InfomainScript) m_infocenterState->GetUnknown0x20()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetReturnDialogue()[GameState()->GetCurrentAct()].Next(); PlayAction(script); if (script == c_returnBackGuidanceDialogue2) { @@ -434,7 +434,7 @@ void Infocenter::ReadyWorld() m_transitionDestination = 0x2e; InfomainScript script = - (InfomainScript) m_infocenterState->GetUnknown0x20()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetReturnDialogue()[GameState()->GetCurrentAct()].Next(); PlayAction(script); InputManager()->DisableInputProcessing(); @@ -444,7 +444,7 @@ void Infocenter::ReadyWorld() PlayMusic(JukeBox::e_informationCenter); InfomainScript script = - (InfomainScript) m_infocenterState->GetUnknown0x20()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetReturnDialogue()[GameState()->GetCurrentAct()].Next(); PlayAction(script); bgRed->Enable(TRUE); break; @@ -490,7 +490,7 @@ void Infocenter::ReadyWorld() m_transitionDestination = 0x2f; InfomainScript script = - (InfomainScript) m_infocenterState->GetUnknown0x20()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetReturnDialogue()[GameState()->GetCurrentAct()].Next(); PlayAction(script); InputManager()->DisableInputProcessing(); @@ -500,7 +500,7 @@ void Infocenter::ReadyWorld() PlayMusic(JukeBox::e_informationCenter); InfomainScript script = - (InfomainScript) m_infocenterState->GetUnknown0x20()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetReturnDialogue()[GameState()->GetCurrentAct()].Next(); PlayAction(script); bgRed->Enable(TRUE); break; @@ -830,7 +830,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y) break; default: dialogueToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()].Next(); break; } @@ -840,7 +840,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y) } else { dialogueToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()].Next(); } PlayAction(dialogueToPlay); @@ -942,7 +942,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_infocenterState->SetUnknown0x74(5); m_transitionDestination = state->GetPreviousArea(); actionToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()].Next(); m_radio.Stop(); InputManager()->DisableInputProcessing(); InputManager()->SetUnknown336(TRUE); @@ -953,8 +953,8 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_infocenterState->SetUnknown0x74(5); m_transitionDestination = state->GetPreviousArea(); actionToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next( - ); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()] + .Next(); m_radio.Stop(); InputManager()->DisableInputProcessing(); InputManager()->SetUnknown336(TRUE); @@ -971,7 +971,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_infocenterState->SetUnknown0x74(5); m_transitionDestination = 0x2e; actionToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()].Next(); InputManager()->DisableInputProcessing(); InputManager()->SetUnknown336(TRUE); break; @@ -979,7 +979,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_infocenterState->SetUnknown0x74(5); m_transitionDestination = 0x2f; actionToPlay = - (InfomainScript) m_infocenterState->GetUnknown0x44()[GameState()->GetCurrentAct()].Next(); + (InfomainScript) m_infocenterState->GetLeaveDialogue()[GameState()->GetCurrentAct()].Next(); InputManager()->DisableInputProcessing(); InputManager()->SetUnknown336(TRUE); break; @@ -1047,10 +1047,10 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param) InfomainScript objectId; if (GameState()->GetCurrentAct() != LegoGameState::e_act1) { - objectId = (InfomainScript) m_infocenterState->GetUnknown0x14().Next(); + objectId = (InfomainScript) m_infocenterState->GetExitDialogueAct23().Next(); } else { - objectId = (InfomainScript) m_infocenterState->GetUnknown0x08().Next(); + objectId = (InfomainScript) m_infocenterState->GetExitDialogueAct1().Next(); } PlayAction(objectId); diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp index 55f4f4d8..cd84e97f 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp @@ -1,11 +1,12 @@ #include "infocenterstate.h" #include "infocenter.h" +#include "legogamestate.h" DECOMP_SIZE_ASSERT(InfocenterState, 0x94); // GLOBAL: LEGO1 0x100f76a8 -Infocenter::InfomainScript g_unk0x100f76a8[14] = { +Infocenter::InfomainScript g_exitDialogueAct1[14] = { Infocenter::c_clickOnObjectsGuidanceDialogue, Infocenter::c_arrowNavigationGuidanceDialogue, Infocenter::c_elevatorGuidanceDialogue, @@ -23,7 +24,7 @@ Infocenter::InfomainScript g_unk0x100f76a8[14] = { }; // GLOBAL: LEGO1 0x100f76e0 -Infocenter::InfomainScript g_unk0x100f76e0[6] = { +Infocenter::InfomainScript g_exitDialogueAct23[6] = { Infocenter::c_bricksterWarningDialogue, Infocenter::c_newGameGuidanceDialogue, Infocenter::c_bricksterEscapedDialogue1, @@ -33,7 +34,7 @@ Infocenter::InfomainScript g_unk0x100f76e0[6] = { }; // GLOBAL: LEGO1 0x100f76f8 -Infocenter::InfomainScript g_unk0x100f76f8[6] = { +Infocenter::InfomainScript g_returnDialogueAct1[6] = { Infocenter::c_returnBackGuidanceDialogue2, Infocenter::c_reenterInfoCenterDialogue1, Infocenter::c_reenterInfoCenterDialogue2, @@ -43,7 +44,7 @@ Infocenter::InfomainScript g_unk0x100f76f8[6] = { }; // GLOBAL: LEGO1 0x100f7710 -Infocenter::InfomainScript g_unk0x100f7710[4] = { +Infocenter::InfomainScript g_returnDialogueAct2[4] = { Infocenter::c_bricksterEscapedDialogue1, Infocenter::c_bricksterEscapedDialogue2, Infocenter::c_bricksterEscapedDialogue3, @@ -51,7 +52,7 @@ Infocenter::InfomainScript g_unk0x100f7710[4] = { }; // GLOBAL: LEGO1 0x100f7720 -Infocenter::InfomainScript g_unk0x100f7720[4] = { +Infocenter::InfomainScript g_returnDialogueAct3[4] = { Infocenter::c_bricksterEscapedDialogue4, Infocenter::c_bricksterEscapedDialogue5, Infocenter::c_bricksterEscapedDialogue6, @@ -59,7 +60,7 @@ Infocenter::InfomainScript g_unk0x100f7720[4] = { }; // GLOBAL: LEGO1 0x100f7730 -Infocenter::InfomainScript g_unk0x100f7730[4] = { +Infocenter::InfomainScript g_leaveDialogueAct1[4] = { Infocenter::c_leaveInfoCenterDialogue1, Infocenter::c_leaveInfoCenterDialogue2, Infocenter::c_leaveInfoCenterDialogue3, @@ -67,11 +68,11 @@ Infocenter::InfomainScript g_unk0x100f7730[4] = { }; // GLOBAL: LEGO1 0x100f7740 -Infocenter::InfomainScript g_unk0x100f7740[4] = +Infocenter::InfomainScript g_leaveDialogueAct2[4] = {Infocenter::c_unk569, Infocenter::c_unk570, Infocenter::c_unk571, Infocenter::c_unk572}; // GLOBAL: LEGO1 0x100f7750 -Infocenter::InfomainScript g_unk0x100f7750[4] = { +Infocenter::InfomainScript g_leaveDialogueAct3[4] = { Infocenter::c_unk566, Infocenter::c_unk567, Infocenter::c_unk568, @@ -84,26 +85,28 @@ Infocenter::InfomainScript g_unk0x100f7760[2] = {Infocenter::c_bricksterDialogue // FUNCTION: LEGO1 0x10071600 InfocenterState::InfocenterState() { - m_unk0x08 = LegoState::Playlist((MxU32*) g_unk0x100f76a8, sizeof(g_unk0x100f76a8) / sizeof(g_unk0x100f76a8[0])); + m_exitDialogueAct1 = LegoState::Playlist((MxU32*) g_exitDialogueAct1, _countof(g_exitDialogueAct1)); + m_exitDialogueAct23 = LegoState::Playlist((MxU32*) g_exitDialogueAct23, _countof(g_exitDialogueAct23) - 1); - m_unk0x14 = LegoState::Playlist((MxU32*) g_unk0x100f76e0, sizeof(g_unk0x100f76e0) / sizeof(g_unk0x100f76e0[0]) - 1); + m_returnDialogue[LegoGameState::e_act1] = + LegoState::Playlist((MxU32*) g_returnDialogueAct1, _countof(g_returnDialogueAct1) - 1); - m_unk0x20[0] = - LegoState::Playlist((MxU32*) g_unk0x100f76f8, sizeof(g_unk0x100f76f8) / sizeof(g_unk0x100f76f8[0]) - 1); + m_returnDialogue[LegoGameState::e_act2] = + LegoState::Playlist((MxU32*) g_returnDialogueAct2, _countof(g_returnDialogueAct2) - 1); - m_unk0x20[1] = - LegoState::Playlist((MxU32*) g_unk0x100f7710, sizeof(g_unk0x100f7710) / sizeof(g_unk0x100f7710[0]) - 1); + m_returnDialogue[LegoGameState::e_act3] = + LegoState::Playlist((MxU32*) g_returnDialogueAct3, _countof(g_returnDialogueAct3)); - m_unk0x20[2] = LegoState::Playlist((MxU32*) g_unk0x100f7720, sizeof(g_unk0x100f7720) / sizeof(g_unk0x100f7720[0])); + m_leaveDialogue[LegoGameState::e_act1] = + LegoState::Playlist((MxU32*) g_leaveDialogueAct1, _countof(g_leaveDialogueAct1)); - m_unk0x44[0] = LegoState::Playlist((MxU32*) g_unk0x100f7730, sizeof(g_unk0x100f7730) / sizeof(g_unk0x100f7730[0])); + m_leaveDialogue[LegoGameState::e_act2] = + LegoState::Playlist((MxU32*) g_leaveDialogueAct2, _countof(g_leaveDialogueAct2)); - m_unk0x44[1] = LegoState::Playlist((MxU32*) g_unk0x100f7740, sizeof(g_unk0x100f7740) / sizeof(g_unk0x100f7740[0])); + m_leaveDialogue[LegoGameState::e_act3] = + LegoState::Playlist((MxU32*) g_leaveDialogueAct3, _countof(g_leaveDialogueAct3) - 1); - m_unk0x44[2] = - LegoState::Playlist((MxU32*) g_unk0x100f7750, sizeof(g_unk0x100f7750) / sizeof(g_unk0x100f7750[0]) - 1); - - m_unk0x68 = LegoState::Playlist((MxU32*) g_unk0x100f7760, sizeof(g_unk0x100f7760) / sizeof(g_unk0x100f7760[0])); + m_unk0x68 = LegoState::Playlist((MxU32*) g_unk0x100f7760, _countof(g_unk0x100f7760)); memset(m_buffer, 0, sizeof(m_buffer)); } diff --git a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp index d5fb18b9..32e07cc3 100644 --- a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp @@ -44,6 +44,9 @@ undefined4 LegoModelPresenter::LoadModel(MxStreamChunk* p_chunk) // FUNCTION: LEGO1 0x10080050 void LegoModelPresenter::ReadyTickle() { + ProgressTickleState(e_starting); + return; + if (m_compositePresenter != NULL && m_compositePresenter->IsA("LegoEntityPresenter") && m_compositePresenter->GetCurrentTickleState() <= e_ready) { return;