From bfc2b76a61dbcf6cb433172942702a884e017953 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 29 Mar 2024 10:41:12 -0400 Subject: [PATCH] Implement/match LegoCharacterManager::FUN_100832a0 (#747) --- .../legoomni/include/legocharactermanager.h | 1 + .../src/common/legocharactermanager.cpp | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legocharactermanager.h b/LEGO1/lego/legoomni/include/legocharactermanager.h index 2347f55e..6067c326 100644 --- a/LEGO1/lego/legoomni/include/legocharactermanager.h +++ b/LEGO1/lego/legoomni/include/legocharactermanager.h @@ -50,6 +50,7 @@ class LegoCharacterManager { static MxBool FUN_10084c00(const LegoChar*); void FUN_100832a0(); + undefined4 FUN_10083bc0(LegoROI* p_roi); void FUN_10083db0(LegoROI* p_roi); void FUN_10083f10(LegoROI* p_roi); LegoExtraActor* FUN_10084c40(const LegoChar*); diff --git a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp index 16d7f2de..024c547d 100644 --- a/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legocharactermanager.cpp @@ -38,10 +38,26 @@ void LegoCharacterManager::Init() } } -// STUB: LEGO1 0x100832a0 +// FUNCTION: LEGO1 0x100832a0 void LegoCharacterManager::FUN_100832a0() { - // TODO + for (MxS32 i = 0; i < _countof(g_characterData) - 1; i++) { + LegoCharacterData* data = Find(g_characterData[i].m_name); + + if (data != NULL) { + LegoExtraActor* actor = data->m_actor; + + if (actor != NULL && actor->IsA("LegoExtraActor")) { + LegoROI* roi = g_characterData[i].m_roi; + undefined4 und = FUN_10083bc0(roi); + + while (und) { + FUN_10083db0(roi); + und = FUN_10083bc0(roi); + } + } + } + } } // FUNCTION: LEGO1 0x10083310 @@ -189,6 +205,13 @@ LegoROI* LegoCharacterManager::GetROI(const char* p_key, MxBool p_createEntity) return NULL; } +// STUB: LEGO1 0x10083bc0 +undefined4 LegoCharacterManager::FUN_10083bc0(LegoROI* p_roi) +{ + // TODO + return 0; +} + // STUB: LEGO1 0x10083db0 void LegoCharacterManager::FUN_10083db0(LegoROI* p_roi) {