video/legohideanimpresenter: Init, dtor, most of destroy function (#447)

* video/legohideanimpresenter: Init, dtor, most of destroy function

* Format

* Finish Destroy

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach
2024-01-17 12:24:05 -05:00
committed by GitHub
parent b25239f22d
commit d369429e98
2 changed files with 34 additions and 3 deletions

View File

@@ -1,18 +1,43 @@
#include "legohideanimpresenter.h"
DECOMP_SIZE_ASSERT(LegoHideAnimPresenter, 0xc4)
// FUNCTION: LEGO1 0x1006d7e0
LegoHideAnimPresenter::LegoHideAnimPresenter()
{
Init();
}
// STUB: LEGO1 0x1006d9f0
// FUNCTION: LEGO1 0x1006d9f0
LegoHideAnimPresenter::~LegoHideAnimPresenter()
{
// TODO
Destroy(TRUE);
}
// STUB: LEGO1 0x1006da50
// FUNCTION: LEGO1 0x1006da50
void LegoHideAnimPresenter::Init()
{
m_unk0xc0 = NULL;
}
// FUNCTION: LEGO1 0x1006da60
void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor)
{
m_criticalSection.Enter();
if (m_unk0xc0)
delete m_unk0xc0;
Init();
m_criticalSection.Leave();
// This appears to be a bug, since it results in an endless loop
if (!p_fromDestructor)
LegoHideAnimPresenter::Destroy();
}
// FUNCTION: LEGO1 0x1006dac0
void LegoHideAnimPresenter::Destroy()
{
Destroy(FALSE);
}