mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11: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);
|
DECOMP_SIZE_ASSERT(MxAudioManager, 0x30);
|
||||||
|
|
||||||
|
// GLOBAL: LEGO1 0x10102108
|
||||||
|
MxS32 MxAudioManager::g_unkCount = 0;
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b8d00
|
// OFFSET: LEGO1 0x100b8d00
|
||||||
MxAudioManager::MxAudioManager()
|
MxAudioManager::MxAudioManager()
|
||||||
{
|
{
|
||||||
@ -21,19 +24,41 @@ void MxAudioManager::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100b8e00
|
// OFFSET: LEGO1 0x100b8e00
|
||||||
void MxAudioManager::LockedReinitialize(MxBool p_doTeardown)
|
void MxAudioManager::LockedReinitialize(MxBool p_skipDestroy)
|
||||||
{
|
{
|
||||||
this->m_criticalSection.Enter();
|
this->m_criticalSection.Enter();
|
||||||
|
g_unkCount--;
|
||||||
Init();
|
Init();
|
||||||
this->m_criticalSection.Leave();
|
this->m_criticalSection.Leave();
|
||||||
|
|
||||||
if (p_doTeardown) {
|
if (!p_skipDestroy)
|
||||||
Teardown();
|
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
|
// OFFSET: LEGO1 0x100b8e90
|
||||||
void MxAudioManager::Reinitialize()
|
void MxAudioManager::Destroy()
|
||||||
{
|
{
|
||||||
LockedReinitialize(FALSE);
|
LockedReinitialize(FALSE);
|
||||||
}
|
}
|
||||||
@ -11,11 +11,14 @@ class MxAudioManager : public MxMediaManager
|
|||||||
MxAudioManager();
|
MxAudioManager();
|
||||||
virtual ~MxAudioManager() override;
|
virtual ~MxAudioManager() override;
|
||||||
|
|
||||||
void Reinitialize();
|
virtual MxResult InitPresenters(); // vtable+14
|
||||||
|
virtual void Destroy(); // vtable+18
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void LockedReinitialize(MxBool);
|
void LockedReinitialize(MxBool);
|
||||||
|
|
||||||
|
static MxS32 g_unkCount;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user