2023-06-29 04:10:08 -04:00
|
|
|
#include "mxmusicpresenter.h"
|
|
|
|
|
2023-10-07 16:36:05 -04:00
|
|
|
#include "decomp.h"
|
|
|
|
#include "mxmusicmanager.h"
|
|
|
|
#include "mxomni.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54);
|
|
|
|
|
2023-09-29 12:51:05 -04:00
|
|
|
// OFFSET: LEGO1 0x100c22c0
|
2023-06-29 04:10:08 -04:00
|
|
|
MxMusicPresenter::MxMusicPresenter()
|
|
|
|
{
|
2023-09-29 12:51:05 -04:00
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
2023-10-06 13:00:49 -04:00
|
|
|
// OFFSET: LEGO1 0x100c24e0
|
|
|
|
MxMusicPresenter::~MxMusicPresenter()
|
|
|
|
{
|
|
|
|
Destroy(TRUE);
|
|
|
|
}
|
|
|
|
|
2023-09-29 12:51:05 -04:00
|
|
|
// OFFSET: LEGO1 0x100c2540
|
|
|
|
void MxMusicPresenter::Init()
|
|
|
|
{
|
2023-10-06 13:00:49 -04:00
|
|
|
}
|
|
|
|
|
2023-10-11 06:18:26 -04:00
|
|
|
// OFFSET: LEGO1 0x100c2550
|
|
|
|
void MxMusicPresenter::Destroy(MxBool p_reinit)
|
2023-10-06 13:00:49 -04:00
|
|
|
{
|
2023-10-11 06:18:26 -04:00
|
|
|
if (MusicManager()) {
|
|
|
|
MusicManager()->RemovePresenter(*this);
|
|
|
|
}
|
|
|
|
m_criticalSection.Enter();
|
|
|
|
Init();
|
|
|
|
m_criticalSection.Leave();
|
|
|
|
if (!p_reinit) {
|
|
|
|
MxMediaPresenter::Destroy(FALSE);
|
|
|
|
}
|
2023-10-07 16:36:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c25a0
|
|
|
|
MxResult MxMusicPresenter::AddToMusicManager()
|
|
|
|
{
|
|
|
|
MxResult result = FAILURE;
|
|
|
|
if (MusicManager()) {
|
|
|
|
result = SUCCESS;
|
|
|
|
MusicManager()->AddPresenter(*this);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c25d0
|
|
|
|
void MxMusicPresenter::vtable38()
|
|
|
|
{
|
|
|
|
// TODO: Name this function when we know what the argument to Destroy does
|
|
|
|
Destroy(FALSE);
|
|
|
|
}
|