Infocenter::HandleControl maybe down to entropy

This commit is contained in:
jonschz 2025-02-15 15:33:02 +01:00
parent 4cccf35d4a
commit bcdcb9d0fc
3 changed files with 42 additions and 29 deletions

View File

@ -630,6 +630,7 @@ MxCore* LegoWorld::Find(const char* p_class, const char* p_name)
}
// FUNCTION: LEGO1 0x10021790
// FUNCTION: BETA10 0x100db3de
MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId)
{
LegoEntityListCursor entityCursor(m_entityList);

View File

@ -38,6 +38,7 @@ MxAtomId* g_elevbottScript = NULL;
MxAtomId* g_infodoorScript = NULL;
// GLOBAL: LEGO1 0x100f4548
// GLOBAL: BETA10 0x102114dc
MxAtomId* g_infomainScript = NULL;
// GLOBAL: LEGO1 0x100f454c

View File

@ -1050,37 +1050,47 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
case InfomainScript::c_BigInfo_Ctl:
switch (state->GetCurrentAct()) {
case LegoGameState::e_act1:
switch (state->GetPreviousArea()) {
case LegoGameState::e_infodoor:
case LegoGameState::e_regbook:
case LegoGameState::e_infoscor:
m_infocenterState->SetUnknown0x74(5);
m_destLocation = state->GetPreviousArea();
actionToPlay =
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct())
.Next();
m_radio.Stop();
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
break;
case LegoGameState::e_unk4:
if (state->GetActorId() != LegoActor::c_none) {
if (m_infocenterState->HasRegistered()) {
m_infocenterState->SetUnknown0x74(5);
m_destLocation = state->GetPreviousArea();
actionToPlay = (InfomainScript::Script) m_infocenterState
->GetLeaveDialogue(GameState()->GetCurrentAct())
.Next();
m_radio.Stop();
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
}
else {
PlayAction(InfomainScript::c_iic007in_PlayWav);
m_infocenterState->SetUnknown0x74(2);
if (state->GetPreviousArea()) {
switch (state->GetPreviousArea()) {
case LegoGameState::e_infodoor:
case LegoGameState::e_regbook:
case LegoGameState::e_infoscor:
m_infocenterState->SetUnknown0x74(5);
m_destLocation = state->GetPreviousArea();
actionToPlay =
(InfomainScript::Script) m_infocenterState->GetLeaveDialogue(GameState()->GetCurrentAct())
.Next();
m_radio.Stop();
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
break;
case LegoGameState::e_elevbott:
case LegoGameState::e_elevride:
case LegoGameState::e_elevride2:
case LegoGameState::e_elevopen:
case LegoGameState::e_seaview:
case LegoGameState::e_observe:
case LegoGameState::e_elevdown:
break;
default:
if (state->GetActorId() != LegoActor::c_none) {
if (!m_infocenterState->HasRegistered()) {
PlayAction(InfomainScript::c_iic007in_PlayWav);
m_infocenterState->SetUnknown0x74(2);
}
else {
m_infocenterState->SetUnknown0x74(5);
m_destLocation = state->GetPreviousArea();
actionToPlay = (InfomainScript::Script) m_infocenterState
->GetLeaveDialogue(GameState()->GetCurrentAct())
.Next();
m_radio.Stop();
InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE);
}
}
break;
}
break;
}
break;
case LegoGameState::e_act2:
@ -1523,6 +1533,7 @@ void Infocenter::StopCredits()
}
// FUNCTION: LEGO1 0x10071300
// FUNCTION: BETA10 0x1002ee8c
void Infocenter::PlayAction(InfomainScript::Script p_script)
{
MxDSAction action;