mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
LegoPalettePresenter - destroy function and destructor (#288)
* LegoPalettePresenter - destroy function and destructor * Update legopalettepresenter.h --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
d8bf4aebf4
commit
eee80250c0
2 changed files with 28 additions and 5 deletions
|
@ -8,14 +8,34 @@ LegoPalettePresenter::LegoPalettePresenter()
|
|||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a070 STUB
|
||||
// OFFSET: LEGO1 0x1007a070
|
||||
LegoPalettePresenter::~LegoPalettePresenter()
|
||||
{
|
||||
// TODO
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a0d0
|
||||
void LegoPalettePresenter::Init()
|
||||
{
|
||||
this->m_unk64 = 0;
|
||||
m_palette = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a0e0
|
||||
void LegoPalettePresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
if (m_palette) {
|
||||
delete m_palette;
|
||||
}
|
||||
Init();
|
||||
m_criticalSection.Leave();
|
||||
if (!p_fromDestructor) {
|
||||
MxVideoPresenter::Destroy(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a120
|
||||
void LegoPalettePresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define LEGOPALETTEPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxpalette.h"
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
// VTABLE 0x100d9aa0
|
||||
|
@ -9,7 +10,7 @@
|
|||
class LegoPalettePresenter : public MxVideoPresenter {
|
||||
public:
|
||||
LegoPalettePresenter();
|
||||
virtual ~LegoPalettePresenter(); // vtable+0x0
|
||||
virtual ~LegoPalettePresenter() override; // vtable+0x0
|
||||
|
||||
// OFFSET: LEGO1 0x10079f30
|
||||
inline const char* ClassName() const override // vtable+0xc
|
||||
|
@ -24,10 +25,12 @@ class LegoPalettePresenter : public MxVideoPresenter {
|
|||
return !strcmp(name, ClassName()) || MxVideoPresenter::IsA(name);
|
||||
}
|
||||
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
private:
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
undefined4 m_unk64;
|
||||
MxPalette* m_palette;
|
||||
};
|
||||
|
||||
#endif // LEGOPALETTEPRESENTER_H
|
||||
|
|
Loading…
Reference in a new issue