mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -05:00
implement/match LegoAnimationManager::FindVehicle() (#748)
This commit is contained in:
parent
bfc2b76a61
commit
7431d9d650
2 changed files with 11 additions and 5 deletions
|
@ -67,7 +67,7 @@ class LegoAnimationManager : public MxCore {
|
|||
void FUN_1005f6d0(MxBool);
|
||||
void FUN_1005f700(MxBool);
|
||||
MxResult LoadScriptInfo(MxS32 p_scriptIndex);
|
||||
MxBool FUN_10060140(char* p_name, MxU32& p_index);
|
||||
MxBool FindVehicle(const char* p_name, MxU32& p_index);
|
||||
MxResult ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info);
|
||||
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
|
||||
void FUN_100603c0();
|
||||
|
|
|
@ -254,7 +254,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
|
|||
for (MxS32 m = 0; m < m_anims[j].m_modelCount; m++) {
|
||||
MxU32 n;
|
||||
|
||||
if (FUN_10060140(m_anims[j].m_models[m].m_modelName, n) && m_anims[j].m_models[m].m_unk0x2c) {
|
||||
if (FindVehicle(m_anims[j].m_models[m].m_modelName, n) && m_anims[j].m_models[m].m_unk0x2c) {
|
||||
m_anims[j].m_unk0x2a[count++] = n;
|
||||
if (count > 3) {
|
||||
break;
|
||||
|
@ -294,10 +294,16 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
|
|||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10060140
|
||||
MxBool LegoAnimationManager::FUN_10060140(char* p_name, MxU32& p_index)
|
||||
// FUNCTION: LEGO1 0x10060140
|
||||
MxBool LegoAnimationManager::FindVehicle(const char* p_name, MxU32& p_index)
|
||||
{
|
||||
// TODO
|
||||
for (MxS32 i = 0; i < _countof(g_vehicles); i++) {
|
||||
if (!strcmpi(p_name, g_vehicles[i].m_name)) {
|
||||
p_index = i;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue