Implement/match Ambulance::Notify (#998)

This commit is contained in:
Christian Semmler
2024-06-06 12:19:43 -04:00
committed by GitHub
parent 9a9bccda0e
commit ca17928fc6
20 changed files with 131 additions and 86 deletions

View File

@@ -16,18 +16,19 @@ DECOMP_SIZE_ASSERT(Ambulance, 0x184)
DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24)
// FUNCTION: LEGO1 0x10035ee0
// FUNCTION: BETA10 0x10022820
Ambulance::Ambulance()
{
m_maxLinearVel = 40.0;
m_state = NULL;
m_unk0x168 = 0;
m_unk0x16a = -1;
m_state = NULL;
m_unk0x16c = 0;
m_unk0x174 = -1;
m_unk0x16e = 0;
m_unk0x178 = -1;
m_unk0x170 = 0;
m_unk0x174 = -1;
m_unk0x172 = 0;
m_maxLinearVel = 40.0;
m_unk0x178 = -1;
m_unk0x17c = 1.0;
}
@@ -37,6 +38,7 @@ void Ambulance::Destroy(MxBool p_fromDestructor)
}
// FUNCTION: LEGO1 0x10036150
// FUNCTION: BETA10 0x100228fe
Ambulance::~Ambulance()
{
ControlManager()->Unregister(this);
@@ -44,6 +46,7 @@ Ambulance::~Ambulance()
}
// FUNCTION: LEGO1 0x100361d0
// FUNCTION: BETA10 0x10022993
MxResult Ambulance::Create(MxDSAction& p_dsAction)
{
MxResult result = IslePathActor::Create(p_dsAction);
@@ -76,6 +79,7 @@ void Ambulance::VTable0x70(float p_float)
}
// FUNCTION: LEGO1 0x100363f0
// FUNCTION: BETA10 0x10022b2a
void Ambulance::CreateState()
{
LegoGameState* gameState = GameState();
@@ -88,22 +92,59 @@ void Ambulance::CreateState()
m_state = state;
}
// STUB: LEGO1 0x10036420
// FUNCTION: LEGO1 0x10036420
// FUNCTION: BETA10 0x10022b84
MxLong Ambulance::Notify(MxParam& p_param)
{
MxLong result = 0;
switch (((MxNotificationParam&) p_param).GetType()) {
case c_notificationType0:
result = HandleNotification0();
break;
case c_notificationEndAction:
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
break;
case c_notificationButtonDown:
result = HandleButtonDown((LegoControlManagerEvent&) p_param);
break;
case c_notificationClick:
result = HandleClick();
break;
case c_notificationControl:
result = HandleControl((LegoControlManagerEvent&) p_param);
break;
case c_notificationType19:
result = HandleNotification19((MxType19NotificationParam&) p_param);
break;
}
return result;
}
// STUB: LEGO1 0x100364d0
MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x100367c0
MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10036860
MxU32 Ambulance::VTable0xdc(MxType19NotificationParam& p_param)
MxLong Ambulance::HandleNotification19(MxType19NotificationParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x10036ce0
MxU32 Ambulance::HandleClick()
MxLong Ambulance::HandleClick()
{
// TODO
return 0;
@@ -122,7 +163,7 @@ void Ambulance::Exit()
}
// STUB: LEGO1 0x10036f90
MxU32 Ambulance::HandleControl(LegoControlManagerEvent& p_param)
MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param)
{
// TODO
return 0;