Implement/match LegoAnimPresenter::FUN_100697c0 (#597)

* Implement/match LegoAnimPresenter::FUN_100697c0

* Use LegoU32
This commit is contained in:
Christian Semmler 2024-02-26 12:41:18 -05:00 committed by GitHub
parent 124b73046b
commit e6c347b8ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 5 deletions

View file

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

View file

@ -224,11 +224,31 @@ void LegoAnimPresenter::FUN_100695c0()
} }
} }
// STUB: LEGO1 0x100697c0 // FUNCTION: LEGO1 0x100697c0
LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar*, LegoChar*) LegoChar* LegoAnimPresenter::FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2)
{ {
// TODO const LegoChar* str = p_und1;
return NULL; const char* var = VariableTable()->GetVariable(p_und1);
if (*var) {
str = var;
}
LegoU32 len = strlen(str) + (p_und2 ? strlen(p_und2) : 0) + 2;
LegoChar* result = new LegoChar[len];
if (result != NULL) {
*result = '\0';
if (p_und2) {
strcpy(result, p_und2);
strcat(result, ":");
}
strcat(result, str);
}
return result;
} }
// STUB: LEGO1 0x100698b0 // STUB: LEGO1 0x100698b0