diff --git a/CMakeLists.txt b/CMakeLists.txt index 2034c28a..1eb41a6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,7 @@ add_library(lego1 SHARED LEGO1/mxloopingmidipresenter.cpp LEGO1/mxloopingsmkpresenter.cpp LEGO1/mxmatrix.cpp + LEGO1/mxmediamanager.cpp LEGO1/mxmediapresenter.cpp LEGO1/mxmidipresenter.cpp LEGO1/mxmusicpresenter.cpp @@ -156,7 +157,6 @@ add_library(lego1 SHARED LEGO1/mxticklemanager.cpp LEGO1/mxtimer.cpp LEGO1/mxtransitionmanager.cpp - LEGO1/mxunknown100dc6b0.cpp LEGO1/mxunknown100dc6e0.cpp LEGO1/mxvariable.cpp LEGO1/mxvariabletable.cpp diff --git a/LEGO1/mxeventmanager.h b/LEGO1/mxeventmanager.h index 1fe7daeb..cb89f637 100644 --- a/LEGO1/mxeventmanager.h +++ b/LEGO1/mxeventmanager.h @@ -1,11 +1,11 @@ #ifndef MXEVENTMANAGER_H #define MXEVENTMANAGER_H -#include "mxunknown100dc6b0.h" +#include "mxmediamanager.h" // VTABLE 0x100dc900 // SIZE 0x2c -class MxEventManager : public MxUnknown100dc6b0 +class MxEventManager : public MxMediaManager { public: MxEventManager(); diff --git a/LEGO1/mxmediamanager.cpp b/LEGO1/mxmediamanager.cpp new file mode 100644 index 00000000..a6c8a9c0 --- /dev/null +++ b/LEGO1/mxmediamanager.cpp @@ -0,0 +1,33 @@ +#include "mxmediamanager.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxMediaManager, 0x2c); + +// OFFSET: LEGO1 0x100b84c0 +MxMediaManager::MxMediaManager() +{ + Init(); +} + +// OFFSET: LEGO1 0x100b8560 +MxMediaManager::~MxMediaManager() +{ + Teardown(); +} + +// OFFSET: LEGO1 0x100b85d0 +MxResult MxMediaManager::Init() +{ + this->m_unk08 = NULL; + this->m_thread = NULL; + return SUCCESS; +} + +// OFFSET: LEGO1 0x100b8710 +void MxMediaManager::Teardown() +{ + if(this->m_unk08) { + delete this->m_unk08; + } + Init(); +} \ No newline at end of file diff --git a/LEGO1/mxmediamanager.h b/LEGO1/mxmediamanager.h new file mode 100644 index 00000000..76af63fb --- /dev/null +++ b/LEGO1/mxmediamanager.h @@ -0,0 +1,26 @@ +#ifndef MXMEDIAMANGER_H +#define MXMEDIAMANGER_H + +#include "mxcore.h" +#include "mxcriticalsection.h" +#include "mxthread.h" +#include "mxtypes.h" + +// VTABLE 0x100dc6b0 +class MxMediaManager : public MxCore +{ +public: + MxMediaManager(); + virtual ~MxMediaManager() override; + + MxResult Init(); + void Teardown(); +private: + void* m_unk08; + MxThread* m_thread; // 0xc + +protected: + MxCriticalSection m_criticalSection; // 0x10 +}; + +#endif // MXMEDIAMANGER_H diff --git a/LEGO1/mxunknown100dc6b0.cpp b/LEGO1/mxunknown100dc6b0.cpp deleted file mode 100644 index b896fa10..00000000 --- a/LEGO1/mxunknown100dc6b0.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "mxunknown100dc6b0.h" - -// OFFSET: LEGO1 0x100b84c0 -MxUnknown100dc6b0::MxUnknown100dc6b0() -{ - Init(); -} - -// OFFSET: LEGO1 0x100b8560 STUB -MxUnknown100dc6b0::~MxUnknown100dc6b0() -{ - // TODO -} - -// OFFSET: LEGO1 0x100b85d0 -MxResult MxUnknown100dc6b0::Init() -{ - this->m_unk08 = 0; - this->m_unk0c = 0; - return SUCCESS; -} diff --git a/LEGO1/mxunknown100dc6b0.h b/LEGO1/mxunknown100dc6b0.h deleted file mode 100644 index 29d42209..00000000 --- a/LEGO1/mxunknown100dc6b0.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef MXUNKNOWN100DC6B0_H -#define MXUNKNOWN100DC6B0_H - -#include "mxcore.h" -#include "mxcriticalsection.h" -#include "mxtypes.h" - -// VTABLE 0x100dc6b0 -class MxUnknown100dc6b0 : public MxCore -{ -public: - MxUnknown100dc6b0(); - virtual ~MxUnknown100dc6b0() override; - - MxResult Init(); - -private: - int m_unk08; - int m_unk0c; - -protected: - MxCriticalSection m_criticalSection; -}; - -#endif // MXUNKNOWN100DC6B0_H diff --git a/LEGO1/mxunknown100dc6e0.h b/LEGO1/mxunknown100dc6e0.h index 79c63bab..056e1fcd 100644 --- a/LEGO1/mxunknown100dc6e0.h +++ b/LEGO1/mxunknown100dc6e0.h @@ -1,10 +1,10 @@ #ifndef MXUNKNOWN100DC6E0_H #define MXUNKNOWN100DC6E0_H -#include "mxunknown100dc6b0.h" +#include "mxmediamanager.h" // VTABLE 0x100dc6e0 -class MxUnknown100dc6e0 : public MxUnknown100dc6b0 +class MxUnknown100dc6e0 : public MxMediaManager { public: MxUnknown100dc6e0(); diff --git a/LEGO1/mxvideomanager.h b/LEGO1/mxvideomanager.h index 34511885..03eac8aa 100644 --- a/LEGO1/mxvideomanager.h +++ b/LEGO1/mxvideomanager.h @@ -1,13 +1,13 @@ #ifndef MXVIDEOMANAGER_H #define MXVIDEOMANAGER_H -#include "mxunknown100dc6b0.h" #include "mxdisplaysurface.h" +#include "mxmediamanager.h" #include "mxvideoparam.h" // VTABLE 0x100dc810 // SIZE 0x64 -class MxVideoManager : public MxUnknown100dc6b0 +class MxVideoManager : public MxMediaManager { public: virtual ~MxVideoManager();