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