2023-06-29 04:10:08 -04:00
|
|
|
#include "ambulance.h"
|
|
|
|
|
2024-05-03 12:19:12 -04:00
|
|
|
#include "ambulancemissionstate.h"
|
2023-09-10 08:01:39 -04:00
|
|
|
#include "decomp.h"
|
2024-03-24 17:28:44 -04:00
|
|
|
#include "legocontrolmanager.h"
|
|
|
|
#include "legogamestate.h"
|
|
|
|
#include "legovariables.h"
|
2024-05-03 12:19:12 -04:00
|
|
|
#include "legoworld.h"
|
2024-03-24 17:28:44 -04:00
|
|
|
#include "misc.h"
|
|
|
|
#include "mxmisc.h"
|
|
|
|
#include "mxticklemanager.h"
|
|
|
|
#include "mxtimer.h"
|
2024-05-03 12:19:12 -04:00
|
|
|
#include "mxvariabletable.h"
|
2024-05-04 08:06:32 -04:00
|
|
|
#include "scripts.h"
|
2023-09-10 08:01:39 -04:00
|
|
|
|
2024-03-22 21:30:58 -04:00
|
|
|
DECOMP_SIZE_ASSERT(Ambulance, 0x184)
|
2023-09-10 08:01:39 -04:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x10035ee0
|
2023-06-29 04:10:08 -04:00
|
|
|
Ambulance::Ambulance()
|
|
|
|
{
|
2024-05-24 14:07:36 -04:00
|
|
|
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_unk0x172 = 0;
|
|
|
|
m_unk0x13c = 40.0;
|
|
|
|
m_unk0x17c = 1.0;
|
2023-10-25 14:51:59 -04:00
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
|
2024-03-24 17:28:44 -04:00
|
|
|
// FUNCTION: LEGO1 0x10035f90
|
2024-01-20 18:04:46 -05:00
|
|
|
void Ambulance::Destroy(MxBool p_fromDestructor)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-03-24 17:28:44 -04:00
|
|
|
// FUNCTION: LEGO1 0x10036150
|
|
|
|
Ambulance::~Ambulance()
|
|
|
|
{
|
|
|
|
ControlManager()->Unregister(this);
|
|
|
|
TickleManager()->UnregisterClient(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x100361d0
|
2024-01-20 18:04:46 -05:00
|
|
|
MxResult Ambulance::Create(MxDSAction& p_dsAction)
|
|
|
|
{
|
2024-03-24 17:28:44 -04:00
|
|
|
MxResult result = IslePathActor::Create(p_dsAction);
|
|
|
|
|
|
|
|
if (result == SUCCESS) {
|
|
|
|
m_world = CurrentWorld();
|
|
|
|
|
|
|
|
if (m_world) {
|
|
|
|
m_world->Add(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
m_state = (AmbulanceMissionState*) GameState()->GetState("AmbulanceMissionState");
|
|
|
|
if (!m_state) {
|
|
|
|
m_state = new AmbulanceMissionState();
|
|
|
|
m_state->SetUnknown0x08(0);
|
|
|
|
GameState()->RegisterState(m_state);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
VariableTable()->SetVariable(g_varAMBULFUEL, "1.0");
|
|
|
|
m_unk0x17c = 1.0;
|
|
|
|
m_time = Timer()->GetTime();
|
|
|
|
return result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10036300
|
|
|
|
void Ambulance::VTable0x70(float p_float)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2024-05-24 14:07:36 -04:00
|
|
|
// FUNCTION: LEGO1 0x100363f0
|
|
|
|
void Ambulance::CreateState()
|
|
|
|
{
|
|
|
|
LegoGameState* gameState = GameState();
|
|
|
|
AmbulanceMissionState* state = (AmbulanceMissionState*) gameState->GetState("AmbulanceMissionState");
|
|
|
|
|
|
|
|
if (state == NULL) {
|
|
|
|
state = (AmbulanceMissionState*) gameState->CreateState("AmbulanceMissionState");
|
|
|
|
}
|
|
|
|
|
|
|
|
m_state = state;
|
|
|
|
}
|
|
|
|
|
2024-01-20 18:04:46 -05:00
|
|
|
// STUB: LEGO1 0x10036420
|
|
|
|
MxLong Ambulance::Notify(MxParam& p_param)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10036860
|
|
|
|
MxU32 Ambulance::VTable0xdc(MxType19NotificationParam& p_param)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10036ce0
|
|
|
|
MxU32 Ambulance::VTable0xcc()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-16 14:20:44 -04:00
|
|
|
// STUB: LEGO1 0x10036e60
|
|
|
|
void Ambulance::FUN_10036e60()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2024-01-20 18:04:46 -05:00
|
|
|
// STUB: LEGO1 0x10036e90
|
|
|
|
void Ambulance::VTable0xe4()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10036f90
|
2024-01-28 16:09:33 -05:00
|
|
|
MxU32 Ambulance::VTable0xd4(LegoControlManagerEvent& p_param)
|
2024-01-20 18:04:46 -05:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-03-17 13:01:47 -04:00
|
|
|
// STUB: LEGO1 0x10037060
|
|
|
|
void Ambulance::FUN_10037060()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2024-01-20 18:04:46 -05:00
|
|
|
// STUB: LEGO1 0x10037160
|
|
|
|
MxResult Ambulance::Tickle()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return SUCCESS;
|
|
|
|
}
|