Implement LegoCarBuildAnimPresenter::FUN_10079160() and others (#1111)

* Implement `LegoCarBuildAnimPresenter::FUN_10079160()` and others

* Address review comments

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2024-10-11 20:21:33 +02:00
committed by GitHub
parent 85ce10ab50
commit 974cd7ce7c
11 changed files with 360 additions and 52 deletions

View File

@@ -279,6 +279,7 @@ LegoResult LegoTranslationKey::Read(LegoStorage* p_storage)
}
// FUNCTION: LEGO1 0x1009faa0
// FUNCTION: BETA10 0x1017e2b3
LegoRotationKey::LegoRotationKey()
{
m_angle = 1.0F;
@@ -356,6 +357,7 @@ LegoResult LegoScaleKey::Read(LegoStorage* p_storage)
}
// FUNCTION: LEGO1 0x1009fcf0
// FUNCTION: BETA10 0x1017e71a
LegoAnimNodeData::LegoAnimNodeData()
{
m_numTranslationKeys = 0;
@@ -494,6 +496,13 @@ LegoResult LegoAnimNodeData::Write(LegoStorage* p_storage)
return SUCCESS;
}
// STUB: LEGO1 0x100a0360
// STUB: BETA10 0x1017f1e5
void LegoAnimNodeData::FUN_100a0360(LegoChar* p_param)
{
// TODO
}
// FUNCTION: LEGO1 0x100a03c0
LegoResult LegoAnimNodeData::CreateLocalTransform(LegoFloat p_time, Matrix4& p_matrix)
{

View File

@@ -145,17 +145,37 @@ public:
LegoResult Read(LegoStorage* p_storage) override; // vtable+0x04
LegoResult Write(LegoStorage* p_storage) override; // vtable+0x08
void FUN_100a0360(LegoChar* p_param);
LegoResult CreateLocalTransform(LegoFloat p_time, Matrix4& p_matrix);
LegoBool FUN_100a0990(LegoFloat p_time);
// FUNCTION: BETA10 0x100595d0
const LegoChar* GetName() { return m_name; }
LegoChar* GetName() { return m_name; }
// FUNCTION: BETA10 0x10073780
LegoU16 GetNumTranslationKeys() { return m_numTranslationKeys; }
// FUNCTION: BETA10 0x100737b0
LegoU16 GetNumRotationKeys() { return m_numRotationKeys; }
// FUNCTION: BETA10 0x100737e0
void SetNumRotationKeys(LegoU16 p_numRotationKeys) { m_numRotationKeys = p_numRotationKeys; }
// FUNCTION: BETA10 0x10073810
void SetRotationKeys(LegoRotationKey* p_keys)
{
m_rotationKeys = p_keys;
m_rotationIndex = 0;
}
LegoU32 GetTranslationIndex() { return m_translationIndex; }
LegoU32 GetRotationIndex() { return m_rotationIndex; }
LegoU32 GetScaleIndex() { return m_scaleIndex; }
LegoU32 GetMorphIndex() { return m_morphIndex; }
// FUNCTION: BETA10 0x1005abc0
LegoU16 GetUnknown0x20() { return m_unk0x20; }
LegoU16 GetUnknown0x22() { return m_unk0x22; }
// FUNCTION: BETA10 0x10073b80
@@ -165,6 +185,8 @@ public:
void SetRotationIndex(LegoU32 p_rotationIndex) { m_rotationIndex = p_rotationIndex; }
void SetScaleIndex(LegoU32 p_scaleIndex) { m_scaleIndex = p_scaleIndex; }
void SetMorphIndex(LegoU32 p_morphIndex) { m_morphIndex = p_morphIndex; }
// FUNCTION: BETA10 0x10059600
void SetUnknown0x20(LegoU16 p_unk0x20) { m_unk0x20 = p_unk0x20; }
// FUNCTION: BETA10 0x1005f2e0

View File

@@ -8,6 +8,7 @@ DECOMP_SIZE_ASSERT(LegoTreeNode, 0x010)
DECOMP_SIZE_ASSERT(LegoTree, 0x08)
// FUNCTION: LEGO1 0x10099d60
// FUNCTION: BETA10 0x10187dd0
LegoTreeNode::LegoTreeNode()
{
m_data = NULL;

View File

@@ -9,6 +9,7 @@
class LegoStorage;
// VTABLE: LEGO1 0x100db778
// VTABLE: BETA10 0x101c37f4
// SIZE 0x04
class LegoTreeNodeData {
public:
@@ -36,6 +37,7 @@ public:
// FUNCTION: BETA10 0x100595a0
LegoTreeNodeData* GetData() { return m_data; }
// FUNCTION: BETA10 0x100736f0
void SetData(LegoTreeNodeData* p_data) { m_data = p_data; }
// FUNCTION: BETA10 0x10012150
@@ -52,6 +54,7 @@ public:
// FUNCTION: BETA10 0x100733a0
LegoTreeNode** GetChildren() { return m_children; }
// FUNCTION: BETA10 0x10073720
void SetChildren(LegoTreeNode** p_children) { m_children = p_children; }
// SYNTHETIC: LEGO1 0x10099d80
@@ -73,7 +76,9 @@ public:
// FUNCTION: BETA10 0x100121b0
LegoTreeNode* GetRoot() { return m_root; }
// FUNCTION: BETA10 0x10073750
void SetRoot(LegoTreeNode* p_root) { m_root = p_root; }
virtual LegoResult Read(LegoStorage* p_storage); // vtable+0x04
virtual LegoResult Write(LegoStorage* p_storage); // vtable+0x08