diff --git a/LEGO1/lego/legoomni/include/infocenter.h b/LEGO1/lego/legoomni/include/infocenter.h index 19d70d7b..03c55254 100644 --- a/LEGO1/lego/legoomni/include/infocenter.h +++ b/LEGO1/lego/legoomni/include/infocenter.h @@ -51,10 +51,15 @@ public: return (InfomainScript::Script) m_leaveDialogue[GameState()->GetCurrentAct()].Next(); } + // FUNCTION: BETA10 0x10031ac0 + InfomainScript::Script GetNextReturnDialogue() + { + return (InfomainScript::Script) m_returnDialogue[GameState()->GetCurrentAct()].Next(); + } + // TODO: These probably don't exist according to BETA Playlist& GetExitDialogueAct1() { return m_exitDialogueAct1; } Playlist& GetExitDialogueAct23() { return m_exitDialogueAct23; } - Playlist& GetReturnDialogue(LegoGameState::Act p_act) { return m_returnDialogue[p_act]; } Playlist& GetBricksterDialogue() { return m_bricksterDialogue; } // SYNTHETIC: LEGO1 0x10071900 diff --git a/LEGO1/lego/legoomni/src/common/legostate.cpp b/LEGO1/lego/legoomni/src/common/legostate.cpp index a8c2cc6b..6d48f5d0 100644 --- a/LEGO1/lego/legoomni/src/common/legostate.cpp +++ b/LEGO1/lego/legoomni/src/common/legostate.cpp @@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(LegoState, 0x08) DECOMP_SIZE_ASSERT(LegoState::Playlist, 0x0c) // FUNCTION: LEGO1 0x10014d00 +// FUNCTION: BETA10 0x10022580 MxU32 LegoState::Playlist::Next() { MxU32 objectId; diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 671fbf7c..657536b0 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -456,7 +456,7 @@ void Infocenter::ReadyWorld() case 3: PlayCutscene(e_legoMovie, TRUE); m_infocenterState->m_unk0x74 = 0; - break; + return; case 4: m_infocenterState->m_unk0x74 = 2; if (!m_infocenterState->HasRegistered()) { @@ -466,13 +466,12 @@ void Infocenter::ReadyWorld() PlayAction(InfomainScript::c_iicx18in_RunAnim); PlayMusic(JukeboxScript::c_InformationCenter_Music); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); - break; + return; case 5: default: { PlayMusic(JukeboxScript::c_InformationCenter_Music); - InfomainScript::Script script = - (InfomainScript::Script) m_infocenterState->GetReturnDialogue(GameState()->GetCurrentAct()).Next(); + InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); PlayAction(script); if (script == InfomainScript::c_iicx26in_RunAnim) { @@ -485,15 +484,13 @@ void Infocenter::ReadyWorld() m_bookAnimationTimer = 1; } - m_infocenterState->m_unk0x74 = 11; - FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); break; } case 8: PlayMusic(JukeboxScript::c_InformationCenter_Music); PlayAction(InfomainScript::c_iic043in_RunAnim); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); - break; + return; case 0xf: m_infocenterState->m_unk0x74 = 2; if (!m_infocenterState->HasRegistered()) { @@ -503,9 +500,9 @@ void Infocenter::ReadyWorld() PlayAction(InfomainScript::c_iicx17in_RunAnim); PlayMusic(JukeboxScript::c_InformationCenter_Music); FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); - break; + return; } - return; + break; case LegoGameState::e_act2: { if (m_infocenterState->m_unk0x74 == 8) { PlayMusic(JukeboxScript::c_InformationCenter_Music); @@ -537,8 +534,7 @@ void Infocenter::ReadyWorld() m_infocenterState->m_unk0x74 = 5; m_destLocation = LegoGameState::e_act2main; - InfomainScript::Script script = - (InfomainScript::Script) m_infocenterState->GetReturnDialogue(GameState()->GetCurrentAct()).Next(); + InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); PlayAction(script); InputManager()->DisableInputProcessing(); @@ -547,8 +543,7 @@ void Infocenter::ReadyWorld() } PlayMusic(JukeboxScript::c_InformationCenter_Music); - InfomainScript::Script script = - (InfomainScript::Script) m_infocenterState->GetReturnDialogue(GameState()->GetCurrentAct()).Next(); + InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); PlayAction(script); bgRed->Enable(TRUE); break; @@ -565,20 +560,18 @@ void Infocenter::ReadyWorld() Act3State* state = (Act3State*) GameState()->GetState("Act3State"); GameState()->FindLoadedAct(); - if (state) { - if (state->GetUnknown0x08() == 3) { - bg->Enable(TRUE); - PlayCutscene(e_badEndMovie, TRUE); - m_infocenterState->m_unk0x74 = 0; - return; - } + if (state && state->GetUnknown0x08() == 3) { + bg->Enable(TRUE); + PlayCutscene(e_badEndMovie, TRUE); + m_infocenterState->m_unk0x74 = 0; + return; + } - if (state && state->GetUnknown0x08() == 2) { - bg->Enable(TRUE); - PlayCutscene(e_goodEndMovie, TRUE); - m_infocenterState->m_unk0x74 = 0; - return; - } + if (state && state->GetUnknown0x08() == 2) { + bg->Enable(TRUE); + PlayCutscene(e_goodEndMovie, TRUE); + m_infocenterState->m_unk0x74 = 0; + return; } if (m_infocenterState->m_unk0x74 == 4) { @@ -593,8 +586,7 @@ void Infocenter::ReadyWorld() m_infocenterState->m_unk0x74 = 5; m_destLocation = LegoGameState::e_act3script; - InfomainScript::Script script = - (InfomainScript::Script) m_infocenterState->GetReturnDialogue(GameState()->GetCurrentAct()).Next(); + InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); PlayAction(script); InputManager()->DisableInputProcessing(); @@ -603,8 +595,7 @@ void Infocenter::ReadyWorld() } PlayMusic(JukeboxScript::c_InformationCenter_Music); - InfomainScript::Script script = - (InfomainScript::Script) m_infocenterState->GetReturnDialogue(GameState()->GetCurrentAct()).Next(); + InfomainScript::Script script = m_infocenterState->GetNextReturnDialogue(); PlayAction(script); bgRed->Enable(TRUE); break; @@ -1228,6 +1219,7 @@ MxLong Infocenter::HandleNotification0(MxNotificationParam& p_param) } // FUNCTION: LEGO1 0x10070aa0 +// FUNCTION: BETA10 0x10030508 void Infocenter::Enable(MxBool p_enable) { LegoWorld::Enable(p_enable);