Implement/match LegoAnimPresenter::FUN_100698b0 (#598)

* Implement/match LegoAnimPresenter::FUN_100698b0

* Use const_iterator
This commit is contained in:
Christian Semmler
2024-02-26 13:39:03 -05:00
committed by GitHub
parent e6c347b8ab
commit 60161c43b5
3 changed files with 32 additions and 5 deletions

View File

@@ -251,11 +251,35 @@ LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar* p_und1, const LegoChar
return result;
}
// STUB: LEGO1 0x100698b0
LegoBool LegoAnimPresenter::FUN_100698b0(CompoundObject&, const LegoChar*)
// FUNCTION: LEGO1 0x100698b0
LegoBool LegoAnimPresenter::FUN_100698b0(const CompoundObject& p_und1, const LegoChar* p_und2)
{
// TODO
return FALSE;
LegoBool result = FALSE;
LegoChar* str;
if (*(str = FUN_100697c0(p_und2, NULL)) == '*') {
LegoChar* tmp = FUN_10069150(str);
delete[] str;
str = tmp;
}
if (str != NULL && *str != '\0' && p_und1.size() > 0) {
for (CompoundObject::const_iterator it = p_und1.begin(); it != p_und1.end(); it++) {
LegoROI* roi = (LegoROI*) *it;
const char* name = roi->GetName();
if (name != NULL) {
if (!strcmpi(name, str)) {
m_unk0x70->Append(roi);
result = TRUE;
break;
}
}
}
}
delete[] str;
return result;
}
// STUB: LEGO1 0x1006ad30