This commit is contained in:
angie
2022-11-19 15:30:57 -03:00
parent 03dc3908b6
commit 9dfdfe0b14
7 changed files with 53 additions and 41 deletions
+1
View File
@@ -27,6 +27,7 @@
#include "sys_matrix.h"
#include "z64actor.h"
#include "z64animation.h"
#include "z64animation_legacy.h"
#include "z64audio.h"
#include "z64bgcheck.h"
#include "z64camera.h"
+1 -25
View File
@@ -11,10 +11,7 @@ struct Actor;
struct SkelAnime;
struct PlayerAnimationFrame;
#define LINK_ANIMETION_OFFSET(addr, offset) \
(SEGMENT_ROM_START(link_animetion) + ((uintptr_t)addr & 0xFFFFFF) + ((u32)offset))
#define LIMB_DONE 0xFF
#define ANIMATION_ENTRY_MAX 50
#define ANIM_FLAG_1 (1 << 0)
#define ANIM_FLAG_UPDATEY (1 << 1)
@@ -82,22 +79,6 @@ typedef struct {
/* 0xC */ u16 staticIndexMax;
} AnimationHeader; // size = 0x10
typedef struct {
/* 0x00 */ s16 xMax;
/* 0x02 */ s16 x;
/* 0x04 */ s16 yMax;
/* 0x06 */ s16 y;
/* 0x08 */ s16 zMax;
/* 0x10 */ s16 z;
} JointKey; // size = 0x12
typedef struct {
/* 0x0 */ s16 frameCount;
/* 0x2 */ s16 limbCount;
/* 0x4 */ s16* frameData;
/* 0x8 */ JointKey* jointKey;
} LegacyAnimationHeader; // size = 0xC
typedef enum {
/* 0 */ ANIMATION_LINKANIMETION,
/* 1 */ ANIMENTRY_COPYALL,
@@ -166,7 +147,7 @@ typedef struct {
typedef struct AnimationContext {
/* 0x000 */ s16 animationCount;
/* 0x004 */ AnimationEntry entries[ANIMATION_ENTRY_MAX];
/* 0x004 */ AnimationEntry entries[50];
} AnimationContext; // size = 0xC84
typedef struct {
@@ -331,11 +312,6 @@ s16 Animation_GetLastFrame(void* animation);
Gfx* SkelAnime_Draw(struct PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, struct Actor* actor, Gfx* gfx);
Gfx* SkelAnime_DrawFlex(struct PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, struct Actor* actor, Gfx* gfx);
s16 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Vec3s* frameTable);
s16 Animation_GetLimbCount2(LegacyAnimationHeader* animation);
s16 Animation_GetLength2(LegacyAnimationHeader* animation);
s16 Animation_GetLastFrame2(LegacyAnimationHeader* animation);
void AnimationContext_Reset(AnimationContext* animationCtx);
void AnimationContext_SetNextQueue(struct PlayState* play);
void AnimationContext_DisableQueue(struct PlayState* play);
+36
View File
@@ -0,0 +1,36 @@
#ifndef Z64_ANIMATION_LEGACY_H
#define Z64_ANIMATION_LEGACY_H
#include "ultra64.h"
#include "z64math.h"
typedef struct LegacyLimb {
/* 0x00 */ Gfx* dList;
/* 0x04 */ Vec3f trans;
/* 0x10 */ Vec3s rot;
/* 0x18 */ struct LegacyLimb* sibling;
/* 0x1C */ struct LegacyLimb* child;
} LegacyLimb; // size = 0x20
typedef struct {
/* 0x00 */ s16 xMax;
/* 0x02 */ s16 x;
/* 0x04 */ s16 yMax;
/* 0x06 */ s16 y;
/* 0x08 */ s16 zMax;
/* 0x10 */ s16 z;
} LegacyJointKey; // size = 0x12
typedef struct {
/* 0x0 */ s16 frameCount;
/* 0x2 */ s16 limbCount;
/* 0x4 */ s16* frameData;
/* 0x8 */ LegacyJointKey* jointKey;
} LegacyAnimationHeader; // size = 0xC
s16 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Vec3s* frameTable);
s16 Animation_GetLimbCountLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLengthLegacy(LegacyAnimationHeader* animation);
s16 Animation_GetLastFrameLegacy(LegacyAnimationHeader* animation);
#endif