Implement LegoWorldPresenter::~LegoWorldPresenter

This commit is contained in:
Misha 2024-01-12 16:18:33 -05:00
parent 99ee212213
commit 93566f5b50
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
8 changed files with 52 additions and 3 deletions

View File

@ -1,6 +1,7 @@
#ifndef LEGOANIMATIONMANAGER_H #ifndef LEGOANIMATIONMANAGER_H
#define LEGOANIMATIONMANAGER_H #define LEGOANIMATIONMANAGER_H
#include "decomp.h"
#include "mxcore.h" #include "mxcore.h"
// VTABLE: LEGO1 0x100d8c18 // VTABLE: LEGO1 0x100d8c18
@ -28,6 +29,7 @@ class LegoAnimationManager : public MxCore {
void FUN_1005f6d0(MxBool); void FUN_1005f6d0(MxBool);
void FUN_10064670(MxBool); void FUN_10064670(MxBool);
void InitForWorld(undefined4);
__declspec(dllexport) static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig); __declspec(dllexport) static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);

View File

@ -19,6 +19,8 @@ class LegoBuildingManager : public MxCore {
__declspec(dllexport) static void configureLegoBuildingManager(MxS32); __declspec(dllexport) static void configureLegoBuildingManager(MxS32);
void OnWorldCreated();
private: private:
void Init(); void Init();
}; };

View File

@ -1,6 +1,7 @@
#ifndef LEGOPLANTMANAGER_H #ifndef LEGOPLANTMANAGER_H
#define LEGOPLANTMANAGER_H #define LEGOPLANTMANAGER_H
#include "decomp.h"
#include "mxcore.h" #include "mxcore.h"
// VTABLE: LEGO1 0x100d6758 // VTABLE: LEGO1 0x100d6758
@ -19,6 +20,8 @@ class LegoPlantManager : public MxCore {
return "LegoPlantManager"; return "LegoPlantManager";
} }
void InitForWorld(undefined4 p_world);
private: private:
void Init(); void Init();
}; };

View File

@ -43,6 +43,7 @@ class LegoWorld : public LegoEntity {
virtual void VTable0x68(MxBool p_add); // vtable+68 virtual void VTable0x68(MxBool p_add); // vtable+68
inline LegoCameraController* GetCamera() { return m_camera; } inline LegoCameraController* GetCamera() { return m_camera; }
inline undefined4 GetUnknown0xec() { return m_unk0xec; }
undefined FUN_100220e0(); undefined FUN_100220e0();
MxResult SetAsCurrentWorld(MxDSObject& p_dsObject); MxResult SetAsCurrentWorld(MxDSObject& p_dsObject);
@ -60,7 +61,9 @@ class LegoWorld : public LegoEntity {
LegoCameraController* m_camera; // 0x98 LegoCameraController* m_camera; // 0x98
undefined m_unk0x9c[0x1c]; // 0x9c undefined m_unk0x9c[0x1c]; // 0x9c
MxPresenterList m_list0xb8; // 0xb8 MxPresenterList m_list0xb8; // 0xb8
undefined m_unk0xd0[0x24]; // 0xd0 undefined m_unk0xd0[0x1c]; // 0xd0
undefined4 m_unk0xec; // 0xec
undefined4 m_unk0xf0; // 0xf0
MxS16 m_unk0xf4; // 0xf4 MxS16 m_unk0xf4; // 0xf4
MxBool m_unk0xf6; // 0xf6 MxBool m_unk0xf6; // 0xf6
undefined m_unk0xf7; // 0xf7 undefined m_unk0xf7; // 0xf7

View File

@ -26,3 +26,9 @@ void LegoBuildingManager::Init()
{ {
// TODO // TODO
} }
// STUB: LEGO1 0x1002fa00
void LegoBuildingManager::OnWorldCreated()
{
// TODO
}

View File

@ -18,6 +18,12 @@ void LegoPlantManager::Init()
// TODO // TODO
} }
// STUB: LEGO1 0x10026360
void LegoPlantManager::InitForWorld(undefined4 p_world)
{
// TODO
}
// STUB: LEGO1 0x10026e00 // STUB: LEGO1 0x10026e00
MxResult LegoPlantManager::Tickle() MxResult LegoPlantManager::Tickle()
{ {

View File

@ -1,12 +1,17 @@
#include "legoworldpresenter.h" #include "legoworldpresenter.h"
#include "legoanimationmanager.h"
#include "legobuildingmanager.h"
#include "legoentity.h" #include "legoentity.h"
#include "legoomni.h" #include "legoomni.h"
#include "legoplantmanager.h"
#include "legovideomanager.h" #include "legovideomanager.h"
#include "legoworld.h"
#include "mxactionnotificationparam.h" #include "mxactionnotificationparam.h"
#include "mxautolocker.h" #include "mxautolocker.h"
#include "mxdsactionlist.h" #include "mxdsactionlist.h"
#include "mxdsmultiaction.h" #include "mxdsmultiaction.h"
#include "mxnotificationmanager.h"
#include "mxobjectfactory.h" #include "mxobjectfactory.h"
#include "mxpresenter.h" #include "mxpresenter.h"
#include "mxstl/stlcompat.h" #include "mxstl/stlcompat.h"
@ -26,10 +31,25 @@ LegoWorldPresenter::LegoWorldPresenter()
m_unk0x50 = 50000; m_unk0x50 = 50000;
} }
// STUB: LEGO1 0x10066770 // FUNCTION: LEGO1 0x10066770
LegoWorldPresenter::~LegoWorldPresenter() LegoWorldPresenter::~LegoWorldPresenter()
{ {
// TODO MxBool result = FALSE;
if (m_objectBackend) {
undefined4 world = ((LegoWorld*) m_objectBackend)->GetUnknown0xec();
PlantManager()->InitForWorld(world);
AnimationManager()->InitForWorld(world);
BuildingManager()->OnWorldCreated();
result = ((LegoWorld*) m_objectBackend)->VTable0x5c();
}
if (result == FALSE) {
FUN_10015820(0, 7);
}
if (m_objectBackend) {
NotificationManager()->Send(m_objectBackend, &MxNotificationParam(c_notificationNewPresenter, NULL));
}
} }
// FUNCTION: LEGO1 0x10066870 // FUNCTION: LEGO1 0x10066870

View File

@ -33,6 +33,13 @@ void LegoAnimationManager::FUN_1005f6d0(MxBool)
// TODO // TODO
} }
// STUB: LEGO1 0x1005f720
void LegoAnimationManager::InitForWorld(undefined4)
{
// TODO
}
// STUB: LEGO1 0x100619f0 // STUB: LEGO1 0x100619f0
MxLong LegoAnimationManager::Notify(MxParam& p_param) MxLong LegoAnimationManager::Notify(MxParam& p_param)
{ {