mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-27 06:32:06 -04:00
implement LegoWorldPresenter deconstructor (#425)
* Implement LegoWorldPresenter::~LegoWorldPresenter * Rename incorrect function name * fixes * Rename functions * fix format
This commit is contained in:
parent
602ba30fae
commit
3c0bf7191c
@ -27,7 +27,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
||||||
virtual void Stop() override; // vtable+0x50
|
virtual void VTable0x50() override; // vtable+0x50
|
||||||
virtual MxBool VTable0x5c() override; // vtable+0x5c
|
virtual MxBool VTable0x5c() override; // vtable+0x5c
|
||||||
virtual MxBool VTable0x64() override; // vtable+0x64
|
virtual MxBool VTable0x64() override; // vtable+0x64
|
||||||
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
|
virtual void VTable0x68(MxBool p_add) override; // vtable+0x68
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18
|
||||||
virtual void Stop() override; // vtable+50
|
virtual void VTable0x50() override; // vtable+50
|
||||||
virtual void VTable0x58(MxCore* p_object) override; // vtable+58
|
virtual void VTable0x58(MxCore* p_object) override; // vtable+58
|
||||||
// FUNCTION: LEGO1 0x10030900
|
// FUNCTION: LEGO1 0x10030900
|
||||||
virtual MxBool VTable0x5c() override { return TRUE; } // vtable+5c
|
virtual MxBool VTable0x5c() override { return TRUE; } // vtable+5c
|
||||||
|
@ -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
|
||||||
@ -27,6 +28,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FUN_1005f6d0(MxBool);
|
void FUN_1005f6d0(MxBool);
|
||||||
|
void FUN_1005f720(undefined4);
|
||||||
void FUN_10064670(MxBool);
|
void FUN_10064670(MxBool);
|
||||||
|
|
||||||
__declspec(dllexport) static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
__declspec(dllexport) static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
||||||
|
@ -19,6 +19,8 @@ public:
|
|||||||
|
|
||||||
__declspec(dllexport) static void configureLegoBuildingManager(MxS32);
|
__declspec(dllexport) static void configureLegoBuildingManager(MxS32);
|
||||||
|
|
||||||
|
void FUN_1002fa00();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
};
|
};
|
||||||
|
@ -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 @@ public:
|
|||||||
return "LegoPlantManager";
|
return "LegoPlantManager";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FUN_10026360(undefined4 p_world);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
return !strcmp(p_name, LegoWorld::ClassName()) || LegoEntity::IsA(p_name);
|
return !strcmp(p_name, LegoWorld::ClassName()) || LegoEntity::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Stop(); // vtable+50
|
virtual void VTable0x50(); // vtable+50
|
||||||
virtual void VTable0x54(); // vtable+54
|
virtual void VTable0x54(); // vtable+54
|
||||||
virtual void VTable0x58(MxCore* p_object); // vtable+58
|
virtual void VTable0x58(MxCore* p_object); // vtable+58
|
||||||
virtual MxBool VTable0x5c(); // vtable+5c
|
virtual MxBool VTable0x5c(); // vtable+5c
|
||||||
@ -43,6 +43,7 @@ public:
|
|||||||
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,9 +61,11 @@ protected:
|
|||||||
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_worldStarted; // 0xf6
|
||||||
undefined m_unk0xf7; // 0xf7
|
undefined m_unk0xf7; // 0xf7
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
// Score::`scalar deleting destructor'
|
// Score::`scalar deleting destructor'
|
||||||
|
|
||||||
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+18
|
virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+18
|
||||||
virtual void Stop() override; // vtable+50
|
virtual void VTable0x50() override; // vtable+50
|
||||||
virtual MxBool VTable0x5c() override; // vtable+5c
|
virtual MxBool VTable0x5c() override; // vtable+5c
|
||||||
virtual MxBool VTable0x64() override; // vtable+64
|
virtual MxBool VTable0x64() override; // vtable+64
|
||||||
virtual void VTable0x68(MxBool p_add) override; // vtable+68
|
virtual void VTable0x68(MxBool p_add) override; // vtable+68
|
||||||
|
@ -26,3 +26,9 @@ void LegoBuildingManager::Init()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1002fa00
|
||||||
|
void LegoBuildingManager::FUN_1002fa00()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
@ -18,6 +18,12 @@ void LegoPlantManager::Init()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x10026360
|
||||||
|
void LegoPlantManager::FUN_10026360(undefined4 p_world)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10026e00
|
// STUB: LEGO1 0x10026e00
|
||||||
MxResult LegoPlantManager::Tickle()
|
MxResult LegoPlantManager::Tickle()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ DECOMP_SIZE_ASSERT(LegoWorld, 0xf8);
|
|||||||
LegoWorld::LegoWorld() : m_list0x68(TRUE)
|
LegoWorld::LegoWorld() : m_list0x68(TRUE)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
m_unk0xf6 = FALSE;
|
m_worldStarted = FALSE;
|
||||||
m_unk0xf4 = 4;
|
m_unk0xf4 = 4;
|
||||||
NotificationManager()->Register(this);
|
NotificationManager()->Register(this);
|
||||||
}
|
}
|
||||||
@ -101,12 +101,12 @@ void LegoWorld::VTable0x68(MxBool p_add)
|
|||||||
// FUNCTION: LEGO1 0x10022080
|
// FUNCTION: LEGO1 0x10022080
|
||||||
MxResult LegoWorld::Tickle()
|
MxResult LegoWorld::Tickle()
|
||||||
{
|
{
|
||||||
if (!m_unk0xf6) {
|
if (!m_worldStarted) {
|
||||||
switch (m_unk0xf4) {
|
switch (m_unk0xf4) {
|
||||||
case 0:
|
case 0:
|
||||||
m_unk0xf6 = TRUE;
|
m_worldStarted = TRUE;
|
||||||
SetAppCursor(0);
|
SetAppCursor(0);
|
||||||
Stop();
|
VTable0x50();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 2:
|
case 2:
|
||||||
if (FUN_100220e0() == 1)
|
if (FUN_100220e0() == 1)
|
||||||
@ -121,11 +121,11 @@ MxResult LegoWorld::Tickle()
|
|||||||
// STUB: LEGO1 0x100220e0
|
// STUB: LEGO1 0x100220e0
|
||||||
undefined LegoWorld::FUN_100220e0()
|
undefined LegoWorld::FUN_100220e0()
|
||||||
{
|
{
|
||||||
return TRUE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10022340
|
// FUNCTION: LEGO1 0x10022340
|
||||||
void LegoWorld::Stop()
|
void LegoWorld::VTable0x50()
|
||||||
{
|
{
|
||||||
TickleManager()->UnregisterClient(this);
|
TickleManager()->UnregisterClient(this);
|
||||||
}
|
}
|
||||||
|
@ -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,32 @@ 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()->FUN_10026360(world);
|
||||||
|
AnimationManager()->FUN_1005f720(world);
|
||||||
|
BuildingManager()->FUN_1002fa00();
|
||||||
|
result = ((LegoWorld*) m_objectBackend)->VTable0x5c();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == FALSE) {
|
||||||
|
FUN_10015820(0, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_objectBackend) {
|
||||||
|
#ifdef COMPAT_MODE
|
||||||
|
{
|
||||||
|
MxNotificationParam param(c_notificationNewPresenter, NULL);
|
||||||
|
NotificationManager()->Send(m_objectBackend, ¶m);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
NotificationManager()->Send(m_objectBackend, &MxNotificationParam(c_notificationNewPresenter, NULL));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10066870
|
// FUNCTION: LEGO1 0x10066870
|
||||||
|
@ -26,7 +26,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x1006f4e0
|
// STUB: LEGO1 0x1006f4e0
|
||||||
void Infocenter::Stop()
|
void Infocenter::VTable0x50()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ MxLong Score::Notify(MxParam& p_param)
|
|||||||
{
|
{
|
||||||
MxLong ret = 0;
|
MxLong ret = 0;
|
||||||
LegoWorld::Notify(p_param);
|
LegoWorld::Notify(p_param);
|
||||||
if (m_unk0xf6) {
|
if (m_worldStarted) {
|
||||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationStartAction:
|
case c_notificationStartAction:
|
||||||
ret = 1;
|
ret = 1;
|
||||||
@ -128,9 +128,9 @@ MxLong Score::FUN_10001510(MxEndActionNotificationParam& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10001580
|
// FUNCTION: LEGO1 0x10001580
|
||||||
void Score::Stop()
|
void Score::VTable0x50()
|
||||||
{
|
{
|
||||||
LegoWorld::Stop();
|
LegoWorld::VTable0x50();
|
||||||
|
|
||||||
MxDSAction action;
|
MxDSAction action;
|
||||||
action.SetObjectId(0x1f4);
|
action.SetObjectId(0x1f4);
|
||||||
|
@ -99,7 +99,7 @@ MxLong Isle::Notify(MxParam& p_param)
|
|||||||
MxLong result = 0;
|
MxLong result = 0;
|
||||||
LegoWorld::Notify(p_param);
|
LegoWorld::Notify(p_param);
|
||||||
|
|
||||||
if (m_unk0xf6) {
|
if (m_worldStarted) {
|
||||||
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
switch (((MxNotificationParam&) p_param).GetNotification()) {
|
||||||
case c_notificationEndAction:
|
case c_notificationEndAction:
|
||||||
result = StopAction(p_param);
|
result = StopAction(p_param);
|
||||||
@ -153,7 +153,7 @@ MxLong Isle::StopAction(MxParam& p_param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10030fc0
|
// STUB: LEGO1 0x10030fc0
|
||||||
void Isle::Stop()
|
void Isle::VTable0x50()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,12 @@ void LegoAnimationManager::FUN_1005f6d0(MxBool)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// STUB: LEGO1 0x1005f720
|
||||||
|
void LegoAnimationManager::FUN_1005f720(undefined4)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100619f0
|
// STUB: LEGO1 0x100619f0
|
||||||
MxLong LegoAnimationManager::Notify(MxParam& p_param)
|
MxLong LegoAnimationManager::Notify(MxParam& p_param)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user