diff --git a/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp b/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp index 8f88ddc9..b0d56025 100644 --- a/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp +++ b/LEGO1/lego/legoomni/src/audio/legoloadcachesoundpresenter.cpp @@ -1,6 +1,8 @@ #include "legoloadcachesoundpresenter.h" #include "legocachsound.h" +#include "legosoundmanager.h" +#include "misc.h" #include "mxstreamchunk.h" #include "mxwavepresenter.h" @@ -69,9 +71,16 @@ void LegoLoadCacheSoundPresenter::DoneTickle() } } -// STUB: LEGO1 0x10018700 +// FUNCTION: LEGO1 0x10018700 MxResult LegoLoadCacheSoundPresenter::PutData() { - // TODO + m_criticalSection.Enter(); + + if (m_currentTickleState == e_done) { + m_cacheSound = SoundManager()->GetUnknown0x40()->FUN_1003d290(m_cacheSound); + m_unk0x7c = 1; + } + + m_criticalSection.Leave(); return SUCCESS; } diff --git a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp index 8351cdaa..7aead0ed 100644 --- a/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legopartpresenter.cpp @@ -37,10 +37,22 @@ MxResult LegoPartPresenter::AddToManager() return SUCCESS; } -// STUB: LEGO1 0x1007c9d0 +// FUNCTION: LEGO1 0x1007c9d0 void LegoPartPresenter::Destroy(MxBool p_fromDestructor) { - // TODO + m_criticalSection.Enter(); + VideoManager()->UnregisterPresenter(*this); + + if (m_parts) { + delete m_parts; + m_parts = NULL; + } + m_parts = NULL; + + m_criticalSection.Leave(); + if (!p_fromDestructor) { + MxMediaPresenter::Destroy(FALSE); + } } // FUNCTION: LEGO1 0x1007ca30 diff --git a/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp b/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp index 02464323..e2d5211b 100644 --- a/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legotexturepresenter.cpp @@ -114,11 +114,24 @@ MxResult LegoTexturePresenter::Store() return SUCCESS; } -// STUB: LEGO1 0x1004fc60 +// FUNCTION: LEGO1 0x1004fc60 MxResult LegoTexturePresenter::PutData() { - // TODO - return FAILURE; + MxResult result = SUCCESS; + + if (MxPresenter::IsEnabled() && m_currentChunk != NULL) { + result = Read(*m_currentChunk); + if (result == SUCCESS) { + Store(); + } + + if (m_currentTickleState == e_streaming) { + m_subscriber->FreeDataChunk(m_currentChunk); + } + m_currentChunk = NULL; + } + + return result; } // FUNCTION: LEGO1 0x1004fcb0