MxMusicPresenter vtable (#184)

* MxMusicPresenter vtable

vtable+0x34 adds the current presenter to the music manager
vtable+0x38 calls destroy with the param as "FALSE"

* Update mxmusicpresenter.cpp

* Update mxmusicpresenter.cpp

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Joshua Peisach 2023-10-07 16:36:05 -04:00 committed by GitHub
parent a9fa734844
commit 472a82f220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View file

@ -1,5 +1,11 @@
#include "mxmusicpresenter.h"
#include "decomp.h"
#include "mxmusicmanager.h"
#include "mxomni.h"
DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54);
// OFFSET: LEGO1 0x100c22c0
MxMusicPresenter::MxMusicPresenter()
{
@ -21,4 +27,22 @@ void MxMusicPresenter::Init()
void MxMusicPresenter::Destroy(MxBool)
{
// TODO
}
}
// OFFSET: LEGO1 0x100c25a0
MxResult MxMusicPresenter::AddToMusicManager()
{
MxResult result = FAILURE;
if (MusicManager()) {
result = SUCCESS;
MusicManager()->AddPresenter(*this);
}
return result;
}
// OFFSET: LEGO1 0x100c25d0
void MxMusicPresenter::vtable38()
{
// TODO: Name this function when we know what the argument to Destroy does
Destroy(FALSE);
}

View file

@ -4,6 +4,7 @@
#include "mxaudiopresenter.h"
// VTABLE 0x100dc9b8
// SIZE 0x54
class MxMusicPresenter : public MxAudioPresenter
{
public:
@ -23,6 +24,9 @@ public:
MxMusicPresenter();
virtual ~MxMusicPresenter() override;
virtual MxResult AddToMusicManager(); // vtable+0x34
virtual void vtable38(); // vtable+0x38
private:
void Init();
void Destroy(MxBool);