Implement/match LegoCharacterManager::GetRefCount (#749)

This commit is contained in:
Christian Semmler
2024-03-29 13:30:31 -04:00
committed by GitHub
parent 6fda6ca92b
commit e260a407ba
2 changed files with 17 additions and 7 deletions

View File

@@ -49,11 +49,11 @@ void LegoCharacterManager::FUN_100832a0()
if (actor != NULL && actor->IsA("LegoExtraActor")) {
LegoROI* roi = g_characterData[i].m_roi;
undefined4 und = FUN_10083bc0(roi);
MxU32 refCount = GetRefCount(roi);
while (und) {
while (refCount != 0) {
FUN_10083db0(roi);
und = FUN_10083bc0(roi);
refCount = GetRefCount(roi);
}
}
}
@@ -205,10 +205,20 @@ done:
return NULL;
}
// STUB: LEGO1 0x10083bc0
undefined4 LegoCharacterManager::FUN_10083bc0(LegoROI* p_roi)
// FUNCTION: LEGO1 0x10083bc0
MxU32 LegoCharacterManager::GetRefCount(LegoROI* p_roi)
{
// TODO
LegoCharacterMap::iterator it;
for (it = m_characters->begin(); it != m_characters->end(); it++) {
LegoCharacter* character = (*it).second;
LegoROI* roi = character->m_roi;
if (roi == p_roi) {
return character->m_refCount;
}
}
return 0;
}