Implement/match LegoOmni::GetScriptIndex (#571)

* Implement/match LegoOmni::GetScriptIndex

* Fix type

* Fix
This commit is contained in:
Christian Semmler
2024-02-16 20:10:42 -05:00
committed by GitHub
parent c67f613b8d
commit b47412183b
9 changed files with 35 additions and 25 deletions

View File

@@ -883,9 +883,15 @@ MxS32 LegoOmni::GetCurrPathInfo(LegoPathBoundary** p_path, MxS32& p_value)
return ::CurrentWorld()->GetCurrPathInfo(p_path, p_value);
}
// STUB: LEGO1 0x1005b490
undefined4 LegoOmni::FUN_1005b490(char* p_worldName)
// FUNCTION: LEGO1 0x1005b490
MxS32 LegoOmni::GetScriptIndex(const char* p_key)
{
for (MxS32 i = 0; i < 19; i++) {
if ((MxS32) &m_scripts[i] != -4 && !strcmpi(m_scripts[i].GetKey(), p_key)) {
return m_scripts[i].GetIndex();
}
}
return -1;
}