mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Rename InitPresenters to Create, remove this keyword (#1000)
This commit is contained in:

committed by
GitHub

parent
ba378eb224
commit
2147be19de
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -31,7 +31,7 @@ MxResult MxMediaManager::Init()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b85e0
|
||||
MxResult MxMediaManager::InitPresenters()
|
||||
MxResult MxMediaManager::Create()
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user