mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +00:00
MxMIDIPresenter functions (#204)
* MxMIDIPresenter destructor, stub Destroy for now * MxMIDIPresenter::EndMIDIAction + update param name m_MIDIInitialized is definitely public, since it is accessed from the global MusicManager. * Add getter for MIDIInitialized, fix virtual function decl --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -1,16 +1,39 @@
|
|||||||
#include "mxmidipresenter.h"
|
#include "mxmidipresenter.h"
|
||||||
|
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "mxmusicmanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58);
|
DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58);
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c25e0
|
// OFFSET: LEGO1 0x100c25e0
|
||||||
MxMIDIPresenter::MxMIDIPresenter() {
|
MxMIDIPresenter::MxMIDIPresenter()
|
||||||
|
{
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c27c0
|
||||||
|
MxMIDIPresenter::~MxMIDIPresenter()
|
||||||
|
{
|
||||||
|
Destroy(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c2820
|
// OFFSET: LEGO1 0x100c2820
|
||||||
void MxMIDIPresenter::Init()
|
void MxMIDIPresenter::Init()
|
||||||
{
|
{
|
||||||
m_unk54 = 0;
|
m_unk54 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c2830 STUB
|
||||||
|
void MxMIDIPresenter::Destroy(MxBool p_fromDestructor)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c2940
|
||||||
|
void MxMIDIPresenter::DoneTickle()
|
||||||
|
{
|
||||||
|
if (!MusicManager()->GetMIDIInitialized()) {
|
||||||
|
this->EndAction();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ class MxMIDIPresenter : public MxMusicPresenter
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MxMIDIPresenter();
|
MxMIDIPresenter();
|
||||||
|
virtual ~MxMIDIPresenter() override;
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c2650
|
// OFFSET: LEGO1 0x100c2650
|
||||||
inline virtual const char *ClassName() const override // vtable+0xc
|
inline virtual const char *ClassName() const override // vtable+0xc
|
||||||
@@ -22,8 +23,12 @@ public:
|
|||||||
return !strcmp(name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::IsA(name);
|
return !strcmp(name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::IsA(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void DoneTickle() override; // vtable+0x2c
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
void Destroy(MxBool);
|
||||||
|
|
||||||
undefined4 m_unk54;
|
undefined4 m_unk54;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ public:
|
|||||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+2c
|
virtual void SetVolume(MxS32 p_volume) override; // vtable+2c
|
||||||
virtual MxResult StartMIDIThread(MxU32 p_frequencyMS, MxU8 p_noRegister); // vtable+30
|
virtual MxResult StartMIDIThread(MxU32 p_frequencyMS, MxU8 p_noRegister); // vtable+30
|
||||||
|
|
||||||
|
inline MxBool GetMIDIInitialized() { return m_MIDIInitialized; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
void DeinitializeMIDI();
|
void DeinitializeMIDI();
|
||||||
|
|||||||
Reference in New Issue
Block a user