1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +00:00

Add struct LegacyLimb and rename AnimationHeader2 for object_human (#849)

* Add LegacyLimb and rename AnimationHeader2

* Simplify SkelAnime_GetFrameDataLegacy

* Minor fixes

* Move LegacyLimb with the rest of the limbs
This commit is contained in:
Anghelo Carvajal 2021-06-14 14:12:34 -04:00 committed by GitHub
parent d399c3deb6
commit a4c606c522
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 56 deletions

View file

@ -1209,9 +1209,10 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
s16 Animation_GetLength(void* animation);
s16 Animation_GetLastFrame(void* animation);
s16 Animation_GetLimbCount2(AnimationHeader2* animation);
s16 Animation_GetLength2(AnimationHeader2* animation);
s16 Animation_GetLastFrame2(AnimationHeader2* animation);
s32 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Vec3s* frameTable);
s16 Animation_GetLimbCountLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLengthLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLastFrameLegacy(LegacyAnimationHeader* animation);
Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,

View file

@ -54,6 +54,14 @@ typedef struct {
/* 0x0C */ void* segment; // Segment address of data. Currently unclear what.
} SkinLimb; // size = 0x10
typedef struct LegacyLimb {
/* 0x000 */ Gfx* dList;
/* 0x004 */ Vec3f trans;
/* 0x010 */ Vec3s rot;
/* 0x018 */ struct LegacyLimb* sibling;
/* 0x01C */ struct LegacyLimb* child;
} LegacyLimb; // size = 0x20
// Model has limbs with only rigid meshes
typedef struct {
/* 0x00 */ void** segment;
@ -96,8 +104,8 @@ typedef struct {
/* 0x04 */ s16 yMax;
/* 0x06 */ s16 y;
/* 0x08 */ s16 zMax;
/* 0x10 */ s16 z;
} JointKey; // size = 0x12
/* 0x0A */ s16 z;
} JointKey; // size = 0x0C
// Unused
typedef struct {
@ -105,7 +113,7 @@ typedef struct {
/* 0x02 */ s16 limbCount;
/* 0x04 */ s16* frameData;
/* 0x08 */ JointKey* jointKey;
} AnimationHeader2; // size = 0xC
} LegacyAnimationHeader; // size = 0xC
typedef s32 (*OverrideLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
void*);
@ -205,13 +213,13 @@ typedef struct {
/* 0x0008 */ s16* copyValues;
/* 0x000C */ s16 unk_0C;
/* 0x000E */ s16 unk_10;
} TransformUpdateIndex; // size 0x10
} TransformUpdateIndex; // size = 0x10
typedef struct {
/* 0x0000 */ u8 firstChildIdx;
/* 0x0001 */ u8 nextLimbIdx;
/* 0x0004 */ Gfx* dList[2];
} SkelCurveLimb; // size >= 0x8
} SkelCurveLimb; // size = 0xC
typedef struct {
/* 0x0000 */ SkelCurveLimb** limbs;
@ -295,7 +303,7 @@ typedef struct {
/* 0x002 */ u16 unk_2;
/* 0x004 */ Struct_800A598C* unk_4;
/* 0x008 */ Gfx* unk_8;
} Struct_800A5E28;
} Struct_800A5E28; // size = 0xC
typedef struct {
/* 0x000 */ u8 unk_0;