mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Match LockedReinitialize, fix function declarations, add/match InitPresenters
This commit is contained in:
parent
009faf882f
commit
fecf857499
@ -2,6 +2,9 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAudioManager, 0x30);
|
||||
|
||||
// GLOBAL: LEGO1 0x10102108
|
||||
MxS32 MxAudioManager::g_unkCount = 0;
|
||||
|
||||
// OFFSET: LEGO1 0x100b8d00
|
||||
MxAudioManager::MxAudioManager()
|
||||
{
|
||||
@ -21,19 +24,41 @@ void MxAudioManager::Init()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e00
|
||||
void MxAudioManager::LockedReinitialize(MxBool p_doTeardown)
|
||||
void MxAudioManager::LockedReinitialize(MxBool p_skipDestroy)
|
||||
{
|
||||
this->m_criticalSection.Enter();
|
||||
g_unkCount--;
|
||||
Init();
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
if (p_doTeardown) {
|
||||
Teardown();
|
||||
if (!p_skipDestroy)
|
||||
MxMediaManager::Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e40
|
||||
MxResult MxAudioManager::InitPresenters()
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
MxBool success = FALSE;
|
||||
|
||||
if (MxMediaManager::InitPresenters() == SUCCESS) {
|
||||
this->m_criticalSection.Enter();
|
||||
success = TRUE;
|
||||
result = SUCCESS;
|
||||
g_unkCount++;
|
||||
}
|
||||
|
||||
if (result)
|
||||
Destroy();
|
||||
|
||||
if (success)
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e90
|
||||
void MxAudioManager::Reinitialize()
|
||||
void MxAudioManager::Destroy()
|
||||
{
|
||||
LockedReinitialize(FALSE);
|
||||
}
|
||||
@ -11,11 +11,14 @@ class MxAudioManager : public MxMediaManager
|
||||
MxAudioManager();
|
||||
virtual ~MxAudioManager() override;
|
||||
|
||||
void Reinitialize();
|
||||
virtual MxResult InitPresenters(); // vtable+14
|
||||
virtual void Destroy(); // vtable+18
|
||||
|
||||
private:
|
||||
void LockedReinitialize(MxBool);
|
||||
|
||||
static MxS32 g_unkCount;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user