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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 5 deletions

View file

@ -52,7 +52,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
void FUN_100692b0();
void FUN_100695c0();
LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2);
LegoBool FUN_100698b0(CompoundObject&, const LegoChar*);
LegoBool FUN_100698b0(const CompoundObject& p_und1, const LegoChar* p_und2);
LegoAnim* m_anim; // 0x64
undefined4 m_unk0x68; // 0x68

View file

@ -51,4 +51,7 @@ class LegoROIList : public MxPtrList<LegoROI> {
// SYNTHETIC: LEGO1 0x1005f660
// MxPtrList<LegoROI>::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1006ea00
// MxListEntry<LegoROI *>::MxListEntry<LegoROI *>
#endif // LEGOROILIST_H

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