diff --git a/LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp b/LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp index 580f3405..96fa7f2d 100644 --- a/LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp +++ b/LEGO1/lego/legoomni/src/audio/lego3dwavepresenter.cpp @@ -1,26 +1,43 @@ #include "lego3dwavepresenter.h" -// STUB: LEGO1 0x1004a7c0 +#include "mxomni.h" + +// FUNCTION: LEGO1 0x1004a7c0 MxResult Lego3DWavePresenter::AddToManager() { - // TODO - return SUCCESS; + MxResult result = MxWavePresenter::AddToManager(); + MxWavePresenter::Init(); + if (MxOmni::IsSound3D()) { + m_is3d = TRUE; + } + return result; } -// STUB: LEGO1 0x1004a7f0 +// FUNCTION: LEGO1 0x1004a7f0 void Lego3DWavePresenter::Destroy() { - // TODO + MxWavePresenter::Destroy(); + MxWavePresenter::Init(); + + if (MxOmni::IsSound3D()) { + m_is3d = TRUE; + } } // STUB: LEGO1 0x1004a810 void Lego3DWavePresenter::StartingTickle() { + if (MxOmni::IsSound3D()) { + m_is3d = TRUE; + } + MxWavePresenter::StartingTickle(); + // TODO } // STUB: LEGO1 0x1004a8b0 void Lego3DWavePresenter::StreamingTickle() { + MxWavePresenter::StreamingTickle(); // TODO } diff --git a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp index 81a854f8..5bb59615 100644 --- a/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legohideanimpresenter.cpp @@ -38,11 +38,10 @@ void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor) } } -// STUB: LEGO1 0x1006dab0 +// FUNCTION: LEGO1 0x1006dab0 MxResult LegoHideAnimPresenter::AddToManager() { - // TODO - return SUCCESS; + return LegoAnimPresenter::AddToManager(); } // FUNCTION: LEGO1 0x1006dac0 diff --git a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp index 545d2f65..d74640d7 100644 --- a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp @@ -1,5 +1,8 @@ #include "legopartpresenter.h" +#include "legoomni.h" +#include "legovideomanager.h" + // GLOBAL: LEGO1 0x100f7aa0 int g_partPresenterConfig1 = 1; @@ -19,10 +22,10 @@ void LegoPartPresenter::configureLegoPartPresenter(MxS32 p_partPresenterConfig1, g_partPresenterConfig2 = p_partPresenterConfig2; } -// STUB: LEGO1 0x1007c9b0 +// FUNCTION: LEGO1 0x1007c9b0 MxResult LegoPartPresenter::AddToManager() { - // TODO + VideoManager()->RegisterPresenter(*this); return SUCCESS; } diff --git a/LEGO1/omni/include/mxwavepresenter.h b/LEGO1/omni/include/mxwavepresenter.h index 982914bf..27bd1824 100644 --- a/LEGO1/omni/include/mxwavepresenter.h +++ b/LEGO1/omni/include/mxwavepresenter.h @@ -60,10 +60,9 @@ class MxWavePresenter : public MxSoundPresenter { // MxWavePresenter::`scalar deleting destructor' protected: + void Init(); void Destroy(MxBool p_fromDestructor); -private: - void Init(); MxS8 GetPlayedChunks(); MxBool FUN_100b1ba0(); void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length); @@ -74,7 +73,7 @@ class MxWavePresenter : public MxSoundPresenter { MxU32 m_lockSize; // 0x60 MxU8 m_writtenChunks; // 0x64 MxBool m_started; // 0x65 - MxBool m_unk0x66; // 0x66 + MxBool m_is3d; // 0x66 MxS8 m_silenceData; // 0x67 MxBool m_paused; // 0x68 }; diff --git a/LEGO1/omni/src/audio/mxwavepresenter.cpp b/LEGO1/omni/src/audio/mxwavepresenter.cpp index cb9f4d56..853441a7 100644 --- a/LEGO1/omni/src/audio/mxwavepresenter.cpp +++ b/LEGO1/omni/src/audio/mxwavepresenter.cpp @@ -20,7 +20,7 @@ void MxWavePresenter::Init() m_lockSize = 0; m_writtenChunks = 0; m_started = FALSE; - m_unk0x66 = FALSE; + m_is3d = FALSE; m_paused = FALSE; } @@ -156,7 +156,7 @@ void MxWavePresenter::StartingTickle() memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); - if (m_unk0x66) { + if (m_is3d) { desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME; } else {