implement Hospital::HandleClick() (#708)

* implement Hospital::HandleClick()

* style

* style
This commit is contained in:
Ramen2X 2024-03-21 13:27:51 -04:00 committed by GitHub
parent 9256554406
commit 8cffa7cf8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -398,11 +398,57 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
return 0; return 0;
} }
// STUB: LEGO1 0x10075f90 // FUNCTION: LEGO1 0x10075f90
MxBool Hospital::HandleClick(LegoControlManagerEvent& p_param) MxBool Hospital::HandleClick(LegoControlManagerEvent& p_param)
{ {
// TODO if (p_param.GetUnknown0x28() == 1) {
return 0; switch (p_param.GetClickedObjectId()) {
case HospitalScript::c_Info_Ctl:
BackgroundAudioManager()->RaiseVolume();
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
if (m_unk0x100 == 1) {
m_hospitalState->m_unk0x08.m_unk0x00 = 14;
PlayAction(HospitalScript::c_hho016cl_RunAnim);
m_unk0x10c = HospitalScript::c_hho016cl_RunAnim;
m_unk0x108 = 1;
}
else if (m_unk0x128 == 0) {
m_unk0x128 = 1;
m_hospitalState->m_unk0x08.m_unk0x00 = 13;
m_destLocation = LegoGameState::e_infomain;
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
}
break;
case HospitalScript::c_Door_Ctl:
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
if (m_unk0x100 == 1) {
m_hospitalState->m_unk0x08.m_unk0x00 = 15;
PlayAction(HospitalScript::c_hho016cl_RunAnim);
m_unk0x10c = HospitalScript::c_hho016cl_RunAnim;
m_unk0x108 = 1;
}
else if (m_unk0x128 == 0) {
m_unk0x128 = 1;
m_hospitalState->m_unk0x08.m_unk0x00 = 13;
m_destLocation = LegoGameState::e_unk31;
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, HospitalScript::c_hho006cl_RunAnim);
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
}
break;
}
}
return TRUE;
} }
// FUNCTION: LEGO1 0x10076220 // FUNCTION: LEGO1 0x10076220