mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 01:17:55 -05:00
Implement/match LegoAnimationManager::GetCharacterIndex (#861)
This commit is contained in:
parent
c7e5457f95
commit
f6ffeabed7
2 changed files with 15 additions and 7 deletions
|
@ -91,7 +91,6 @@ class LegoAnimationManager : public MxCore {
|
||||||
void FUN_10061010(undefined4);
|
void FUN_10061010(undefined4);
|
||||||
void FUN_100617c0(MxS32, MxU16&, MxU16&);
|
void FUN_100617c0(MxS32, MxU16&, MxU16&);
|
||||||
LegoTranInfo* GetTranInfo(MxU32 p_index);
|
LegoTranInfo* GetTranInfo(MxU32 p_index);
|
||||||
MxS8 FUN_10062360(char*);
|
|
||||||
void FUN_10062770();
|
void FUN_10062770();
|
||||||
void FUN_100627d0(MxBool);
|
void FUN_100627d0(MxBool);
|
||||||
void FUN_100629b0(MxU32, MxBool);
|
void FUN_100629b0(MxU32, MxBool);
|
||||||
|
@ -120,6 +119,7 @@ class LegoAnimationManager : public MxCore {
|
||||||
);
|
);
|
||||||
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
|
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
|
||||||
void DeleteAnimations();
|
void DeleteAnimations();
|
||||||
|
MxS8 GetCharacterIndex(const char* p_name);
|
||||||
void FUN_10063aa0();
|
void FUN_10063aa0();
|
||||||
|
|
||||||
MxU32 m_scriptIndex; // 0x08
|
MxU32 m_scriptIndex; // 0x08
|
||||||
|
|
|
@ -339,7 +339,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_anims[j].m_unk0x28 = FUN_10062360(m_anims[j].m_animName + strlen(m_anims[j].m_animName) - 2);
|
m_anims[j].m_unk0x28 = GetCharacterIndex(m_anims[j].m_animName + strlen(m_anims[j].m_animName) - 2);
|
||||||
m_anims[j].m_unk0x29 = 0;
|
m_anims[j].m_unk0x29 = 0;
|
||||||
|
|
||||||
for (k = 0; k < 3; k++) {
|
for (k = 0; k < 3; k++) {
|
||||||
|
@ -348,7 +348,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
|
||||||
|
|
||||||
if (m_anims[j].m_unk0x08 == -1) {
|
if (m_anims[j].m_unk0x08 == -1) {
|
||||||
for (MxS32 l = 0; l < m_anims[j].m_modelCount; l++) {
|
for (MxS32 l = 0; l < m_anims[j].m_modelCount; l++) {
|
||||||
MxS32 index = FUN_10062360(m_anims[j].m_models[l].m_modelName);
|
MxS32 index = GetCharacterIndex(m_anims[j].m_models[l].m_modelName);
|
||||||
|
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
g_characters[index].m_active = TRUE;
|
g_characters[index].m_active = TRUE;
|
||||||
|
@ -748,11 +748,19 @@ MxResult LegoAnimationManager::Tickle()
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10062360
|
// FUNCTION: LEGO1 0x10062360
|
||||||
MxS8 LegoAnimationManager::FUN_10062360(char*)
|
// FUNCTION: BETA10 0x100432dd
|
||||||
|
MxS8 LegoAnimationManager::GetCharacterIndex(const char* p_name)
|
||||||
{
|
{
|
||||||
// TODO
|
MxS8 i;
|
||||||
return 0;
|
|
||||||
|
for (i = 0; i < _countof(g_characters); i++) {
|
||||||
|
if (!strnicmp(p_name, g_characters[i].m_name, 2)) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10062770
|
// FUNCTION: LEGO1 0x10062770
|
||||||
|
|
Loading…
Reference in a new issue