diff --git a/LEGO1/omni/include/mxaudiomanager.h b/LEGO1/omni/include/mxaudiomanager.h index 020bda54..f962a16d 100644 --- a/LEGO1/omni/include/mxaudiomanager.h +++ b/LEGO1/omni/include/mxaudiomanager.h @@ -11,11 +11,11 @@ class MxAudioManager : public MxMediaManager { MxAudioManager(); ~MxAudioManager() override; - MxResult InitPresenters() override; // vtable+14 - void Destroy() override; // vtable+18 + MxResult Create() override; // vtable+14 + void Destroy() override; // vtable+18 // FUNCTION: LEGO1 0x10029910 - virtual MxS32 GetVolume() { return this->m_volume; } // vtable+28 + virtual MxS32 GetVolume() { return m_volume; } // vtable+28 virtual void SetVolume(MxS32 p_volume); // vtable+2c diff --git a/LEGO1/omni/include/mxmediamanager.h b/LEGO1/omni/include/mxmediamanager.h index 5fd2390c..38f611eb 100644 --- a/LEGO1/omni/include/mxmediamanager.h +++ b/LEGO1/omni/include/mxmediamanager.h @@ -16,7 +16,7 @@ class MxMediaManager : public MxCore { ~MxMediaManager() override; MxResult Tickle() override; // vtable+08 - virtual MxResult InitPresenters(); // vtable+14 + virtual MxResult Create(); // vtable+14 virtual void Destroy(); // vtable+18 virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c virtual void UnregisterPresenter(MxPresenter& p_presenter); // vtable+20 diff --git a/LEGO1/omni/src/audio/mxaudiomanager.cpp b/LEGO1/omni/src/audio/mxaudiomanager.cpp index 0be79a24..81b8922e 100644 --- a/LEGO1/omni/src/audio/mxaudiomanager.cpp +++ b/LEGO1/omni/src/audio/mxaudiomanager.cpp @@ -20,16 +20,16 @@ MxAudioManager::~MxAudioManager() // FUNCTION: LEGO1 0x100b8df0 void MxAudioManager::Init() { - this->m_volume = 100; + m_volume = 100; } // FUNCTION: LEGO1 0x100b8e00 void MxAudioManager::Destroy(MxBool p_fromDestructor) { - this->m_criticalSection.Enter(); + m_criticalSection.Enter(); g_count--; Init(); - this->m_criticalSection.Leave(); + m_criticalSection.Leave(); if (!p_fromDestructor) { MxMediaManager::Destroy(); @@ -37,13 +37,13 @@ void MxAudioManager::Destroy(MxBool p_fromDestructor) } // FUNCTION: LEGO1 0x100b8e40 -MxResult MxAudioManager::InitPresenters() +MxResult MxAudioManager::Create() { MxResult result = FAILURE; MxBool success = FALSE; - if (MxMediaManager::InitPresenters() == SUCCESS) { - this->m_criticalSection.Enter(); + if (MxMediaManager::Create() == SUCCESS) { + m_criticalSection.Enter(); success = TRUE; result = SUCCESS; g_count++; @@ -54,7 +54,7 @@ MxResult MxAudioManager::InitPresenters() } if (success) { - this->m_criticalSection.Leave(); + m_criticalSection.Leave(); } return result; @@ -69,7 +69,7 @@ void MxAudioManager::Destroy() // FUNCTION: LEGO1 0x100b8ea0 void MxAudioManager::SetVolume(MxS32 p_volume) { - this->m_criticalSection.Enter(); - this->m_volume = p_volume; - this->m_criticalSection.Leave(); + m_criticalSection.Enter(); + m_volume = p_volume; + m_criticalSection.Leave(); } diff --git a/LEGO1/omni/src/audio/mxmusicmanager.cpp b/LEGO1/omni/src/audio/mxmusicmanager.cpp index 94c56f04..762d3757 100644 --- a/LEGO1/omni/src/audio/mxmusicmanager.cpp +++ b/LEGO1/omni/src/audio/mxmusicmanager.cpp @@ -144,7 +144,7 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) MxResult status = FAILURE; MxBool locked = FALSE; - if (MxAudioManager::InitPresenters() == SUCCESS) { + if (MxAudioManager::Create() == SUCCESS) { if (p_createThread) { m_criticalSection.Enter(); locked = TRUE; diff --git a/LEGO1/omni/src/audio/mxsoundmanager.cpp b/LEGO1/omni/src/audio/mxsoundmanager.cpp index d5d8bd72..e97f7f29 100644 --- a/LEGO1/omni/src/audio/mxsoundmanager.cpp +++ b/LEGO1/omni/src/audio/mxsoundmanager.cpp @@ -44,22 +44,22 @@ void MxSoundManager::Init() // FUNCTION: LEGO1 0x100ae840 void MxSoundManager::Destroy(MxBool p_fromDestructor) { - if (this->m_thread) { - this->m_thread->Terminate(); - delete this->m_thread; + if (m_thread) { + m_thread->Terminate(); + delete m_thread; } else { TickleManager()->UnregisterClient(this); } - this->m_criticalSection.Enter(); + m_criticalSection.Enter(); - if (this->m_dsBuffer) { - this->m_dsBuffer->Release(); + if (m_dsBuffer) { + m_dsBuffer->Release(); } Init(); - this->m_criticalSection.Leave(); + m_criticalSection.Leave(); if (!p_fromDestructor) { MxAudioManager::Destroy(); @@ -72,7 +72,7 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) MxResult status = FAILURE; MxBool locked = FALSE; - if (MxAudioManager::InitPresenters() != SUCCESS) { + if (MxAudioManager::Create() != SUCCESS) { goto done; } diff --git a/LEGO1/omni/src/audio/mxsoundpresenter.cpp b/LEGO1/omni/src/audio/mxsoundpresenter.cpp index aa0435a2..9d784532 100644 --- a/LEGO1/omni/src/audio/mxsoundpresenter.cpp +++ b/LEGO1/omni/src/audio/mxsoundpresenter.cpp @@ -13,9 +13,9 @@ void MxSoundPresenter::Destroy(MxBool p_fromDestructor) MSoundManager()->UnregisterPresenter(*this); } - this->m_criticalSection.Enter(); + m_criticalSection.Enter(); MxMediaPresenter::Init(); - this->m_criticalSection.Leave(); + m_criticalSection.Leave(); if (!p_fromDestructor) { MxMediaPresenter::Destroy(FALSE); diff --git a/LEGO1/omni/src/common/mxmediamanager.cpp b/LEGO1/omni/src/common/mxmediamanager.cpp index bd32c70b..cc1611ae 100644 --- a/LEGO1/omni/src/common/mxmediamanager.cpp +++ b/LEGO1/omni/src/common/mxmediamanager.cpp @@ -31,7 +31,7 @@ MxResult MxMediaManager::Init() } // FUNCTION: LEGO1 0x100b85e0 -MxResult MxMediaManager::InitPresenters() +MxResult MxMediaManager::Create() { AUTOLOCK(m_criticalSection); diff --git a/LEGO1/omni/src/event/mxeventmanager.cpp b/LEGO1/omni/src/event/mxeventmanager.cpp index 43f1e045..29b8aba0 100644 --- a/LEGO1/omni/src/event/mxeventmanager.cpp +++ b/LEGO1/omni/src/event/mxeventmanager.cpp @@ -45,7 +45,7 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) MxResult status = FAILURE; MxBool locked = FALSE; - MxResult result = MxMediaManager::InitPresenters(); + MxResult result = MxMediaManager::Create(); if (result == SUCCESS) { if (p_createThread) { this->m_criticalSection.Enter(); diff --git a/LEGO1/omni/src/video/mxvideomanager.cpp b/LEGO1/omni/src/video/mxvideomanager.cpp index 3c57ac52..9c99f944 100644 --- a/LEGO1/omni/src/video/mxvideomanager.cpp +++ b/LEGO1/omni/src/video/mxvideomanager.cpp @@ -146,7 +146,7 @@ MxResult MxVideoManager::VTable0x28( m_unk0x60 = FALSE; - if (MxMediaManager::InitPresenters() != SUCCESS) { + if (MxMediaManager::Create() != SUCCESS) { goto done; } @@ -219,7 +219,7 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, m_unk0x60 = TRUE; - if (MxMediaManager::InitPresenters() != SUCCESS) { + if (MxMediaManager::Create() != SUCCESS) { goto done; }