diff --git a/CMakeLists.txt b/CMakeLists.txt index d70c0626..3650c718 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,6 +179,7 @@ add_library(lego1 SHARED LEGO1/mxtimer.cpp LEGO1/mxtransitionmanager.cpp LEGO1/mxtype17notificationparam.cpp + LEGO1/mxunknown100dbdbc.cpp LEGO1/mxvariable.cpp LEGO1/mxvariabletable.cpp LEGO1/mxvideomanager.cpp diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 53bb07ef..cd3438a7 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -21,6 +21,7 @@ #include "mxomnicreateparam.h" #include "mxticklemanager.h" #include "mxtransitionmanager.h" +#include "mxunknown100dbdbc.h" DECOMP_SIZE_ASSERT(LegoWorldList, 0x18); @@ -385,7 +386,7 @@ void LegoOmni::Init() MxOmni::Init(); m_unk0x68 = 0; m_inputMgr = NULL; - m_unk0x6c = 0; + m_renderMgr = NULL; m_gifManager = NULL; m_worldList = NULL; m_currentWorld = NULL; @@ -443,9 +444,9 @@ void LegoOmni::Destroy() m_gifManager = NULL; } - if (m_unk0x6c) { - // delete m_unk0x6c; // TODO - m_unk0x6c = NULL; + if (m_renderMgr) { + delete m_renderMgr; + m_renderMgr = NULL; } if (m_inputMgr) { @@ -523,15 +524,16 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param) } } - // TODO: there are a few more classes here + m_renderMgr = new MxUnknown100dbdbc(); m_gifManager = new GifManager(); + // TODO: there is another class here m_plantManager = new LegoPlantManager(); m_animationManager = new LegoAnimationManager(); m_buildingManager = new LegoBuildingManager(); m_gameState = new LegoGameState(); m_worldList = new LegoWorldList(TRUE); - if (m_unk0x6c && m_gifManager && m_worldList && m_plantManager && m_animationManager && m_buildingManager) { + if (m_renderMgr && m_gifManager && m_worldList && m_plantManager && m_animationManager && m_buildingManager) { // TODO: initialize a bunch of MxVariables RegisterScripts(); FUN_1001a700(); diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 4edaeb35..69f6964a 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -27,6 +27,7 @@ class MxAtomId; class MxBackgroundAudioManager; class MxDSFile; class MxTransitionManager; +class MxUnknown100dbdbc; extern MxAtomId* g_copterScript; extern MxAtomId* g_dunecarScript; @@ -116,7 +117,7 @@ class LegoOmni : public MxOmni { private: undefined4* m_unk0x68; // 0x68 - undefined4 m_unk0x6c; // 0x6c + MxUnknown100dbdbc* m_renderMgr; // 0x6c LegoInputManager* m_inputMgr; // 0x70 GifManager* m_gifManager; // 0x74 LegoWorldList* m_worldList; // 0x78 diff --git a/LEGO1/mxunknown100dbdbc.cpp b/LEGO1/mxunknown100dbdbc.cpp new file mode 100644 index 00000000..a420454a --- /dev/null +++ b/LEGO1/mxunknown100dbdbc.cpp @@ -0,0 +1,11 @@ +#include "mxunknown100dbdbc.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxUnknown100dbdbc, 0x14) + +// STUB: LEGO1 0x100a6fd0 +MxUnknown100dbdbc::MxUnknown100dbdbc() +{ + // TODO +} diff --git a/LEGO1/mxunknown100dbdbc.h b/LEGO1/mxunknown100dbdbc.h new file mode 100644 index 00000000..157058a7 --- /dev/null +++ b/LEGO1/mxunknown100dbdbc.h @@ -0,0 +1,17 @@ +#ifndef MXUNKNOWN100DBDBC_H +#define MXUNKNOWN100DBDBC_H + +#include "decomp.h" +#include "mxtypes.h" + +// VTABLE: LEGO1 0x100dbdbc +// SIZE 0x14 +class MxUnknown100dbdbc { +public: + MxUnknown100dbdbc(); + +private: + undefined m_unk0x4[0x14]; // TODO: change to 0x10 once scalar deconstructor is added +}; + +#endif // MXUNKNOWN100DBDBC_H