diff --git a/LEGO1/lego/legoomni/include/infocenterstate.h b/LEGO1/lego/legoomni/include/infocenterstate.h index 3375aaaf..bee82e37 100644 --- a/LEGO1/lego/legoomni/include/infocenterstate.h +++ b/LEGO1/lego/legoomni/include/infocenterstate.h @@ -2,6 +2,7 @@ #define INFOCENTERSTATE_H #include "decomp.h" +#include "legogamestate.h" #include "legostate.h" #include "mxstillpresenter.h" @@ -30,12 +31,12 @@ public: 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& GetUnknown0x68() { return m_unk0x68; } + inline Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; } + inline Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; } + inline Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; } + inline Playlist& GetLeaveDialogue(LegoGameState::Act p_act) { return m_leaveDialogue[p_act]; } + inline Playlist& GetBricksterDialogue() { return m_bricksterDialogue; } inline MxU32 GetUnknown0x74() { return m_unk0x74; } - inline Playlist* GetUnknown0x20() { return m_unk0x20; } - inline Playlist* GetUnknown0x44() { return m_unk0x44; } inline void SetUnknown0x74(MxU32 p_unk0x74) { m_unk0x74 = p_unk0x74; } @@ -43,11 +44,11 @@ public: // 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_unk0x68; // 0x68 + Playlist m_exitDialogueAct1; // 0x08 + Playlist m_exitDialogueAct23; // 0x14 + Playlist m_returnDialogue[3]; // 0x20 + Playlist m_leaveDialogue[3]; // 0x44 + Playlist m_bricksterDialogue; // 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..a7b352ed 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); @@ -876,7 +876,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_transitionDestination = 5; } else { - MxU32 objectId = m_infocenterState->GetUnknown0x68().Next(); + MxU32 objectId = m_infocenterState->GetBricksterDialogue().Next(); PlayAction((InfomainScript) objectId); } @@ -891,7 +891,7 @@ MxU8 Infocenter::HandleClick(LegoControlManagerEvent& p_param) m_transitionDestination = 13; } else { - MxU32 objectId = m_infocenterState->GetUnknown0x68().Next(); + MxU32 objectId = m_infocenterState->GetBricksterDialogue().Next(); PlayAction((InfomainScript) objectId); } @@ -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..f5dd508c 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenterstate.cpp @@ -5,7 +5,7 @@ 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 +23,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 +33,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 +43,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 +51,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 +59,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 +67,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, @@ -79,31 +79,33 @@ Infocenter::InfomainScript g_unk0x100f7750[4] = { }; // GLOBAL: LEGO1 0x100f7760 -Infocenter::InfomainScript g_unk0x100f7760[2] = {Infocenter::c_bricksterDialogue, Infocenter::c_bricksterLaughs}; +Infocenter::InfomainScript g_bricksterDialogue[2] = {Infocenter::c_bricksterDialogue, Infocenter::c_bricksterLaughs}; // 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_bricksterDialogue = LegoState::Playlist((MxU32*) g_bricksterDialogue, _countof(g_bricksterDialogue)); memset(m_buffer, 0, sizeof(m_buffer)); }