Fix virtual function declarations

This commit is contained in:
Christian Semmler 2023-10-21 18:33:39 -04:00
parent 40dbdbd10f
commit 34f9fc9ddc
2 changed files with 15 additions and 12 deletions

View File

@ -14,30 +14,32 @@ MxSoundPresenter::~MxSoundPresenter()
// OFFSET: LEGO1 0x100b1a50
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
{
if(MSoundManager()) {
MSoundManager()->RemovePresenter(*this);
}
if (MSoundManager())
MSoundManager()->RemovePresenter(*this);
this->m_criticalSection.Enter();
MxMediaPresenter::Init();
this->m_criticalSection.Leave();
if(p_fromDestructor == FALSE) {
MxMediaPresenter::Destroy(FALSE);
}
if (!p_fromDestructor)
MxMediaPresenter::Destroy(FALSE);
}
// OFFSET: LEGO1 0x100b1aa0
MxResult MxSoundPresenter::AddToManager()
{
MxResult ret = FAILURE;
if(MSoundManager()) {
ret = SUCCESS;
MSoundManager()->AddPresenter(*this);
if (MSoundManager()) {
ret = SUCCESS;
MSoundManager()->AddPresenter(*this);
}
return ret;
}
// OFFSET: LEGO1 0x1000d490
void MxSoundPresenter::vtable38()
void MxSoundPresenter::Destroy()
{
Destroy(FALSE);
}

View File

@ -23,8 +23,9 @@ class MxSoundPresenter : public MxAudioPresenter
return !strcmp(name, MxSoundPresenter::ClassName()) || MxAudioPresenter::IsA(name);
};
virtual MxResult AddToManager(); // vtable+0x34
virtual void vtable38(); // vtable+0x38
virtual MxResult AddToManager() override; // vtable+0x34
virtual void Destroy() override; // vtable+0x38
private:
void Destroy(MxBool);
};