mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
implement/match Hospital::Tickle() (#677)
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 "mxstillpresenter.h"
|
||||||
#include "radio.h"
|
#include "radio.h"
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100d9730
|
// VTABLE: LEGO1 0x100d9730
|
||||||
@@ -51,11 +52,11 @@ private:
|
|||||||
HospitalState* m_hospitalState; // 0x104
|
HospitalState* m_hospitalState; // 0x104
|
||||||
undefined2 m_unk0x108; // 0x108
|
undefined2 m_unk0x108; // 0x108
|
||||||
undefined4 m_unk0x10c; // 0x10c
|
undefined4 m_unk0x10c; // 0x10c
|
||||||
undefined4 m_unk0x110; // 0x110
|
MxStillPresenter* m_unk0x110; // 0x110
|
||||||
undefined4 m_unk0x114; // 0x114
|
MxStillPresenter* m_unk0x114; // 0x114
|
||||||
undefined m_unk0x118; // 0x118
|
undefined m_unk0x118; // 0x118
|
||||||
undefined4 m_unk0x11c; // 0x11c
|
MxLong m_unk0x11c; // 0x11c
|
||||||
undefined4 m_unk0x120; // 0x120
|
MxLong m_unk0x120; // 0x120
|
||||||
undefined m_unk0x124[4]; // 0x124
|
undefined m_unk0x124[4]; // 0x124
|
||||||
undefined m_unk0x128; // 0x128
|
undefined m_unk0x128; // 0x128
|
||||||
};
|
};
|
||||||
|
@@ -7,12 +7,19 @@
|
|||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxticklemanager.h"
|
#include "mxticklemanager.h"
|
||||||
|
#include "mxtimer.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(Hospital, 0x12c)
|
DECOMP_SIZE_ASSERT(Hospital, 0x12c)
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100f7918
|
// GLOBAL: LEGO1 0x100f7918
|
||||||
undefined4 g_unk0x100f7918 = 3;
|
undefined4 g_unk0x100f7918 = 3;
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x100f791c
|
||||||
|
undefined g_unk0x100f791c = 0;
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x100f7920
|
||||||
|
undefined g_unk0x100f7920 = 0;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100745e0
|
// FUNCTION: LEGO1 0x100745e0
|
||||||
Hospital::Hospital()
|
Hospital::Hospital()
|
||||||
{
|
{
|
||||||
@@ -167,10 +174,34 @@ void Hospital::Enable(MxBool p_enable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10076270
|
// FUNCTION: LEGO1 0x10076270
|
||||||
MxResult Hospital::Tickle()
|
MxResult Hospital::Tickle()
|
||||||
{
|
{
|
||||||
// TODO
|
if (!m_worldStarted) {
|
||||||
|
LegoWorld::Tickle();
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_unk0x100f7918 != 0) {
|
||||||
|
g_unk0x100f7918 -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
MxLong time = Timer()->GetTime();
|
||||||
|
|
||||||
|
if (m_unk0x118 != 0) {
|
||||||
|
if (time - m_unk0x11c > 300) {
|
||||||
|
m_unk0x11c = time;
|
||||||
|
g_unk0x100f791c = !g_unk0x100f791c;
|
||||||
|
m_unk0x110->Enable(g_unk0x100f791c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (time - m_unk0x120 > 200) {
|
||||||
|
m_unk0x120 = time;
|
||||||
|
g_unk0x100f7920 = !g_unk0x100f7920;
|
||||||
|
m_unk0x114->Enable(g_unk0x100f7920);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user