diff --git a/LEGO1/infocenter.cpp b/LEGO1/infocenter.cpp index f062f1e9..82edff12 100644 --- a/LEGO1/infocenter.cpp +++ b/LEGO1/infocenter.cpp @@ -12,6 +12,20 @@ Infocenter::~Infocenter() // TODO } +// STUB: LEGO1 0x10070af0 +MxResult Infocenter::Tickle() +{ + // TODO + + return 0; +} + +// STUB: LEGO1 0x1006ed90 +MxResult Infocenter::Create(MxDSObject& p_dsObject) +{ + return FAILURE; +} + // STUB: LEGO1 0x1006ef10 MxLong Infocenter::Notify(MxParam& p_param) { @@ -20,10 +34,26 @@ MxLong Infocenter::Notify(MxParam& p_param) return 0; } -// STUB: LEGO1 0x10070af0 -MxResult Infocenter::Tickle() +// STUB: LEGO1 0x1006f4e0 +void Infocenter::Stop() +{ + // TODO +} + +// FUNCTION: LEGO1 0x10070d00 +MxBool Infocenter::VTable0x5c() +{ + return TRUE; +} + +// STUB: LEGO1 0x10070f60 +MxBool Infocenter::VTable0x64() +{ + return FALSE; +} + +// STUB: LEGO1 0x10070aa0 +void Infocenter::VTable0x68(MxBool p_add) { // TODO - - return 0; } diff --git a/LEGO1/infocenter.h b/LEGO1/infocenter.h index 3b4e7856..2b6de946 100644 --- a/LEGO1/infocenter.h +++ b/LEGO1/infocenter.h @@ -25,6 +25,12 @@ class Infocenter : public LegoWorld { { return !strcmp(p_name, Infocenter::ClassName()) || LegoWorld::IsA(p_name); } + + virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18 + virtual void Stop() override; // vtable+0x50 + virtual MxBool VTable0x5c() override; // vtable+0x5c + virtual MxBool VTable0x64() override; // vtable+0x64 + virtual void VTable0x68(MxBool p_add) override; // vtable+0x68 }; #endif // INFOCENTER_H diff --git a/LEGO1/legoworld.cpp b/LEGO1/legoworld.cpp index 03139566..3e730071 100644 --- a/LEGO1/legoworld.cpp +++ b/LEGO1/legoworld.cpp @@ -2,7 +2,9 @@ #include "legoinputmanager.h" #include "legoomni.h" +#include "legoutil.h" #include "mxactionnotificationparam.h" +#include "mxnotificationmanager.h" #include "mxnotificationparam.h" #include "mxomni.h" #include "mxticklemanager.h" @@ -13,6 +15,9 @@ DECOMP_SIZE_ASSERT(LegoWorld, 0xf8); LegoWorld::LegoWorld() : m_list0x68(TRUE) { // TODO + m_unk0xf6 = 0; + m_unk0xf4 = 4; + NotificationManager()->Register(this); } // FUNCTION: LEGO1 0x1001d670 @@ -93,10 +98,27 @@ void LegoWorld::VTable0x68(MxBool p_add) // TODO } -// STUB: LEGO1 0x10022080 +// FUNCTION: LEGO1 0x10022080 MxResult LegoWorld::Tickle() { - return SUCCESS; + if (m_unk0xf6 == 0) { + if (m_unk0xf4 == 0) { + m_unk0xf6 = 1; + SetAppCursor(0); + Stop(); + return TRUE; + } + if (m_unk0xf4 != 2 && FUN_100220e0() != 1) { + m_unk0xf4--; + } + } + return TRUE; +} + +// STUB: LEGO1 0x100220e0 +undefined4 LegoWorld::FUN_100220e0() +{ + return TRUE; } // FUNCTION: LEGO1 0x10022340 diff --git a/LEGO1/legoworld.h b/LEGO1/legoworld.h index fadeea5c..8b95fb24 100644 --- a/LEGO1/legoworld.h +++ b/LEGO1/legoworld.h @@ -44,6 +44,7 @@ class LegoWorld : public LegoEntity { inline LegoCameraController* GetCamera() { return m_camera; } + undefined4 LegoWorld::FUN_100220e0(); MxResult SetAsCurrentWorld(MxDSObject& p_dsObject); void EndAction(MxCore* p_object); void FUN_1001fc80(IslePathActor* p_actor); @@ -59,7 +60,8 @@ class LegoWorld : public LegoEntity { LegoCameraController* m_camera; // 0x98 undefined m_unk0x9c[0x1c]; // 0x9c MxPresenterList m_list0xb8; // 0xb8 - undefined m_unk0xd0[0x26]; // 0xd0 + undefined m_unk0xd0[0x24]; // 0xd0 + MxS16 m_unk0xf4; // 0xf4 undefined m_unk0xf6; // 0xf6 undefined m_unk0xf7; // 0xf7 };