mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-24 04:26:55 -04:00
Match Hospital::HandleButtonDown
(#1381)
This commit is contained in:
parent
bc0344a8c4
commit
82453f62d8
@ -392,21 +392,20 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10075710
|
// FUNCTION: LEGO1 0x10075710
|
||||||
|
// FUNCTION: BETA10 0x1002d2b1
|
||||||
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
||||||
{
|
{
|
||||||
if (m_unk0x100 == 1) {
|
if (m_unk0x100 == 1) {
|
||||||
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY());
|
||||||
if (roi != NULL) {
|
if (roi != NULL) {
|
||||||
LegoChar* roiName = (LegoChar*) roi->GetName();
|
const LegoChar* roiName = roi->GetName();
|
||||||
|
|
||||||
if (roiName[0] == '*') {
|
if (roiName[0] == '*') {
|
||||||
roiName += 1;
|
roiName += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmpi("actor_ha", roiName)) {
|
if (!strcmpi("actor_ha", roiName)) {
|
||||||
LegoInputManager* inputManager = InputManager();
|
InputManager()->DisableInputProcessing();
|
||||||
inputManager->SetUnknown88(TRUE);
|
|
||||||
inputManager->SetUnknown336(FALSE);
|
|
||||||
|
|
||||||
m_unk0x100 = 3;
|
m_unk0x100 = 3;
|
||||||
|
|
||||||
@ -418,7 +417,9 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||||||
|
|
||||||
m_hospitalState->m_unk0x08 = 9;
|
m_hospitalState->m_unk0x08 = 9;
|
||||||
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
|
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
|
||||||
act1State->SetUnknown18(9);
|
assert(act1State);
|
||||||
|
|
||||||
|
act1State->m_unk0x018 = 9;
|
||||||
|
|
||||||
m_destLocation = LegoGameState::e_unk31;
|
m_destLocation = LegoGameState::e_unk31;
|
||||||
DeleteObjects(
|
DeleteObjects(
|
||||||
@ -480,25 +481,6 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
case LegoActor::c_nick:
|
||||||
switch (m_hospitalState->m_unk0x14) {
|
switch (m_hospitalState->m_unk0x14) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -518,6 +500,25 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
case LegoActor::c_laura:
|
||||||
switch (m_hospitalState->m_unk0x16) {
|
switch (m_hospitalState->m_unk0x16) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -543,14 +544,8 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user