From 6c92b60ca77b4866e8120c21d989179d6bc4acb9 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 25 Apr 2024 10:13:50 -0400 Subject: [PATCH] Match --- .../lego/legoomni/src/video/legoanimpresenter.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index b49854c7..a038e042 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -87,7 +87,18 @@ void LegoAnimPresenter::Destroy(MxBool p_fromDestructor) delete m_unk0x78; } - // m_unk0x98 TODO + if (m_substMap != NULL) { + MxVariableTable* variableTable = VariableTable(); + + for (LegoAnimSubstMap::iterator it = m_substMap->begin(); it != m_substMap->end(); it++) { + variableTable->SetVariable((*it).first, ""); + + delete[] const_cast((*it).first); + delete[] const_cast((*it).second); + } + + delete m_substMap; + } if (m_unk0x90 != NULL) { for (MxS32 i = 0; i < m_unk0x94; i++) { @@ -111,7 +122,7 @@ void LegoAnimPresenter::Destroy(MxBool p_fromDestructor) } if (!p_fromDestructor) { - MxVideoPresenter::Destroy(p_fromDestructor); + MxVideoPresenter::Destroy(FALSE); } }