1
0
Fork 0
mirror of https://github.com/isledecomp/isle.git synced 2025-04-08 20:54:23 -04:00

Match Infocenter::ReadyWorld ()

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz 2025-02-21 21:26:10 +01:00 committed by GitHub
parent 777dfa82ec
commit 78e924e4ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 31 deletions
LEGO1/lego/legoomni

View file

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

View file

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

View file

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