Implement MxMusicPresenter's Destroy method and move MxMediaPresenter's Destroy method to "protected" (#199)

* MxMusicPresenter destroy

* Implement MxMusicPresenter's Destroy method and move MxMediaPresenter's Destroy method to "protected"

* MxMediaPresenter Destroy to "protected", for real

* MxMusicPresenter Destroy
This commit is contained in:
DmitriLeon2000 2023-10-11 19:18:26 +09:00 committed by GitHub
parent 11dafaf816
commit 02d003673d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View file

@ -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);
};

View file

@ -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

View file

@ -29,7 +29,7 @@ class MxMusicPresenter : public MxAudioPresenter
private:
void Init();
void Destroy(MxBool);
void Destroy(MxBool p_reinit);
};
#endif // MXMUSICPRESENTER_H