Infocenter vtable (#387)

* implement parts of legoworld/infocenter

* Update infocenter.cpp

* Update infocenter.cpp

* Update infocenter.cpp

* Update infocenter.cpp

* Update infocenter.cpp

* Match LegoWorld::Tickle

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha 2023-12-29 13:04:18 -05:00 committed by GitHub
parent 343715af23
commit ceb5339369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 67 additions and 6 deletions

View File

@ -12,18 +12,46 @@ Infocenter::~Infocenter()
// TODO
}
// STUB: LEGO1 0x1006ed90
MxResult Infocenter::Create(MxDSObject& p_dsObject)
{
return FAILURE;
}
// STUB: LEGO1 0x1006ef10
MxLong Infocenter::Notify(MxParam& p_param)
{
// TODO
return 0;
}
// STUB: LEGO1 0x1006f4e0
void Infocenter::Stop()
{
// TODO
}
// STUB: LEGO1 0x10070aa0
void Infocenter::VTable0x68(MxBool p_add)
{
// TODO
}
// STUB: LEGO1 0x10070af0
MxResult Infocenter::Tickle()
{
// TODO
return 0;
}
// FUNCTION: LEGO1 0x10070d00
MxBool Infocenter::VTable0x5c()
{
return TRUE;
}
// STUB: LEGO1 0x10070f60
MxBool Infocenter::VTable0x64()
{
return FALSE;
}

View File

@ -25,6 +25,12 @@ public:
{
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 = FALSE;
m_unk0xf4 = 4;
NotificationManager()->Register(this);
}
// FUNCTION: LEGO1 0x1001d670
@ -93,10 +98,30 @@ void LegoWorld::VTable0x68(MxBool p_add)
// TODO
}
// STUB: LEGO1 0x10022080
// FUNCTION: LEGO1 0x10022080
MxResult LegoWorld::Tickle()
{
return SUCCESS;
if (!m_unk0xf6) {
switch (m_unk0xf4) {
case 0:
m_unk0xf6 = TRUE;
SetAppCursor(0);
Stop();
return TRUE;
case 2:
if (FUN_100220e0() == 1)
break;
default:
m_unk0xf4--;
}
}
return TRUE;
}
// STUB: LEGO1 0x100220e0
undefined LegoWorld::FUN_100220e0()
{
return TRUE;
}
// FUNCTION: LEGO1 0x10022340

View File

@ -44,6 +44,7 @@ public:
inline LegoCameraController* GetCamera() { return m_camera; }
undefined FUN_100220e0();
MxResult SetAsCurrentWorld(MxDSObject& p_dsObject);
void EndAction(MxCore* p_object);
void FUN_1001fc80(IslePathActor* p_actor);
@ -59,8 +60,9 @@ protected:
LegoCameraController* m_camera; // 0x98
undefined m_unk0x9c[0x1c]; // 0x9c
MxPresenterList m_list0xb8; // 0xb8
undefined m_unk0xd0[0x26]; // 0xd0
undefined m_unk0xf6; // 0xf6
undefined m_unk0xd0[0x24]; // 0xd0
MxS16 m_unk0xf4; // 0xf4
MxBool m_unk0xf6; // 0xf6
undefined m_unk0xf7; // 0xf7
};