Add names for dialogue playlists

This commit is contained in:
Christian Semmler 2024-02-10 11:38:14 -05:00
parent ec3bcaf9bf
commit 0fdc856193
4 changed files with 49 additions and 43 deletions

View File

@ -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

View File

@ -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);

View File

@ -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));
}

View File

@ -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;