Add unknown render class stub (#347)

* Add mxrender manager class stub

* fix format

* rename the class

* Update MxUnknown100dbdbc.cpp

* rename class

* fix clang format

* Remove accidently committed code

* Update LEGO1/legoomni.cpp

Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>

* fix

* fix 2

---------

Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
This commit is contained in:
Misha 2023-12-21 13:21:56 -05:00 committed by GitHub
parent 2c018c117c
commit 6d0d308c37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 7 deletions

View file

@ -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

View file

@ -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();

View file

@ -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

View file

@ -0,0 +1,11 @@
#include "mxunknown100dbdbc.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxUnknown100dbdbc, 0x14)
// STUB: LEGO1 0x100a6fd0
MxUnknown100dbdbc::MxUnknown100dbdbc()
{
// TODO
}

17
LEGO1/mxunknown100dbdbc.h Normal file
View file

@ -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