LegoLoadCacheSoundPresenter ctor, dtor, init, destroy (#360)

* LegoLoadCacheSoundPresenter ctor, dtor, init, destroy

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach 2023-12-25 17:46:15 -05:00 committed by GitHub
parent 57b11866ed
commit c8ec60b62c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 5 deletions

View File

@ -1,19 +1,30 @@
#include "legoloadcachesoundpresenter.h" #include "legoloadcachesoundpresenter.h"
DECOMP_SIZE_ASSERT(LegoLoadCacheSoundPresenter, 0x90)
// FUNCTION: LEGO1 0x10018340 // FUNCTION: LEGO1 0x10018340
LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter() LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter()
{ {
Init(); Init();
} }
// STUB: LEGO1 0x10018480 // FUNCTION: LEGO1 0x10018480
LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter() LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter()
{ {
// TODO Destroy(TRUE);
} }
// STUB: LEGO1 0x100184e0 // FUNCTION: LEGO1 0x100184e0
void LegoLoadCacheSoundPresenter::Init() void LegoLoadCacheSoundPresenter::Init()
{ {
// TODO this->m_unk0x70 = NULL;
this->m_unk0x78 = 0;
this->m_unk0x7c = 0;
}
// FUNCTION: LEGO1 0x100184f0
void LegoLoadCacheSoundPresenter::Destroy(MxBool p_fromDestructor)
{
delete this->m_unk0x70;
MxWavePresenter::Destroy(p_fromDestructor);
} }

View File

@ -1,6 +1,7 @@
#ifndef LEGOLOADCACHESOUNDPRESENTER_H #ifndef LEGOLOADCACHESOUNDPRESENTER_H
#define LEGOLOADCACHESOUNDPRESENTER_H #define LEGOLOADCACHESOUNDPRESENTER_H
#include "decomp.h"
#include "mxwavepresenter.h" #include "mxwavepresenter.h"
// VTABLE: LEGO1 0x100d5fa8 // VTABLE: LEGO1 0x100d5fa8
@ -19,6 +20,17 @@ public:
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor);
undefined4* m_unk0x6c; // 0x6c
undefined4* m_unk0x70; // 0x70
undefined4 m_unk0x74; // 0x74
undefined4 m_unk0x78; // 0x78
undefined m_unk0x7c; // 0x7c
undefined4 m_unk0x80[4]; // 0x80
}; };
// SYNTHETIC: LEGO1 0x10018460
// LegoLoadCacheSoundPresenter::`scalar deleting destructor'
#endif // LEGOLOADCACHESOUNDPRESENTER_H #endif // LEGOLOADCACHESOUNDPRESENTER_H

View File

@ -50,9 +50,11 @@ public:
MxU32 m_flags; MxU32 m_flags;
}; };
protected:
void Destroy(MxBool p_fromDestructor);
private: private:
void Init(); void Init();
void Destroy(MxBool p_fromDestructor);
MxS8 GetPlayedChunks(); MxS8 GetPlayedChunks();
MxBool FUN_100b1ba0(); MxBool FUN_100b1ba0();
void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length); void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length);