mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-22 11:31:57 -04:00
Rename InitPresenters to Create, remove this keyword (#1000)
This commit is contained in:
parent
ba378eb224
commit
2147be19de
@ -11,11 +11,11 @@ public:
|
|||||||
MxAudioManager();
|
MxAudioManager();
|
||||||
~MxAudioManager() override;
|
~MxAudioManager() override;
|
||||||
|
|
||||||
MxResult InitPresenters() override; // vtable+14
|
MxResult Create() override; // vtable+14
|
||||||
void Destroy() override; // vtable+18
|
void Destroy() override; // vtable+18
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10029910
|
// 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
|
virtual void SetVolume(MxS32 p_volume); // vtable+2c
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public:
|
|||||||
~MxMediaManager() override;
|
~MxMediaManager() override;
|
||||||
|
|
||||||
MxResult Tickle() override; // vtable+08
|
MxResult Tickle() override; // vtable+08
|
||||||
virtual MxResult InitPresenters(); // vtable+14
|
virtual MxResult Create(); // vtable+14
|
||||||
virtual void Destroy(); // vtable+18
|
virtual void Destroy(); // vtable+18
|
||||||
virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c
|
virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c
|
||||||
virtual void UnregisterPresenter(MxPresenter& p_presenter); // vtable+20
|
virtual void UnregisterPresenter(MxPresenter& p_presenter); // vtable+20
|
||||||
|
@ -20,16 +20,16 @@ MxAudioManager::~MxAudioManager()
|
|||||||
// FUNCTION: LEGO1 0x100b8df0
|
// FUNCTION: LEGO1 0x100b8df0
|
||||||
void MxAudioManager::Init()
|
void MxAudioManager::Init()
|
||||||
{
|
{
|
||||||
this->m_volume = 100;
|
m_volume = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b8e00
|
// FUNCTION: LEGO1 0x100b8e00
|
||||||
void MxAudioManager::Destroy(MxBool p_fromDestructor)
|
void MxAudioManager::Destroy(MxBool p_fromDestructor)
|
||||||
{
|
{
|
||||||
this->m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
g_count--;
|
g_count--;
|
||||||
Init();
|
Init();
|
||||||
this->m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
if (!p_fromDestructor) {
|
||||||
MxMediaManager::Destroy();
|
MxMediaManager::Destroy();
|
||||||
@ -37,13 +37,13 @@ void MxAudioManager::Destroy(MxBool p_fromDestructor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b8e40
|
// FUNCTION: LEGO1 0x100b8e40
|
||||||
MxResult MxAudioManager::InitPresenters()
|
MxResult MxAudioManager::Create()
|
||||||
{
|
{
|
||||||
MxResult result = FAILURE;
|
MxResult result = FAILURE;
|
||||||
MxBool success = FALSE;
|
MxBool success = FALSE;
|
||||||
|
|
||||||
if (MxMediaManager::InitPresenters() == SUCCESS) {
|
if (MxMediaManager::Create() == SUCCESS) {
|
||||||
this->m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
result = SUCCESS;
|
result = SUCCESS;
|
||||||
g_count++;
|
g_count++;
|
||||||
@ -54,7 +54,7 @@ MxResult MxAudioManager::InitPresenters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
this->m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -69,7 +69,7 @@ void MxAudioManager::Destroy()
|
|||||||
// FUNCTION: LEGO1 0x100b8ea0
|
// FUNCTION: LEGO1 0x100b8ea0
|
||||||
void MxAudioManager::SetVolume(MxS32 p_volume)
|
void MxAudioManager::SetVolume(MxS32 p_volume)
|
||||||
{
|
{
|
||||||
this->m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
this->m_volume = p_volume;
|
m_volume = p_volume;
|
||||||
this->m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|||||||
MxResult status = FAILURE;
|
MxResult status = FAILURE;
|
||||||
MxBool locked = FALSE;
|
MxBool locked = FALSE;
|
||||||
|
|
||||||
if (MxAudioManager::InitPresenters() == SUCCESS) {
|
if (MxAudioManager::Create() == SUCCESS) {
|
||||||
if (p_createThread) {
|
if (p_createThread) {
|
||||||
m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
locked = TRUE;
|
locked = TRUE;
|
||||||
|
@ -44,22 +44,22 @@ void MxSoundManager::Init()
|
|||||||
// FUNCTION: LEGO1 0x100ae840
|
// FUNCTION: LEGO1 0x100ae840
|
||||||
void MxSoundManager::Destroy(MxBool p_fromDestructor)
|
void MxSoundManager::Destroy(MxBool p_fromDestructor)
|
||||||
{
|
{
|
||||||
if (this->m_thread) {
|
if (m_thread) {
|
||||||
this->m_thread->Terminate();
|
m_thread->Terminate();
|
||||||
delete this->m_thread;
|
delete m_thread;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TickleManager()->UnregisterClient(this);
|
TickleManager()->UnregisterClient(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
|
|
||||||
if (this->m_dsBuffer) {
|
if (m_dsBuffer) {
|
||||||
this->m_dsBuffer->Release();
|
m_dsBuffer->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
this->m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
if (!p_fromDestructor) {
|
||||||
MxAudioManager::Destroy();
|
MxAudioManager::Destroy();
|
||||||
@ -72,7 +72,7 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|||||||
MxResult status = FAILURE;
|
MxResult status = FAILURE;
|
||||||
MxBool locked = FALSE;
|
MxBool locked = FALSE;
|
||||||
|
|
||||||
if (MxAudioManager::InitPresenters() != SUCCESS) {
|
if (MxAudioManager::Create() != SUCCESS) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@ void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
|||||||
MSoundManager()->UnregisterPresenter(*this);
|
MSoundManager()->UnregisterPresenter(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
MxMediaPresenter::Init();
|
MxMediaPresenter::Init();
|
||||||
this->m_criticalSection.Leave();
|
m_criticalSection.Leave();
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
if (!p_fromDestructor) {
|
||||||
MxMediaPresenter::Destroy(FALSE);
|
MxMediaPresenter::Destroy(FALSE);
|
||||||
|
@ -31,7 +31,7 @@ MxResult MxMediaManager::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b85e0
|
// FUNCTION: LEGO1 0x100b85e0
|
||||||
MxResult MxMediaManager::InitPresenters()
|
MxResult MxMediaManager::Create()
|
||||||
{
|
{
|
||||||
AUTOLOCK(m_criticalSection);
|
AUTOLOCK(m_criticalSection);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|||||||
MxResult status = FAILURE;
|
MxResult status = FAILURE;
|
||||||
MxBool locked = FALSE;
|
MxBool locked = FALSE;
|
||||||
|
|
||||||
MxResult result = MxMediaManager::InitPresenters();
|
MxResult result = MxMediaManager::Create();
|
||||||
if (result == SUCCESS) {
|
if (result == SUCCESS) {
|
||||||
if (p_createThread) {
|
if (p_createThread) {
|
||||||
this->m_criticalSection.Enter();
|
this->m_criticalSection.Enter();
|
||||||
|
@ -146,7 +146,7 @@ MxResult MxVideoManager::VTable0x28(
|
|||||||
|
|
||||||
m_unk0x60 = FALSE;
|
m_unk0x60 = FALSE;
|
||||||
|
|
||||||
if (MxMediaManager::InitPresenters() != SUCCESS) {
|
if (MxMediaManager::Create() != SUCCESS) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS,
|
|||||||
|
|
||||||
m_unk0x60 = TRUE;
|
m_unk0x60 = TRUE;
|
||||||
|
|
||||||
if (MxMediaManager::InitPresenters() != SUCCESS) {
|
if (MxMediaManager::Create() != SUCCESS) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user