mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
implement Hospital::Notify(), Enable(), VTable0x64() (#670)
* implement Hospital::Notify(), Enable(), VTable0x64() * function order * Fix HandleClick --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include "hospitalstate.h"
|
#include "hospitalstate.h"
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
#include "legoworld.h"
|
#include "legoworld.h"
|
||||||
|
#include "radio.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d9730
|
// VTABLE: LEGO1 0x100d9730
|
||||||
// SIZE 0x12c
|
// SIZE 0x12c
|
||||||
@@ -39,6 +40,11 @@ public:
|
|||||||
// Hospital::`scalar deleting destructor'
|
// Hospital::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
MxLong HandleKeyPress(MxS8 p_key);
|
||||||
|
MxLong HandleEndAction(MxEndActionNotificationParam& p_param);
|
||||||
|
MxLong HandleButtonDown(LegoControlManagerEvent& p_param);
|
||||||
|
MxBool HandleClick(LegoControlManagerEvent& p_param);
|
||||||
|
|
||||||
undefined2 m_unk0xf8; // 0xf8
|
undefined2 m_unk0xf8; // 0xf8
|
||||||
LegoGameState::Area m_destLocation; // 0xfc
|
LegoGameState::Area m_destLocation; // 0xfc
|
||||||
undefined2 m_unk0x100; // 0x100
|
undefined2 m_unk0x100; // 0x100
|
||||||
|
@@ -86,12 +86,35 @@ MxResult Hospital::Create(MxDSAction& p_dsAction)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10074990
|
// FUNCTION: LEGO1 0x10074990
|
||||||
MxLong Hospital::Notify(MxParam& p_param)
|
MxLong Hospital::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
// TODO
|
MxResult result = SUCCESS;
|
||||||
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
return 0;
|
if (m_worldStarted) {
|
||||||
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
|
case c_notificationEndAction:
|
||||||
|
result = HandleEndAction((MxEndActionNotificationParam&) p_param);
|
||||||
|
break;
|
||||||
|
case c_notificationKeyPress:
|
||||||
|
result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey());
|
||||||
|
break;
|
||||||
|
case c_notificationButtonDown:
|
||||||
|
result = HandleButtonDown(((LegoControlManagerEvent&) p_param));
|
||||||
|
break;
|
||||||
|
case c_notificationClick:
|
||||||
|
result = HandleClick((LegoControlManagerEvent&) p_param);
|
||||||
|
break;
|
||||||
|
case c_notificationTransitioned:
|
||||||
|
if (m_destLocation != LegoGameState::e_undefined) {
|
||||||
|
GameState()->SwitchArea(m_destLocation);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10074a60
|
// STUB: LEGO1 0x10074a60
|
||||||
@@ -100,10 +123,48 @@ void Hospital::ReadyWorld()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10076220
|
// STUB: LEGO1 0x10074dd0
|
||||||
void Hospital::Enable(MxBool p_enable)
|
MxLong Hospital::HandleKeyPress(MxS8 p_key)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10074e00
|
||||||
|
MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10075710
|
||||||
|
MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10075f90
|
||||||
|
MxBool Hospital::HandleClick(LegoControlManagerEvent& p_param)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10076220
|
||||||
|
void Hospital::Enable(MxBool p_enable)
|
||||||
|
{
|
||||||
|
LegoWorld::Enable(p_enable);
|
||||||
|
|
||||||
|
if (p_enable) {
|
||||||
|
InputManager()->SetWorld(this);
|
||||||
|
SetIsWorldActive(FALSE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (InputManager()->GetWorld() == this) {
|
||||||
|
InputManager()->ClearWorld();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10076270
|
// STUB: LEGO1 0x10076270
|
||||||
@@ -113,9 +174,13 @@ MxResult Hospital::Tickle()
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10076330
|
// FUNCTION: LEGO1 0x10076330
|
||||||
MxBool Hospital::VTable0x64()
|
MxBool Hospital::VTable0x64()
|
||||||
{
|
{
|
||||||
// TODO
|
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, 999);
|
||||||
return FALSE;
|
m_hospitalState->m_unk0x08.m_unk0x00 = 0;
|
||||||
|
|
||||||
|
m_destLocation = LegoGameState::e_infomain;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user