diff --git a/LEGO1/mxmediapresenter.h b/LEGO1/mxmediapresenter.h index 167b10c1..6b8fd552 100644 --- a/LEGO1/mxmediapresenter.h +++ b/LEGO1/mxmediapresenter.h @@ -43,9 +43,10 @@ class MxMediaPresenter : public MxPresenter undefined4 m_unk44; undefined4 m_unk48; undefined4 m_unk4c; +protected: + void Destroy(MxBool); private: void Init(); - void Destroy(MxBool); }; diff --git a/LEGO1/mxmusicpresenter.cpp b/LEGO1/mxmusicpresenter.cpp index 45a56679..f376c64f 100644 --- a/LEGO1/mxmusicpresenter.cpp +++ b/LEGO1/mxmusicpresenter.cpp @@ -23,10 +23,18 @@ void MxMusicPresenter::Init() { } -// OFFSET: LEGO1 0x100c2550 STUB -void MxMusicPresenter::Destroy(MxBool) +// OFFSET: LEGO1 0x100c2550 +void MxMusicPresenter::Destroy(MxBool p_reinit) { - // TODO + if (MusicManager()) { + MusicManager()->RemovePresenter(*this); + } + m_criticalSection.Enter(); + Init(); + m_criticalSection.Leave(); + if (!p_reinit) { + MxMediaPresenter::Destroy(FALSE); + } } // OFFSET: LEGO1 0x100c25a0 diff --git a/LEGO1/mxmusicpresenter.h b/LEGO1/mxmusicpresenter.h index 2e55aa6c..ff765786 100644 --- a/LEGO1/mxmusicpresenter.h +++ b/LEGO1/mxmusicpresenter.h @@ -29,7 +29,7 @@ class MxMusicPresenter : public MxAudioPresenter private: void Init(); - void Destroy(MxBool); + void Destroy(MxBool p_reinit); }; #endif // MXMUSICPRESENTER_H