From eac096036ab398dbf06d7546521ca1c428059e72 Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Fri, 12 Jan 2024 17:30:50 -0500 Subject: [PATCH] implement LegoModelPresenter::Destroy (#428) * LegoModelPresenter::Destroy * remove debug print * Update legomodelpresenter.cpp --- LEGO1/lego/legoomni/include/legomodelpresenter.h | 4 ++++ LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legomodelpresenter.h b/LEGO1/lego/legoomni/include/legomodelpresenter.h index ca3e216f..fe2216d5 100644 --- a/LEGO1/lego/legoomni/include/legomodelpresenter.h +++ b/LEGO1/lego/legoomni/include/legomodelpresenter.h @@ -28,6 +28,10 @@ class LegoModelPresenter : public MxVideoPresenter { protected: void Destroy(MxBool p_fromDestructor); + +private: + undefined4 m_unk0x64; // 0x64 + MxBool m_addedToView; // 0x68 }; #endif // LEGOMODELPRESENTER_H diff --git a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp index d9608461..c30ae848 100644 --- a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp @@ -15,16 +15,23 @@ void LegoModelPresenter::configureLegoModelPresenter(MxS32 p_modelPresenterConfi g_modelPresenterConfig = p_modelPresenterConfig; } -// STUB: LEGO1 0x1007f670 +// FUNCTION: LEGO1 0x1007f670 void LegoModelPresenter::Destroy(MxBool p_fromDestructor) { - // TODO + m_criticalSection.Enter(); + m_unk0x64 = 0; + m_addedToView = FALSE; + m_criticalSection.Leave(); + if (!p_fromDestructor) { + MxVideoPresenter::Destroy(FALSE); + } } // STUB: LEGO1 0x10080050 void LegoModelPresenter::ReadyTickle() { // TODO + SetTickleState(TickleState_Starting); } // STUB: LEGO1 0x100801b0