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: LEGO1 0x10021790
// FUNCTION: BETA10 0x100db3de
MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId) MxCore* LegoWorld::Find(const MxAtomId& p_atom, MxS32 p_entityId)
{ {
LegoEntityListCursor entityCursor(m_entityList); LegoEntityListCursor entityCursor(m_entityList);

View File

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

View File

@ -1050,6 +1050,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
case InfomainScript::c_BigInfo_Ctl: case InfomainScript::c_BigInfo_Ctl:
switch (state->GetCurrentAct()) { switch (state->GetCurrentAct()) {
case LegoGameState::e_act1: case LegoGameState::e_act1:
if (state->GetPreviousArea()) {
switch (state->GetPreviousArea()) { switch (state->GetPreviousArea()) {
case LegoGameState::e_infodoor: case LegoGameState::e_infodoor:
case LegoGameState::e_regbook: case LegoGameState::e_regbook:
@ -1063,9 +1064,21 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
InputManager()->DisableInputProcessing(); InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE); InputManager()->SetUnknown336(TRUE);
break; break;
case LegoGameState::e_unk4: 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 (state->GetActorId() != LegoActor::c_none) {
if (m_infocenterState->HasRegistered()) { if (!m_infocenterState->HasRegistered()) {
PlayAction(InfomainScript::c_iic007in_PlayWav);
m_infocenterState->SetUnknown0x74(2);
}
else {
m_infocenterState->SetUnknown0x74(5); m_infocenterState->SetUnknown0x74(5);
m_destLocation = state->GetPreviousArea(); m_destLocation = state->GetPreviousArea();
actionToPlay = (InfomainScript::Script) m_infocenterState actionToPlay = (InfomainScript::Script) m_infocenterState
@ -1075,13 +1088,10 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
InputManager()->DisableInputProcessing(); InputManager()->DisableInputProcessing();
InputManager()->SetUnknown336(TRUE); InputManager()->SetUnknown336(TRUE);
} }
else {
PlayAction(InfomainScript::c_iic007in_PlayWav);
m_infocenterState->SetUnknown0x74(2);
}
} }
break; break;
} }
}
break; break;
case LegoGameState::e_act2: case LegoGameState::e_act2:
m_infocenterState->SetUnknown0x74(5); m_infocenterState->SetUnknown0x74(5);
@ -1523,6 +1533,7 @@ void Infocenter::StopCredits()
} }
// FUNCTION: LEGO1 0x10071300 // FUNCTION: LEGO1 0x10071300
// FUNCTION: BETA10 0x1002ee8c
void Infocenter::PlayAction(InfomainScript::Script p_script) void Infocenter::PlayAction(InfomainScript::Script p_script)
{ {
MxDSAction action; MxDSAction action;