mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
37 lines
664 B
C++
37 lines
664 B
C++
#include "mxsoundpresenter.h"
|
|
|
|
#include "decomp.h"
|
|
#include "mxmisc.h"
|
|
#include "mxsoundmanager.h"
|
|
|
|
DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54)
|
|
|
|
// FUNCTION: LEGO1 0x100b1a50
|
|
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
|
{
|
|
if (MSoundManager()) {
|
|
MSoundManager()->UnregisterPresenter(*this);
|
|
}
|
|
|
|
m_criticalSection.Enter();
|
|
MxMediaPresenter::Init();
|
|
m_criticalSection.Leave();
|
|
|
|
if (!p_fromDestructor) {
|
|
MxMediaPresenter::Destroy(FALSE);
|
|
}
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100b1aa0
|
|
MxResult MxSoundPresenter::AddToManager()
|
|
{
|
|
MxResult ret = FAILURE;
|
|
|
|
if (MSoundManager()) {
|
|
ret = SUCCESS;
|
|
MSoundManager()->RegisterPresenter(*this);
|
|
}
|
|
|
|
return ret;
|
|
}
|