implement parts of legoworld/infocenter

This commit is contained in:
Misha 2023-12-26 09:14:32 -05:00
parent afd24fbe18
commit 54a3e441e8
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
4 changed files with 67 additions and 7 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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
};