Implement InfoCenter folder vtable stubs (#456)

* Implement InfoCenter vtable stubs

* fix build

* Update infocenterdoor.cpp

* Update infocenterdoor.cpp

* Update legoworld.h

* Update elevatorbottom.h

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha 2024-01-18 20:24:15 -05:00 committed by GitHub
parent f1300d9de5
commit 61dd687f53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 169 additions and 14 deletions

View file

@ -7,8 +7,6 @@
// SIZE 0x68
class BeachHouseEntity : public BuildingEntity {
public:
virtual MxLong Notify(MxParam& p_param) override; // vtable+04
// FUNCTION: LEGO1 0x1000ee80
inline virtual const char* ClassName() const override // vtable+0x0c
{

View file

@ -10,6 +10,8 @@ class BuildingEntity : public LegoEntity {
BuildingEntity();
virtual ~BuildingEntity() override; // vtable+0x0
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
// FUNCTION: LEGO1 0x10014f20
inline virtual const char* ClassName() const override // vtable+0x0c
{

View file

@ -26,6 +26,15 @@ class ElevatorBottom : public LegoWorld {
return !strcmp(p_name, ElevatorBottom::ClassName()) || LegoWorld::IsA(p_name);
}
virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual void VTable0x50() override; // vtable+0x50
// FUNCTION: LEGO1 0x10017f10
virtual MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
virtual MxBool VTable0x64() override; // vtable+0x64
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
// SYNTHETIC: LEGO1 0x10018040
// ElevatorBottom::`scalar deleting destructor'

View file

@ -25,6 +25,15 @@ class InfocenterDoor : public LegoWorld {
return !strcmp(p_name, InfocenterDoor::ClassName()) || LegoWorld::IsA(p_name);
}
virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual void VTable0x50() override; // vtable+0x50
// FUNCTION: LEGO1 0x100377a0
virtual MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c
virtual MxBool VTable0x64() override; // vtable+0x64
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
// SYNTHETIC: LEGO1 0x100378d0
// InfocenterDoor::`scalar deleting destructor'
};

View file

@ -24,6 +24,9 @@ class InfocenterState : public LegoState {
return !strcmp(p_name, InfocenterState::ClassName()) || LegoState::IsA(p_name);
}
// FUNCTION: LEGO1 0x10071830
virtual MxBool VTable0x14() override { return FALSE; } // vtable+0x14
inline MxU32 GetInfocenterBufferElement(MxS32 p_index) { return m_buffer[p_index]; }
inline MxU32 GetUnknown0x74() { return m_unk0x74; }

View file

@ -36,6 +36,7 @@ class LegoWorld : public LegoEntity {
}
virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
virtual void VTable0x50(); // vtable+0x50
virtual LegoCameraController* VTable0x54(); // vtable+0x54
virtual void VTable0x58(MxCore* p_object); // vtable+0x58

View file

@ -11,6 +11,7 @@ class RegistrationBook : public LegoWorld {
virtual ~RegistrationBook() override; // vtable+0x0
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x4
virtual MxResult Tickle() override; // vtable+0x8
// FUNCTION: LEGO1 0x10076e10
inline virtual const char* ClassName() const override // vtable+0x0c
@ -25,6 +26,11 @@ class RegistrationBook : public LegoWorld {
return !strcmp(p_name, RegistrationBook::ClassName()) || LegoWorld::IsA(p_name);
}
virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual void VTable0x50() override; // vtable+0x50
virtual MxBool VTable0x64() override; // vtable+0x64
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
// SYNTHETIC: LEGO1 0x10076f30
// RegistrationBook::`scalar deleting destructor'
};

View file

@ -11,3 +11,11 @@ BuildingEntity::~BuildingEntity()
{
// TODO
}
// STUB: LEGO1 0x100150a0
MxLong BuildingEntity::Notify(MxParam& p_param)
{
// TODO
return 0;
}

View file

@ -77,6 +77,12 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction)
return SUCCESS;
}
// STUB: LEGO1 0x1001e9d0
void LegoWorld::Destroy(MxBool p_fromDestructor)
{
// TODO
}
// FUNCTION: LEGO1 0x1001f5e0
MxLong LegoWorld::Notify(MxParam& p_param)
{

View file

@ -3,6 +3,7 @@
DECOMP_SIZE_ASSERT(ElevatorBottom, 0xfc)
#include "legocontrolmanager.h"
#include "legogamestate.h"
#include "legoinputmanager.h"
#include "legoomni.h"
#include "mxnotificationmanager.h"
@ -25,10 +26,58 @@ ElevatorBottom::~ElevatorBottom()
NotificationManager()->Unregister(this);
}
// FUNCTION: LEGO1 0x100180f0
MxResult ElevatorBottom::Create(MxDSAction& p_dsAction)
{
MxResult result = LegoWorld::Create(p_dsAction);
if (result == SUCCESS) {
InputManager()->SetWorld(this);
ControlManager()->Register(this);
}
SetIsWorldActive(FALSE);
GameState()->SetUnknown424(5);
GameState()->FUN_1003a720(0);
return result;
}
// STUB: LEGO1 0x10018150
MxLong ElevatorBottom::Notify(MxParam& p_param)
{
// TODO
return 0;
return LegoWorld::Notify(p_param);
}
// FUNCTION: LEGO1 0x100181b0
void ElevatorBottom::VTable0x50()
{
LegoWorld::VTable0x50();
PlayMusic(11);
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
}
// FUNCTION: LEGO1 0x100182c0
void ElevatorBottom::VTable0x68(MxBool p_add)
{
LegoWorld::VTable0x68(p_add);
if (p_add) {
InputManager()->SetWorld(this);
SetIsWorldActive(FALSE);
}
else {
if (InputManager()->GetWorld() == this) {
InputManager()->ClearWorld();
}
}
}
// FUNCTION: LEGO1 0x10018310
MxBool ElevatorBottom::VTable0x64()
{
DeleteObjects(&m_atom, 500, 999);
m_unk0xf8 = 2;
return TRUE;
}

View file

@ -1,5 +1,8 @@
#include "infocenterdoor.h"
#include "legoinputmanager.h"
#include "legoomni.h"
// STUB: LEGO1 0x10037730
InfocenterDoor::InfocenterDoor()
{
@ -12,10 +15,45 @@ InfocenterDoor::~InfocenterDoor()
// TODO
}
// STUB: LEGO1 0x10037980
MxResult InfocenterDoor::Create(MxDSAction& p_dsAction)
{
return SUCCESS;
}
// STUB: LEGO1 0x100379e0
MxLong InfocenterDoor::Notify(MxParam& p_param)
{
// TODO
return 0;
return LegoWorld::Notify(p_param);
}
// FUNCTION: LEGO1 0x10037a70
void InfocenterDoor::VTable0x50()
{
LegoWorld::VTable0x50();
PlayMusic(11);
FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
}
// FUNCTION: LEGO1 0x10037c80
void InfocenterDoor::VTable0x68(MxBool p_add)
{
LegoWorld::VTable0x68(p_add);
if (p_add) {
InputManager()->SetWorld(this);
SetIsWorldActive(FALSE);
}
else {
if (InputManager()->GetWorld() == this) {
InputManager()->ClearWorld();
}
}
}
// STUB: LEGO1 0x10037cd0
MxBool InfocenterDoor::VTable0x64()
{
return TRUE;
}

View file

@ -1,5 +1,7 @@
#include "registrationbook.h"
#include "legoomni.h"
// STUB: LEGO1 0x10076d20
RegistrationBook::RegistrationBook()
{
@ -12,6 +14,12 @@ RegistrationBook::~RegistrationBook()
// TODO
}
// STUB: LEGO1 0x10077060
MxResult RegistrationBook::Create(MxDSAction& p_dsAction)
{
return SUCCESS;
}
// STUB: LEGO1 0x100770e0
MxLong RegistrationBook::Notify(MxParam& p_param)
{
@ -19,3 +27,29 @@ MxLong RegistrationBook::Notify(MxParam& p_param)
return 0;
}
// STUB: LEGO1 0x10077cc0
void RegistrationBook::VTable0x50()
{
// TODO
}
// STUB: LEGO1 0x10077fd0
MxResult RegistrationBook::Tickle()
{
// TODO
return SUCCESS;
}
// STUB: LEGO1 0x10078180
void RegistrationBook::VTable0x68(MxBool p_add)
{
// TODO
}
// FUNCTION: LEGO1 0x100783e0
MxBool RegistrationBook::VTable0x64()
{
DeleteObjects(&m_atom, 500, 506);
return TRUE;
}

View file

@ -1,9 +1 @@
#include "beachhouseentity.h"
// STUB: LEGO1 0x100150a0
MxLong BeachHouseEntity::Notify(MxParam& p_param)
{
// TODO
return 0;
}