mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement/match LegoAnimationManager::FUN_10060dc0 (#856)
* Implement/match LegoAnimationManager::FUN_10060dc0 * Fix params
This commit is contained in:
parent
19d39394be
commit
53ef6bdd81
5 changed files with 105 additions and 41 deletions
|
@ -15,19 +15,19 @@ struct ModelInfo {
|
|||
|
||||
// SIZE 0x30
|
||||
struct AnimInfo {
|
||||
char* m_animName; // 0x00
|
||||
undefined4 m_unk0x04; // 0x04
|
||||
MxS16 m_unk0x08; // 0x08
|
||||
MxU8 m_unk0x0a; // 0x0a
|
||||
MxU8 m_unk0x0b; // 0x0b
|
||||
MxU8 m_unk0x0c; // 0x0c
|
||||
MxU8 m_unk0x0d; // 0x0d
|
||||
MxU32 m_unk0x10[4]; // 0x10
|
||||
MxU8 m_modelCount; // 0x20
|
||||
ModelInfo* m_models; // 0x24
|
||||
MxU8 m_unk0x28; // 0x28
|
||||
MxU8 m_unk0x29; // 0x29
|
||||
MxS8 m_unk0x2a[3]; // 0x2a
|
||||
char* m_animName; // 0x00
|
||||
MxU32 m_objectId; // 0x04
|
||||
MxS16 m_unk0x08; // 0x08
|
||||
MxU8 m_unk0x0a; // 0x0a
|
||||
MxU8 m_unk0x0b; // 0x0b
|
||||
MxU8 m_unk0x0c; // 0x0c
|
||||
MxU8 m_unk0x0d; // 0x0d
|
||||
MxU32 m_unk0x10[4]; // 0x10
|
||||
MxU8 m_modelCount; // 0x20
|
||||
ModelInfo* m_models; // 0x24
|
||||
MxU8 m_unk0x28; // 0x28
|
||||
MxU8 m_unk0x29; // 0x29
|
||||
MxS8 m_unk0x2a[3]; // 0x2a
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8d80
|
||||
|
|
|
@ -75,18 +75,17 @@ class LegoAnimationManager : public MxCore {
|
|||
MxResult ReadModelInfo(LegoFile* p_file, ModelInfo* p_info);
|
||||
void DeleteAnimations();
|
||||
void FUN_10060570(MxBool);
|
||||
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
|
||||
MxResult StartEntityAction(MxDSAction& p_dsAction, LegoEntity* p_entity);
|
||||
undefined4 FUN_10060dc0(
|
||||
IsleScript::Script,
|
||||
undefined4,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined4,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined
|
||||
MxResult FUN_10060dc0(
|
||||
IsleScript::Script p_objectId,
|
||||
MxMatrix* p_matrix,
|
||||
undefined p_param3,
|
||||
undefined p_param4,
|
||||
undefined4 p_param5,
|
||||
undefined p_param6,
|
||||
MxBool p_param7,
|
||||
MxBool p_param8,
|
||||
undefined p_param9
|
||||
);
|
||||
void FUN_10061010(undefined4);
|
||||
void FUN_100617c0(MxS32, MxU16&, MxU32&);
|
||||
|
@ -107,6 +106,18 @@ class LegoAnimationManager : public MxCore {
|
|||
|
||||
private:
|
||||
void Init();
|
||||
MxResult FUN_100605e0(
|
||||
MxU32 p_index,
|
||||
MxU8 p_unk0x0a,
|
||||
MxMatrix* p_matrix,
|
||||
undefined,
|
||||
undefined4,
|
||||
undefined,
|
||||
MxBool,
|
||||
MxBool,
|
||||
undefined
|
||||
);
|
||||
MxResult FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2);
|
||||
|
||||
MxU32 m_scriptIndex; // 0x08
|
||||
MxU16 m_animCount; // 0x0c
|
||||
|
|
|
@ -259,7 +259,9 @@ class LegoOmni : public MxOmni {
|
|||
MxDSAction m_action; // 0xa0
|
||||
MxBackgroundAudioManager* m_bkgAudioManager; // 0x134
|
||||
MxTransitionManager* m_transitionManager; // 0x138
|
||||
MxBool m_unk0x13c; // 0x13c
|
||||
|
||||
public:
|
||||
MxBool m_unk0x13c; // 0x13c
|
||||
};
|
||||
|
||||
const char* GetNoCD_SourceName();
|
||||
|
|
|
@ -329,7 +329,7 @@ MxResult LegoAnimationManager::ReadAnimInfo(LegoFile* p_file, AnimInfo* p_info)
|
|||
}
|
||||
|
||||
p_info->m_animName[length] = 0;
|
||||
if (p_file->Read(&p_info->m_unk0x04, sizeof(p_info->m_unk0x04)) == FAILURE) {
|
||||
if (p_file->Read(&p_info->m_objectId, sizeof(p_info->m_objectId)) == FAILURE) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -444,6 +444,24 @@ void LegoAnimationManager::FUN_10060570(MxBool)
|
|||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100605e0
|
||||
// FUNCTION: BETA10 0x1004152b
|
||||
MxResult LegoAnimationManager::FUN_100605e0(
|
||||
MxU32 p_index,
|
||||
MxU8 p_unk0x0a,
|
||||
MxMatrix* p_matrix,
|
||||
undefined,
|
||||
undefined4,
|
||||
undefined,
|
||||
MxBool,
|
||||
MxBool,
|
||||
undefined
|
||||
)
|
||||
{
|
||||
// TODO
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100609f0
|
||||
// FUNCTION: BETA10 0x10041a38
|
||||
MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix, MxBool p_und1, MxBool p_und2)
|
||||
|
@ -535,21 +553,54 @@ MxResult LegoAnimationManager::StartEntityAction(MxDSAction& p_dsAction, LegoEnt
|
|||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10060dc0
|
||||
undefined4 LegoAnimationManager::FUN_10060dc0(
|
||||
IsleScript::Script,
|
||||
undefined4,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined4,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined
|
||||
// FUNCTION: LEGO1 0x10060dc0
|
||||
// FUNCTION: BETA10 0x10041f2c
|
||||
MxResult LegoAnimationManager::FUN_10060dc0(
|
||||
IsleScript::Script p_objectId,
|
||||
MxMatrix* p_matrix,
|
||||
undefined p_param3,
|
||||
undefined p_param4,
|
||||
undefined4 p_param5,
|
||||
undefined p_param6,
|
||||
MxBool p_param7,
|
||||
MxBool p_param8,
|
||||
undefined p_param9
|
||||
)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
MxResult result = FAILURE;
|
||||
MxBool found = FALSE;
|
||||
|
||||
if (!Lego()->m_unk0x13c) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
for (MxS32 i = 0; i < m_animCount; i++) {
|
||||
if (m_anims[i].m_objectId == p_objectId) {
|
||||
found = TRUE;
|
||||
undefined unk0x0a;
|
||||
|
||||
switch (p_param4) {
|
||||
case 0:
|
||||
unk0x0a = m_anims[i].m_unk0x0a;
|
||||
break;
|
||||
case 1:
|
||||
unk0x0a = 1;
|
||||
break;
|
||||
default:
|
||||
unk0x0a = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
result = FUN_100605e0(i, unk0x0a, p_matrix, p_param3, p_param5, p_param6, p_param7, p_param8, p_param9);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found && p_param3 != 0) {
|
||||
result = FUN_100609f0(p_objectId, p_matrix, p_param7, p_param8);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10061010
|
||||
|
|
|
@ -666,7 +666,7 @@ void Isle::Enable(MxBool p_enable)
|
|||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(script, 0, 1, 1, 0, 0, 0, 1, 0);
|
||||
AnimationManager()->FUN_10060dc0(script, NULL, 1, 1, 0, 0, FALSE, TRUE, 0);
|
||||
}
|
||||
|
||||
m_act1state->m_unk0x018 = 0;
|
||||
|
@ -694,7 +694,7 @@ void Isle::Enable(MxBool p_enable)
|
|||
break;
|
||||
}
|
||||
|
||||
AnimationManager()->FUN_10060dc0(script, 0, 1, 1, 0, 0, 0, 1, 0);
|
||||
AnimationManager()->FUN_10060dc0(script, NULL, 1, 1, 0, 0, FALSE, TRUE, 0);
|
||||
}
|
||||
|
||||
m_act1state->m_unk0x018 = 0;
|
||||
|
|
Loading…
Reference in a new issue