Implement/match LegoCharacterManager::FUN_10084cf0 (#773)

* Implement/match LegoCharacterManager::FUN_10084cf0

* Compat mode for iterator
This commit is contained in:
Christian Semmler 2024-04-06 08:08:38 -04:00 committed by GitHub
parent 4e74747451
commit 75dc04f40a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 4 deletions

View file

@ -56,7 +56,6 @@ class LegoCharacterManager {
LegoExtraActor* GetActor(const char* p_key);
LegoCharacterData* GetData(const char* p_key);
LegoCharacterData* GetData(LegoROI* p_roi);
LegoROI* FUN_10084cf0(LegoROI* p_roi, const char*);
MxBool FUN_10084ec0(LegoROI* p_roi);
MxU32 FUN_10085140(LegoROI* p_roi, MxBool p_und);
LegoROI* FUN_10085210(const char* p_name, const char* p_lodName, MxBool p_createEntity);
@ -66,6 +65,7 @@ class LegoCharacterManager {
private:
LegoROI* CreateROI(const char* p_key);
LegoROI* FUN_10084cf0(LegoROI* p_roi, const char* p_name);
MxResult FUN_10085870(LegoROI* p_roi);
static char* g_customizeAnimFile;

View file

@ -455,10 +455,23 @@ LegoCharacterData* LegoCharacterManager::GetData(LegoROI* p_roi)
return NULL;
}
// STUB: LEGO1 0x10084cf0
LegoROI* LegoCharacterManager::FUN_10084cf0(LegoROI* p_roi, const char*)
// FUNCTION: LEGO1 0x10084cf0
LegoROI* LegoCharacterManager::FUN_10084cf0(LegoROI* p_roi, const char* p_name)
{
// TODO
const CompoundObject* comp = p_roi->GetComp();
#ifdef COMPAT_MODE
for (CompoundObject::const_iterator it = comp->begin(); !(it == comp->end()); it++) {
#else
for (CompoundObject::iterator it = comp->begin(); !(it == comp->end()); it++) {
#endif
LegoROI* roi = (LegoROI*) *it;
if (!strcmpi(p_name, roi->GetName())) {
return roi;
}
}
return NULL;
}