mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Implement/match Ambulance::HandleClick
This commit is contained in:
parent
5311951bc7
commit
6439f46eea
@ -49,7 +49,7 @@ class AmbulanceMissionState : public LegoState {
|
|||||||
// AmbulanceMissionState::`scalar deleting destructor'
|
// AmbulanceMissionState::`scalar deleting destructor'
|
||||||
|
|
||||||
undefined4 m_unk0x08; // 0x08
|
undefined4 m_unk0x08; // 0x08
|
||||||
undefined4 m_unk0x0c; // 0x0c
|
MxLong m_unk0x0c; // 0x0c
|
||||||
MxU16 m_unk0x10; // 0x10
|
MxU16 m_unk0x10; // 0x10
|
||||||
MxU16 m_unk0x12; // 0x12
|
MxU16 m_unk0x12; // 0x12
|
||||||
MxU16 m_unk0x14; // 0x14
|
MxU16 m_unk0x14; // 0x14
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#include "ambulance.h"
|
#include "ambulance.h"
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "isle.h"
|
||||||
#include "isle_actions.h"
|
#include "isle_actions.h"
|
||||||
#include "legoanimationmanager.h"
|
#include "legoanimationmanager.h"
|
||||||
#include "legocontrolmanager.h"
|
#include "legocontrolmanager.h"
|
||||||
@ -14,6 +15,7 @@
|
|||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
#include "mxtimer.h"
|
#include "mxtimer.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
#include "mxvariabletable.h"
|
#include "mxvariabletable.h"
|
||||||
#include "scripts.h"
|
#include "scripts.h"
|
||||||
|
|
||||||
@ -103,6 +105,10 @@ MxLong Ambulance::Notify(MxParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
|
|
||||||
|
char asd[123];
|
||||||
|
sprintf(asd, "%d\n", ((MxNotificationParam&) p_param).GetType());
|
||||||
|
OutputDebugString(asd);
|
||||||
|
|
||||||
switch (((MxNotificationParam&) p_param).GetType()) {
|
switch (((MxNotificationParam&) p_param).GetType()) {
|
||||||
case c_notificationType0:
|
case c_notificationType0:
|
||||||
result = HandleNotification0();
|
result = HandleNotification0();
|
||||||
@ -227,11 +233,40 @@ MxLong Ambulance::HandleNotification19(MxType19NotificationParam& p_param)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10036ce0
|
// FUNCTION: LEGO1 0x10036ce0
|
||||||
|
// FUNCTION: BETA10 0x10023506
|
||||||
MxLong Ambulance::HandleClick()
|
MxLong Ambulance::HandleClick()
|
||||||
{
|
{
|
||||||
// TODO
|
if (((Act1State*) GameState()->GetState("Act1State"))->m_unk0x018 != 10) {
|
||||||
return 0;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_state->m_unk0x08 == 2) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
FUN_10015820(TRUE, 0);
|
||||||
|
((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_ambulance);
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
|
||||||
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
|
((IslePathActor*) CurrentActor())->Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_time = Timer()->GetTime();
|
||||||
|
m_unk0x16a = CurrentActor()->GetActorId();
|
||||||
|
|
||||||
|
Enter();
|
||||||
|
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_AmbulanceDashboard, NULL);
|
||||||
|
ControlManager()->Register(this);
|
||||||
|
|
||||||
|
if (m_state->m_unk0x08 == 1) {
|
||||||
|
SpawnPlayer(LegoGameState::e_unk31, TRUE, 0);
|
||||||
|
m_state->m_unk0x0c = Timer()->GetTime();
|
||||||
|
InvokeAction(Extra::e_start, *g_isleScript, IsleScript::c_pns018rd_RunAnim, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10036e60
|
// STUB: LEGO1 0x10036e60
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user