Clear unknowns in LegoAnimActorEntry and LegoAnimKey (#1580)

This commit is contained in:
Fabian Neundorf
2025-06-22 14:34:29 +02:00
committed by GitHub
parent 16db496832
commit 2595537c4c
4 changed files with 25 additions and 17 deletions

View File

@@ -1063,7 +1063,7 @@ LegoResult LegoAnim::Read(LegoStorage* p_storage, LegoS32 p_parseScene)
m_modelList[i].m_name[length] = '\0';
if (p_storage->Read(&m_modelList[i].m_unk0x04, sizeof(undefined4)) != SUCCESS) {
if (p_storage->Read(&m_modelList[i].m_type, sizeof(LegoU32)) != SUCCESS) {
goto done;
}
}
@@ -1124,7 +1124,7 @@ LegoResult LegoAnim::Write(LegoStorage* p_storage)
goto done;
}
if (p_storage->Write(&m_modelList[i].m_unk0x04, sizeof(m_modelList[i].m_unk0x04)) != SUCCESS) {
if (p_storage->Write(&m_modelList[i].m_type, sizeof(m_modelList[i].m_type)) != SUCCESS) {
goto done;
}
}
@@ -1159,10 +1159,10 @@ const LegoChar* LegoAnim::GetActorName(LegoU32 p_index)
// FUNCTION: LEGO1 0x100a0f40
// FUNCTION: BETA10 0x1018023c
undefined4 LegoAnim::GetActorUnknown0x04(LegoU32 p_index)
LegoU32 LegoAnim::GetActorType(LegoU32 p_index)
{
if (p_index < m_numActors) {
return m_modelList[p_index].m_unk0x04;
return m_modelList[p_index].m_type;
}
return 0;

View File

@@ -30,9 +30,9 @@ public:
LegoU32 ShouldSkipInterpolation() { return m_flags & c_skipInterpolation; }
// FUNCTION: BETA10 0x100739a0
void FUN_100739a0(MxS32 p_param)
void SetActive(MxS32 p_active)
{
if (p_param) {
if (p_active) {
m_flags |= c_active;
}
else {
@@ -289,8 +289,16 @@ protected:
// SIZE 0x08
struct LegoAnimActorEntry {
LegoChar* m_name; // 0x00
undefined4 m_unk0x04; // 0x04
enum {
e_actorType2 = 2,
e_actorType3 = 3,
e_actorType4 = 4,
e_actorType5 = 5,
e_actorType6 = 6,
};
LegoChar* m_name; // 0x00
LegoU32 m_type; // 0x04
};
// TODO: Possibly called `LegoCameraAnim(ation)`?
@@ -338,7 +346,7 @@ public:
virtual LegoResult Read(LegoStorage* p_storage, LegoS32 p_parseScene); // vtable+0x10
const LegoChar* GetActorName(LegoU32 p_index);
undefined4 GetActorUnknown0x04(LegoU32 p_index);
LegoU32 GetActorType(LegoU32 p_index);
// FUNCTION: BETA10 0x1005abf0
LegoAnimScene* GetCamAnim() { return m_camAnim; }