mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
02d003673d
* MxMusicPresenter destroy * Implement MxMusicPresenter's Destroy method and move MxMediaPresenter's Destroy method to "protected" * MxMediaPresenter Destroy to "protected", for real * MxMusicPresenter Destroy
56 lines
1 KiB
C++
56 lines
1 KiB
C++
#include "mxmusicpresenter.h"
|
|
|
|
#include "decomp.h"
|
|
#include "mxmusicmanager.h"
|
|
#include "mxomni.h"
|
|
|
|
DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54);
|
|
|
|
// OFFSET: LEGO1 0x100c22c0
|
|
MxMusicPresenter::MxMusicPresenter()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100c24e0
|
|
MxMusicPresenter::~MxMusicPresenter()
|
|
{
|
|
Destroy(TRUE);
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100c2540
|
|
void MxMusicPresenter::Init()
|
|
{
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100c2550
|
|
void MxMusicPresenter::Destroy(MxBool p_reinit)
|
|
{
|
|
if (MusicManager()) {
|
|
MusicManager()->RemovePresenter(*this);
|
|
}
|
|
m_criticalSection.Enter();
|
|
Init();
|
|
m_criticalSection.Leave();
|
|
if (!p_reinit) {
|
|
MxMediaPresenter::Destroy(FALSE);
|
|
}
|
|
}
|
|
|
|
// 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);
|
|
}
|