2023-06-29 04:10:08 -04:00
|
|
|
#include "hospital.h"
|
|
|
|
|
2024-03-13 11:45:27 -04:00
|
|
|
#include "legocontrolmanager.h"
|
|
|
|
#include "legoinputmanager.h"
|
|
|
|
#include "legoutils.h"
|
|
|
|
#include "misc.h"
|
2024-03-09 15:07:52 -05:00
|
|
|
#include "mxmisc.h"
|
2024-01-01 22:30:50 -05:00
|
|
|
#include "mxnotificationmanager.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(Hospital, 0x12c)
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x100745e0
|
2023-06-29 04:10:08 -04:00
|
|
|
Hospital::Hospital()
|
|
|
|
{
|
2024-03-13 11:45:27 -04:00
|
|
|
m_unk0xf8 = 0;
|
|
|
|
m_unk0x100 = 0;
|
|
|
|
m_hospitalState = NULL;
|
|
|
|
m_unk0x108 = 0;
|
2024-03-13 13:17:20 -04:00
|
|
|
m_destLocation = LegoGameState::e_undefined;
|
2024-03-13 11:45:27 -04:00
|
|
|
m_unk0x10c = 0;
|
|
|
|
m_unk0x110 = 0;
|
|
|
|
m_unk0x114 = 0;
|
|
|
|
m_unk0x118 = 0;
|
|
|
|
m_unk0x11c = 0;
|
|
|
|
m_unk0x120 = 0;
|
|
|
|
m_unk0x128 = 0;
|
2024-01-01 22:30:50 -05:00
|
|
|
NotificationManager()->Register(this);
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2024-02-07 06:13:20 -05:00
|
|
|
// FUNCTION: LEGO1 0x100746a0
|
2024-01-20 18:04:46 -05:00
|
|
|
MxBool Hospital::VTable0x5c()
|
|
|
|
{
|
2024-02-07 06:13:20 -05:00
|
|
|
return TRUE;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// STUB: LEGO1 0x100747f0
|
2023-06-29 04:10:08 -04:00
|
|
|
Hospital::~Hospital()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2024-03-13 11:45:27 -04:00
|
|
|
// FUNCTION: LEGO1 0x100748c0
|
2024-01-20 18:04:46 -05:00
|
|
|
MxResult Hospital::Create(MxDSAction& p_dsAction)
|
|
|
|
{
|
2024-03-13 11:45:27 -04:00
|
|
|
MxResult result = LegoWorld::Create(p_dsAction);
|
|
|
|
if (result == SUCCESS) {
|
|
|
|
InputManager()->SetWorld(this);
|
|
|
|
ControlManager()->Register(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
SetIsWorldActive(FALSE);
|
|
|
|
|
|
|
|
m_hospitalState = (HospitalState*) GameState()->GetState("HospitalState");
|
|
|
|
if (!m_hospitalState) {
|
|
|
|
m_hospitalState = (HospitalState*) GameState()->CreateState("HospitalState");
|
|
|
|
m_hospitalState->m_unk0x08.m_unk0x00 = 1;
|
|
|
|
}
|
|
|
|
else if (m_hospitalState->m_unk0x08.m_unk0x00 == 4) {
|
|
|
|
m_hospitalState->m_unk0x08.m_unk0x00 = 4;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
m_hospitalState->m_unk0x08.m_unk0x00 = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
GameState()->SetCurrentArea(LegoGameState::e_hospital);
|
|
|
|
GameState()->StopArea(LegoGameState::e_previousArea);
|
|
|
|
|
|
|
|
InputManager()->Register(this);
|
|
|
|
FUN_1003ef00(FALSE);
|
|
|
|
|
|
|
|
return result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// STUB: LEGO1 0x10074990
|
2023-12-13 05:48:14 -05:00
|
|
|
MxLong Hospital::Notify(MxParam& p_param)
|
2023-06-29 04:10:08 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
// TODO
|
2023-06-29 04:10:08 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
return 0;
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
|
|
|
|
// STUB: LEGO1 0x10074a60
|
2024-01-27 15:18:35 -05:00
|
|
|
void Hospital::ReadyWorld()
|
2024-01-20 18:04:46 -05:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10076220
|
2024-02-02 12:18:46 -05:00
|
|
|
void Hospital::Enable(MxBool p_enable)
|
2024-01-20 18:04:46 -05:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10076270
|
|
|
|
MxResult Hospital::Tickle()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x10076330
|
|
|
|
MxBool Hospital::VTable0x64()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return FALSE;
|
|
|
|
}
|