diff --git a/LEGO1/lego/legoomni/include/beachhouseentity.h b/LEGO1/lego/legoomni/include/beachhouseentity.h index df8cf288..1c92fc17 100644 --- a/LEGO1/lego/legoomni/include/beachhouseentity.h +++ b/LEGO1/lego/legoomni/include/beachhouseentity.h @@ -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 { diff --git a/LEGO1/lego/legoomni/include/buildingentity.h b/LEGO1/lego/legoomni/include/buildingentity.h index bd136438..0e9a9d45 100644 --- a/LEGO1/lego/legoomni/include/buildingentity.h +++ b/LEGO1/lego/legoomni/include/buildingentity.h @@ -10,6 +10,8 @@ public: 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 { diff --git a/LEGO1/lego/legoomni/include/elevatorbottom.h b/LEGO1/lego/legoomni/include/elevatorbottom.h index 9c5b18e3..ed424efd 100644 --- a/LEGO1/lego/legoomni/include/elevatorbottom.h +++ b/LEGO1/lego/legoomni/include/elevatorbottom.h @@ -26,6 +26,15 @@ public: 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' diff --git a/LEGO1/lego/legoomni/include/infocenterdoor.h b/LEGO1/lego/legoomni/include/infocenterdoor.h index 4bdf2884..effb22cf 100644 --- a/LEGO1/lego/legoomni/include/infocenterdoor.h +++ b/LEGO1/lego/legoomni/include/infocenterdoor.h @@ -25,6 +25,15 @@ public: 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' }; diff --git a/LEGO1/lego/legoomni/include/infocenterstate.h b/LEGO1/lego/legoomni/include/infocenterstate.h index c926b97c..aaa45f56 100644 --- a/LEGO1/lego/legoomni/include/infocenterstate.h +++ b/LEGO1/lego/legoomni/include/infocenterstate.h @@ -24,6 +24,9 @@ public: 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; } diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index dfc51e70..31b60f84 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -36,6 +36,7 @@ public: } 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 diff --git a/LEGO1/lego/legoomni/include/registrationbook.h b/LEGO1/lego/legoomni/include/registrationbook.h index 7c605865..25e4b2d8 100644 --- a/LEGO1/lego/legoomni/include/registrationbook.h +++ b/LEGO1/lego/legoomni/include/registrationbook.h @@ -11,6 +11,7 @@ public: 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 @@ public: 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' }; diff --git a/LEGO1/lego/legoomni/src/build/buildingentity.cpp b/LEGO1/lego/legoomni/src/build/buildingentity.cpp index 37a09f2f..37b0a8d9 100644 --- a/LEGO1/lego/legoomni/src/build/buildingentity.cpp +++ b/LEGO1/lego/legoomni/src/build/buildingentity.cpp @@ -11,3 +11,11 @@ BuildingEntity::~BuildingEntity() { // TODO } + +// STUB: LEGO1 0x100150a0 +MxLong BuildingEntity::Notify(MxParam& p_param) +{ + // TODO + + return 0; +} diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 9611713c..8e5c7465 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -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) { diff --git a/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp index 1dbb8a67..ad199882 100644 --- a/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/elevatorbottom.cpp @@ -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; } diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp index c6d85394..4c50a321 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenterdoor.cpp @@ -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; } diff --git a/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp b/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp index eb7e099a..f68bc29e 100644 --- a/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/registrationbook.cpp @@ -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; +} diff --git a/LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp b/LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp index 66b07f60..f243b92a 100644 --- a/LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp +++ b/LEGO1/lego/legoomni/src/isle/beachhouseentity.cpp @@ -1,9 +1 @@ #include "beachhouseentity.h" - -// STUB: LEGO1 0x100150a0 -MxLong BeachHouseEntity::Notify(MxParam& p_param) -{ - // TODO - - return 0; -}