mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement/match LegoCharacterManager::GetRefCount (#749)
This commit is contained in:
parent
6fda6ca92b
commit
e260a407ba
2 changed files with 17 additions and 7 deletions
|
@ -50,7 +50,7 @@ class LegoCharacterManager {
|
|||
static MxBool FUN_10084c00(const LegoChar*);
|
||||
|
||||
void FUN_100832a0();
|
||||
undefined4 FUN_10083bc0(LegoROI* p_roi);
|
||||
MxU32 GetRefCount(LegoROI* p_roi);
|
||||
void FUN_10083db0(LegoROI* p_roi);
|
||||
void FUN_10083f10(LegoROI* p_roi);
|
||||
LegoExtraActor* FUN_10084c40(const LegoChar*);
|
||||
|
|
|
@ -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 @@ LegoROI* LegoCharacterManager::GetROI(const char* p_key, MxBool p_createEntity)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue