2023-06-29 04:10:08 -04:00
|
|
|
#include "mxeventpresenter.h"
|
|
|
|
|
2023-07-02 03:00:28 -04:00
|
|
|
#include "decomp.h"
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxeventmanager.h"
|
|
|
|
#include "mxomni.h"
|
2023-07-02 03:00:28 -04:00
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxEventPresenter, 0x54);
|
|
|
|
|
2023-06-29 04:10:08 -04:00
|
|
|
// OFFSET: LEGO1 0x100c2b70
|
|
|
|
MxEventPresenter::MxEventPresenter()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
Init();
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2023-10-20 14:41:23 -04:00
|
|
|
// OFFSET: LEGO1 0x100c2d40
|
2023-06-29 04:10:08 -04:00
|
|
|
MxEventPresenter::~MxEventPresenter()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
Destroy();
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2023-07-02 03:00:28 -04:00
|
|
|
// OFFSET: LEGO1 0x100c2da0
|
2023-06-29 04:10:08 -04:00
|
|
|
void MxEventPresenter::Init()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
m_unk50 = NULL;
|
2023-10-20 14:41:23 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c2de0
|
|
|
|
void MxEventPresenter::Destroy()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
MxEventManager* eventManager = EventManager();
|
|
|
|
if (eventManager)
|
|
|
|
EventManager()->RemovePresenter(*this);
|
2023-10-20 14:41:23 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
m_criticalSection.Enter();
|
2023-10-20 14:41:23 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
if (m_unk50)
|
|
|
|
delete m_unk50;
|
2023-10-20 14:41:23 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
Init();
|
2023-10-20 14:41:23 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
m_criticalSection.Leave();
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|