mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 09:38:14 -05:00
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:
parent
b25239f22d
commit
d369429e98
2 changed files with 34 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
#ifndef LEGOHIDEANIMPRESENTER_H
|
||||
#define LEGOHIDEANIMPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoloopinganimpresenter.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100d9278
|
||||
|
@ -23,8 +24,13 @@ class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
|
|||
return !strcmp(p_name, ClassName()) || LegoAnimPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
undefined4* m_unk0xc0; // 0xc0
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1006d9d0
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue