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

Match Hospital::HandleButtonDown ()

This commit is contained in:
Christian Semmler 2025-02-02 09:42:37 -07:00 committed by GitHub
parent bc0344a8c4
commit 82453f62d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -392,21 +392,20 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
}
// FUNCTION: LEGO1 0x10075710
// FUNCTION: BETA10 0x1002d2b1
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
{
if (m_unk0x100 == 1) {
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
if (roi != NULL) {
LegoChar* roiName = (LegoChar*) roi->GetName();
const LegoChar* roiName = roi->GetName();
if (roiName[0] == '*') {
roiName += 1;
}
if (!strcmpi("actor_ha", roiName)) {
LegoInputManager* inputManager = InputManager();
inputManager->SetUnknown88(TRUE);
inputManager->SetUnknown336(FALSE);
InputManager()->DisableInputProcessing();
m_unk0x100 = 3;
@ -418,7 +417,9 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
m_hospitalState->m_unk0x08 = 9;
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
act1State->SetUnknown18(9);
assert(act1State);
act1State->m_unk0x018 = 9;
m_destLocation = LegoGameState::e_unk31;
DeleteObjects(
@ -480,25 +481,6 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
break;
}
break;
case LegoActor::c_papa:
switch (m_hospitalState->m_unk0x12) {
case 0:
case 1:
m_hospitalState->m_unk0x08 = 12;
PlayAction(HospitalScript::c_hho023cl_RunAnim);
m_currentAction = HospitalScript::c_hho023cl_RunAnim;
m_unk0x108 = 1;
break;
default:
m_hospitalState->m_unk0x08 = 12;
PlayAction(HospitalScript::c_hho024cl_RunAnim);
m_currentAction = HospitalScript::c_hho024cl_RunAnim;
m_unk0x108 = 1;
break;
}
break;
case LegoActor::c_nick:
switch (m_hospitalState->m_unk0x14) {
case 0:
@ -518,6 +500,25 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
break;
}
break;
case LegoActor::c_papa:
switch (m_hospitalState->m_unk0x12) {
case 0:
case 1:
m_hospitalState->m_unk0x08 = 12;
PlayAction(HospitalScript::c_hho023cl_RunAnim);
m_currentAction = HospitalScript::c_hho023cl_RunAnim;
m_unk0x108 = 1;
break;
default:
m_hospitalState->m_unk0x08 = 12;
PlayAction(HospitalScript::c_hho024cl_RunAnim);
m_currentAction = HospitalScript::c_hho024cl_RunAnim;
m_unk0x108 = 1;
break;
}
break;
case LegoActor::c_laura:
switch (m_hospitalState->m_unk0x16) {
case 0:
@ -543,14 +544,8 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
return 1;
}
else {
return 0;
}
}
}
else {
return 0;
}
return 0;
}