mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Fixes
This commit is contained in:
parent
c82dbdcf17
commit
05c3cebcb7
@ -138,7 +138,7 @@ void MxBackgroundAudioManager::DestroyMusic()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007f170
|
||||
MxResult MxBackgroundAudioManager::Notify(MxParam& p)
|
||||
MxLong MxBackgroundAudioManager::Notify(MxParam& p)
|
||||
{
|
||||
switch (((MxNotificationParam&) p).GetNotification()) {
|
||||
case c_notificationStartAction:
|
||||
@ -151,7 +151,6 @@ MxResult MxBackgroundAudioManager::Notify(MxParam& p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Matches but register allocation is is different.
|
||||
// OFFSET: LEGO1 0x1007f1b0
|
||||
void MxBackgroundAudioManager::StartAction(MxParam& p)
|
||||
{
|
||||
@ -171,12 +170,10 @@ void MxBackgroundAudioManager::StopAction(MxParam& p)
|
||||
m_action1.SetAtomId(MxAtomId());
|
||||
m_action1.SetObjectId(-1);
|
||||
}
|
||||
else {
|
||||
if (((MxNotificationParam&) p).GetSender() == m_unk138) {
|
||||
m_unk138 = NULL;
|
||||
m_action2.SetAtomId(MxAtomId());
|
||||
m_action2.SetObjectId(-1);
|
||||
}
|
||||
else if (((MxNotificationParam&) p).GetSender() == m_unk138) {
|
||||
m_unk138 = NULL;
|
||||
m_action2.SetAtomId(MxAtomId());
|
||||
m_action2.SetObjectId(-1);
|
||||
}
|
||||
|
||||
Lego()->HandleNotificationType2(p);
|
||||
@ -218,13 +215,13 @@ MxResult MxBackgroundAudioManager::PlayMusic(MxDSAction& p_action, undefined4 p_
|
||||
MxResult MxBackgroundAudioManager::Tickle()
|
||||
{
|
||||
switch (m_unk13c) {
|
||||
case 2:
|
||||
case MxPresenter::TickleState_Starting:
|
||||
FadeInOrFadeOut();
|
||||
return SUCCESS;
|
||||
case 3:
|
||||
case MxPresenter::TickleState_Streaming:
|
||||
FUN_1007ee70();
|
||||
return SUCCESS;
|
||||
case 4:
|
||||
case MxPresenter::TickleState_Repeating:
|
||||
FUN_1007ef40();
|
||||
return SUCCESS;
|
||||
default:
|
||||
@ -236,7 +233,7 @@ MxResult MxBackgroundAudioManager::Tickle()
|
||||
void MxBackgroundAudioManager::FUN_1007ee70()
|
||||
{
|
||||
if (m_unka0 && m_unka0->GetAction()) {
|
||||
DeleteObject(m_unk138->GetAction());
|
||||
DeleteObject(*m_unk138->GetAction());
|
||||
}
|
||||
|
||||
if (m_unk138) {
|
||||
@ -280,7 +277,7 @@ void MxBackgroundAudioManager::FUN_1007ef40()
|
||||
}
|
||||
else if (m_unka0->GetAction() != NULL) {
|
||||
if (m_unka0->vtable5c() == 0) {
|
||||
DeleteObject(m_unka0->GetAction());
|
||||
DeleteObject(*m_unka0->GetAction());
|
||||
}
|
||||
else {
|
||||
compare = m_unka0->vtable5c();
|
||||
@ -298,7 +295,6 @@ void MxBackgroundAudioManager::FadeInOrFadeOut()
|
||||
{
|
||||
// This function probably is the fade in/out routine
|
||||
if (m_unka0 != NULL) {
|
||||
|
||||
undefined4 volume = m_unka0->vtable5c();
|
||||
MxU32 compare = 30;
|
||||
if (m_unk148 == 0) {
|
||||
|
||||
@ -15,6 +15,9 @@ class MxBackgroundAudioManager : public MxCore {
|
||||
MxBackgroundAudioManager();
|
||||
virtual ~MxBackgroundAudioManager() override;
|
||||
|
||||
virtual MxLong Notify(MxParam& p) override; // vtable+0x04
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// OFFSET: LEGO1 0x1007eb70
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
@ -28,13 +31,10 @@ class MxBackgroundAudioManager : public MxCore {
|
||||
return !strcmp(name, MxBackgroundAudioManager::ClassName()) || MxCore::IsA(name);
|
||||
}
|
||||
|
||||
virtual MxResult Notify(MxParam& p) override;
|
||||
|
||||
void StartAction(MxParam& p);
|
||||
void StopAction(MxParam& p);
|
||||
MxResult PlayMusic(MxDSAction& p_action, undefined4 p_unknown, undefined4 p_unknown2);
|
||||
|
||||
virtual MxResult Tickle() override;
|
||||
void FUN_1007ee70();
|
||||
void FUN_1007ef40();
|
||||
void FadeInOrFadeOut();
|
||||
|
||||
@ -13,9 +13,9 @@ class MxParam;
|
||||
class MxCore {
|
||||
public:
|
||||
__declspec(dllexport) MxCore();
|
||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||
__declspec(dllexport) virtual MxResult Notify(MxParam& p); // vtable+04
|
||||
virtual MxResult Tickle(); // vtable+08
|
||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||
__declspec(dllexport) virtual MxLong Notify(MxParam& p); // vtable+04
|
||||
virtual MxResult Tickle(); // vtable+08
|
||||
|
||||
// OFFSET: LEGO1 0x100144c0
|
||||
inline virtual const char* ClassName() const // vtable+0c
|
||||
|
||||
@ -30,7 +30,7 @@ class MxDSSound : public MxDSMediaAction {
|
||||
virtual void Deserialize(char** p_source, MxS16 p_unk24) override; // vtable+1c;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
virtual inline MxS32 GetVolume() const { return m_volume; }
|
||||
inline MxS32 GetVolume() const { return m_volume; }
|
||||
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user