From c27e3be8636899267e5cdb969a0674f8884b40b2 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 26 Jan 2024 16:00:29 -0500 Subject: [PATCH] Add annotations --- .../legoomni/include/legocachesoundlist.h | 3 ++ LEGO1/lego/legoomni/include/legoentitylist.h | 3 ++ LEGO1/lego/legoomni/include/legoworld.h | 25 ++++++++++++- LEGO1/lego/legoomni/src/entity/legoworld.cpp | 36 +++++++++++-------- LEGO1/omni/include/mxpresenterlist.h | 3 ++ 5 files changed, 55 insertions(+), 15 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legocachesoundlist.h b/LEGO1/lego/legoomni/include/legocachesoundlist.h index d06fd4fd..88a8624f 100644 --- a/LEGO1/lego/legoomni/include/legocachesoundlist.h +++ b/LEGO1/lego/legoomni/include/legocachesoundlist.h @@ -92,4 +92,7 @@ class LegoCacheSoundListCursor : public MxPtrListCursor { // TEMPLATE: LEGO1 0x10020840 // MxListCursor::MxListCursor +// TEMPLATE: LEGO1 0x100224e0 +// MxList::InsertEntry + #endif // MXCORELIST_H diff --git a/LEGO1/lego/legoomni/include/legoentitylist.h b/LEGO1/lego/legoomni/include/legoentitylist.h index 04935769..4f212279 100644 --- a/LEGO1/lego/legoomni/include/legoentitylist.h +++ b/LEGO1/lego/legoomni/include/legoentitylist.h @@ -92,4 +92,7 @@ class LegoEntityListCursor : public MxPtrListCursor { // TEMPLATE: LEGO1 0x100207d0 // MxListCursor::MxListCursor +// TEMPLATE: LEGO1 0x10022430 +// MxList::InsertEntry + #endif // LEGOENTITYLIST_H diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 4465f36d..5baa792b 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -143,8 +143,31 @@ class LegoWorld : public LegoEntity { // TEMPLATE: LEGO1 0x10020760 // MxListCursor::MxListCursor +// TEMPLATE: LEGO1 0x100208b0 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::insert + +// TEMPLATE: LEGO1 0x10020b20 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::iterator::_Dec + +// XTEMPLATE: LEGO1 0x10020b70 + +// TEMPLATE: LEGO1 0x10020bb0 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::_Buynode + +// TEMPLATE: LEGO1 0x10020bd0 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::_Insert + +// TEMPLATE: LEGO1 0x10020e50 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::_Lrotate + +// TEMPLATE: LEGO1 0x10020eb0 +// _Tree >::_Kfn,PresenterSetCompare,allocator >::_Rrotate + +// TEMPLATE: LEGO1 0x10022360 +// _Construct + // GLOBAL: LEGO1 0x100f11a0 -// _Tree>::_Kfn,PresenterSetCompare,allocator >::_Nil +// _Tree >::_Kfn,PresenterSetCompare,allocator >::_Nil // clang-format on #endif // LEGOWORLD_H diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index ffc0311b..24907122 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -168,37 +168,45 @@ void LegoWorld::Add(MxCore* p_object) MxPresenterListCursor cursor(&m_controlPresenters); MxPresenter* presenter = (MxPresenter*) p_object; - if (!cursor.Find(presenter)) - m_controlPresenters.Append(presenter); + if (cursor.Find(presenter)) + return; + + m_controlPresenters.Append(presenter); } else if (p_object->IsA("MxEntity")) { LegoEntityListCursor cursor(m_entityList); LegoEntity* entity = (LegoEntity*) p_object; - if (!cursor.Find(entity)) - m_entityList->Append(entity); + if (cursor.Find(entity)) + return; + + m_entityList->Append(entity); } else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") || p_object->IsA("LegoLoopingAnimPresenter")) { MxPresenterListCursor cursor(&m_animPresenters); MxPresenter* presenter = (MxPresenter*) p_object; - if (!cursor.Find(presenter)) { - presenter->SendToCompositePresenter(Lego()); - m_animPresenters.Append(presenter); + if (cursor.Find(presenter)) + return; - if (p_object->IsA("LegoHideAnimPresenter")) - m_hideAnimPresenter = (LegoHideAnimPresenter*) presenter; - } + presenter->SendToCompositePresenter(Lego()); + m_animPresenters.Append(presenter); + + if (p_object->IsA("LegoHideAnimPresenter")) + m_hideAnimPresenter = (LegoHideAnimPresenter*) presenter; } else if (p_object->IsA("LegoCacheSound")) { LegoCacheSoundListCursor cursor(m_cacheSoundList); LegoCacheSound* sound = (LegoCacheSound*) p_object; - if (!cursor.Find(sound)) - m_cacheSoundList->Append(sound); + if (cursor.Find(sound)) + return; + + m_cacheSoundList->Append(sound); } else { - m_set0xa8.insert((MxPresenter*) p_object); + if (m_set0xa8.find((MxPresenter*) p_object) == m_set0xa8.end()) + m_set0xa8.insert((MxPresenter*) p_object); } if (!m_set0xd0.empty() && p_object->IsA("MxPresenter")) { @@ -206,7 +214,7 @@ void LegoWorld::Add(MxCore* p_object) if (presenter->IsEnabled()) { presenter->Enable(FALSE); - m_set0xd0.erase(presenter); + m_set0xd0.insert(presenter); } } } diff --git a/LEGO1/omni/include/mxpresenterlist.h b/LEGO1/omni/include/mxpresenterlist.h index a029a4cf..238dedfb 100644 --- a/LEGO1/omni/include/mxpresenterlist.h +++ b/LEGO1/omni/include/mxpresenterlist.h @@ -71,4 +71,7 @@ class MxPresenterListCursor : public MxPtrListCursor { // SYNTHETIC: LEGO1 0x1001d100 // MxPresenterList::~MxPresenterList +// TEMPLATE: LEGO1 0x10022380 +// MxList::InsertEntry + #endif // MXPRESENTERLIST_H