Implement AnimState (#1042)

* Implement LegoAnim

* fix: minor issues

* fix ncc complaints

* refactor: address review comments

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2024-06-21 20:41:01 +02:00
committed by GitHub
parent 1d666f62e5
commit c9c130eb87
4 changed files with 102 additions and 41 deletions

View File

@@ -71,22 +71,23 @@ public:
MxBool SetFlag() override; // vtable+0x18
MxResult Serialize(LegoFile* p_file) override; // vtable+0x1c
void FUN_100651d0(MxU32, AnimInfo*, MxU32&);
void FUN_10065240(MxU32, AnimInfo*, MxU32);
void CopyToAnims(MxU32, AnimInfo* p_anims, MxU32& p_outExtraCharacterId);
void InitFromAnims(MxU32 p_animsLength, AnimInfo* p_anims, MxU32 p_extraCharacterId);
// SYNTHETIC: LEGO1 0x10065130
// AnimState::`scalar deleting destructor'
private:
undefined4 m_unk0x08; // 0x08
MxU32 m_extraCharacterId; // 0x08
// appears to store the length of m_unk0x10
undefined4 m_unk0x0c; // 0x0c
// dynamically sized array of two-byte elements
undefined2* m_unk0x10; // 0x10
// appears to store the length of m_unk0x18
undefined4 m_unk0x14; // 0x14
// dynamically sized array of one-byte elements
undefined* m_unk0x18; // 0x18
MxU32 m_unk0x0c; // 0x0c
// dynamically sized array of MxU16, corresponding to AnimInfo::m_unk0x22
MxU16* m_unk0x10; // 0x10
MxU32 m_locationsFlagsLength; // 0x14
// dynamically sized array of bools, corresponding to LegoLocation.m_unk0x5c
MxBool* m_locationsFlags; // 0x18
};
// VTABLE: LEGO1 0x100d8c18

View File

@@ -74,6 +74,7 @@ public:
);
static MxResult UpdateLocation(MxU32 p_location);
static MxResult UpdateLocation(const char* p_location);
static MxS32 GetNumLocations();
static LegoLocation* GetLocation(MxU32 p_location);
inline void SetLinearVel(MxFloat p_linearVel) { m_linearVel = p_linearVel; }