MxMediaManager (#116)

This commit is contained in:
Joshua Peisach 2023-08-28 06:01:45 -04:00 committed by GitHub
parent 2233da39d8
commit 5a2cc72dbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 53 deletions

View file

@ -132,6 +132,7 @@ add_library(lego1 SHARED
LEGO1/mxloopingmidipresenter.cpp LEGO1/mxloopingmidipresenter.cpp
LEGO1/mxloopingsmkpresenter.cpp LEGO1/mxloopingsmkpresenter.cpp
LEGO1/mxmatrix.cpp LEGO1/mxmatrix.cpp
LEGO1/mxmediamanager.cpp
LEGO1/mxmediapresenter.cpp LEGO1/mxmediapresenter.cpp
LEGO1/mxmidipresenter.cpp LEGO1/mxmidipresenter.cpp
LEGO1/mxmusicpresenter.cpp LEGO1/mxmusicpresenter.cpp
@ -156,7 +157,6 @@ add_library(lego1 SHARED
LEGO1/mxticklemanager.cpp LEGO1/mxticklemanager.cpp
LEGO1/mxtimer.cpp LEGO1/mxtimer.cpp
LEGO1/mxtransitionmanager.cpp LEGO1/mxtransitionmanager.cpp
LEGO1/mxunknown100dc6b0.cpp
LEGO1/mxunknown100dc6e0.cpp LEGO1/mxunknown100dc6e0.cpp
LEGO1/mxvariable.cpp LEGO1/mxvariable.cpp
LEGO1/mxvariabletable.cpp LEGO1/mxvariabletable.cpp

View file

@ -1,11 +1,11 @@
#ifndef MXEVENTMANAGER_H #ifndef MXEVENTMANAGER_H
#define MXEVENTMANAGER_H #define MXEVENTMANAGER_H
#include "mxunknown100dc6b0.h" #include "mxmediamanager.h"
// VTABLE 0x100dc900 // VTABLE 0x100dc900
// SIZE 0x2c // SIZE 0x2c
class MxEventManager : public MxUnknown100dc6b0 class MxEventManager : public MxMediaManager
{ {
public: public:
MxEventManager(); MxEventManager();

33
LEGO1/mxmediamanager.cpp Normal file
View file

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

26
LEGO1/mxmediamanager.h Normal file
View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
#ifndef MXUNKNOWN100DC6E0_H #ifndef MXUNKNOWN100DC6E0_H
#define MXUNKNOWN100DC6E0_H #define MXUNKNOWN100DC6E0_H
#include "mxunknown100dc6b0.h" #include "mxmediamanager.h"
// VTABLE 0x100dc6e0 // VTABLE 0x100dc6e0
class MxUnknown100dc6e0 : public MxUnknown100dc6b0 class MxUnknown100dc6e0 : public MxMediaManager
{ {
public: public:
MxUnknown100dc6e0(); MxUnknown100dc6e0();

View file

@ -1,13 +1,13 @@
#ifndef MXVIDEOMANAGER_H #ifndef MXVIDEOMANAGER_H
#define MXVIDEOMANAGER_H #define MXVIDEOMANAGER_H
#include "mxunknown100dc6b0.h"
#include "mxdisplaysurface.h" #include "mxdisplaysurface.h"
#include "mxmediamanager.h"
#include "mxvideoparam.h" #include "mxvideoparam.h"
// VTABLE 0x100dc810 // VTABLE 0x100dc810
// SIZE 0x64 // SIZE 0x64
class MxVideoManager : public MxUnknown100dc6b0 class MxVideoManager : public MxMediaManager
{ {
public: public:
virtual ~MxVideoManager(); virtual ~MxVideoManager();