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-10-24 19:38:27 -04:00
|
|
|
Init();
|
2023-09-29 12:51:05 -04:00
|
|
|
}
|
|
|
|
|
2023-10-06 13:00:49 -04:00
|
|
|
// OFFSET: LEGO1 0x100c24e0
|
|
|
|
MxMusicPresenter::~MxMusicPresenter()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
Destroy(TRUE);
|
2023-10-06 13:00:49 -04:00
|
|
|
}
|
|
|
|
|
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
|
2023-10-13 12:43:45 -04:00
|
|
|
void MxMusicPresenter::Destroy(MxBool p_fromDestructor)
|
2023-10-06 13:00:49 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
if (MusicManager()) {
|
|
|
|
MusicManager()->RemovePresenter(*this);
|
|
|
|
}
|
2023-11-24 12:21:26 -05:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
m_criticalSection.Enter();
|
|
|
|
Init();
|
|
|
|
m_criticalSection.Leave();
|
2023-11-24 12:21:26 -05:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
if (!p_fromDestructor) {
|
|
|
|
MxMediaPresenter::Destroy(FALSE);
|
|
|
|
}
|
2023-10-07 16:36:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c25a0
|
2023-10-13 12:43:45 -04:00
|
|
|
MxResult MxMusicPresenter::AddToManager()
|
2023-10-07 16:36:05 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
MxResult result = FAILURE;
|
2023-11-24 12:21:26 -05:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
if (MusicManager()) {
|
|
|
|
result = SUCCESS;
|
|
|
|
MusicManager()->AddPresenter(*this);
|
|
|
|
}
|
2023-11-24 12:21:26 -05:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
return result;
|
|
|
|
}
|
2023-10-07 16:36:05 -04:00
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100c25d0
|
2023-10-13 12:43:45 -04:00
|
|
|
void MxMusicPresenter::Destroy()
|
2023-10-07 16:36:05 -04:00
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
Destroy(FALSE);
|
2023-10-07 16:36:05 -04:00
|
|
|
}
|