From e49d05c4109083bcea44f95b22628730a06f44f4 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 27 Apr 2024 09:19:55 -0400 Subject: [PATCH] Implement/match LegoAnimationManager::FUN_10063780 and FUN_10063aa0 (#859) --- .../legoomni/include/legoanimationmanager.h | 2 +- .../src/common/legoanimationmanager.cpp | 27 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 54947650..d8c20dac 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -96,7 +96,7 @@ class LegoAnimationManager : public MxCore { void FUN_100627d0(MxBool); void FUN_100629b0(MxU32, MxBool); void FUN_10063270(LegoROIList*, LegoAnimPresenter*); - void FUN_10063780(LegoROIList*); + void FUN_10063780(LegoROIList* p_list); void FUN_10064670(MxBool); void FUN_10064740(MxBool); diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index 648e5128..fdfbfad3 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -779,16 +779,33 @@ void LegoAnimationManager::FUN_10063270(LegoROIList*, LegoAnimPresenter*) // TODO } -// STUB: LEGO1 0x10063780 -void LegoAnimationManager::FUN_10063780(LegoROIList*) +// FUNCTION: LEGO1 0x10063780 +void LegoAnimationManager::FUN_10063780(LegoROIList* p_list) { - // TODO + if (p_list != NULL && m_unk0x424 != NULL) { + LegoROIListCursor cursor(p_list); + LegoROI* roi; + + while (cursor.Next(roi)) { + const char* name = roi->GetName(); + + if (CharacterManager()->Exists(name)) { + m_unk0x424->Append(roi); + cursor.Detach(); + } + } + } } -// STUB: LEGO1 0x10063aa0 +// FUNCTION: LEGO1 0x10063aa0 void LegoAnimationManager::FUN_10063aa0() { - // TODO + LegoROIListCursor cursor(m_unk0x424); + LegoROI* roi; + + while (cursor.Next(roi)) { + CharacterManager()->FUN_10083db0(roi); + } } // STUB: LEGO1 0x10064670