mirror of
https://github.com/zeldaret/oot
synced 2026-07-11 15:18:59 -04:00
Docs for the Anime part of SkelAnime (#517)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * more names * so many names * we got subsystems now * slight cleanup * merge part 2 * new naming scheme * slight adjustment * no limit * syms maybe * step one * OK, it's fixed * table * some names and such * comments** * update zap * gitkeep to please jenkins * ZAP * fixer * fixer2 * fixer3 * zap Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
+72
-69
@@ -1160,7 +1160,7 @@ s32 Player_ActionToExplosive(Player* player, s32 actionParam);
|
||||
s32 Player_GetExplosiveHeld(Player* player);
|
||||
s32 func_8008F2BC(Player* player, s32 actionParam);
|
||||
s32 func_8008F2F8(GlobalContext* globalCtx);
|
||||
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* this);
|
||||
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
|
||||
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
|
||||
@@ -1261,84 +1261,87 @@ s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd);
|
||||
void func_80098CBC(GlobalContext* globalCtx, u8* nbTransitionActors);
|
||||
void func_800994A0(GlobalContext* globalCtx);
|
||||
void Scene_Draw(GlobalContext* globalCtx);
|
||||
void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable,
|
||||
void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg, s32 dListIndex);
|
||||
void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount,
|
||||
void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg,
|
||||
s32 dListIndex);
|
||||
void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable,
|
||||
void SkelAnime_DrawOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
|
||||
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount,
|
||||
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
|
||||
s16 SkelAnime_GetTotalFrames(void* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount(void* animationSeg);
|
||||
s16 func_800A2DBC(void* animationSeg);
|
||||
s16 SkelAnime_GetTotalFrames2(void* animationSeg);
|
||||
s16 SkelAnime_GetFrameCount2(void* animationSeg);
|
||||
Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, OverrideLimbDraw overrideLimbDraw,
|
||||
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);
|
||||
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* limbDrawTable, s32 dListCount,
|
||||
Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
|
||||
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* arg, Gfx* gfx);
|
||||
void SkelAnime_InterpolateVec3s(s32, Vec3s*, Vec3s*, Vec3s*, f32);
|
||||
void SkelAnime_AnimationCtxReset(AnimationContext* animationCtx);
|
||||
void func_800A32F4(GlobalContext* globalCtx);
|
||||
void func_800A3310(GlobalContext* globalCtx);
|
||||
void SkelAnime_LoadLinkAnimation(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
|
||||
Vec3s* drawTbl);
|
||||
void SkelAnime_LoadAnimationType1(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
|
||||
void SkelAnime_LoadAnimationType2(GlobalContext* globalCtx, s32 limbCount, Vec3s* arg2, Vec3s* arg3, f32 arg4);
|
||||
void SkelAnime_LoadAnimationType3(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void SkelAnime_LoadAnimationType4(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void SkelAnime_LoadAnimationType5(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
|
||||
void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx);
|
||||
void SkelAnime_InitLinkAnimation(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
|
||||
LinkAnimationHeader* segment, s32 flags, Vec3s* limbDrawTable,
|
||||
Vec3s* transitionDrawTbl, s32 limbBufCount);
|
||||
void func_800A3B8C(SkelAnime* skelAnime);
|
||||
s32 func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void SkelAnime_SetTransition(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 transitionRate);
|
||||
void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
|
||||
f32 playbackSpeed, f32 frame, f32 frameCount, u8 arg6, f32 transitionRate);
|
||||
void SkelAnime_ChangeLinkAnimDefaultStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackStop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
|
||||
f32 playbackSpeed);
|
||||
void SkelAnime_ChangeLinkAnimDefaultRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime,
|
||||
LinkAnimationHeader* segment);
|
||||
void SkelAnime_ChangeLinkAnimPlaybackRepeat(GlobalContext* globalCtx, SkelAnime* skelAnime,
|
||||
LinkAnimationHeader* segment, f32 playbackSpeed);
|
||||
void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
|
||||
void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
|
||||
void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
|
||||
void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 transitionFrame,
|
||||
LinkAnimationHeader* linkAnimSeg2, f32 frame, f32 transitionRate, Vec3s* limbDrawTable);
|
||||
void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 transitionFrame,
|
||||
LinkAnimationHeader* linkAnimSeg2, f32 frame, f32 transitionRate, Vec3s* arg7);
|
||||
s32 func_800A4530(SkelAnime* skelAnime, f32 arg1);
|
||||
void SkelAnime_InterpVec3s(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight);
|
||||
void AnimationContext_Reset(AnimationContext* animationCtx);
|
||||
void AnimationContext_SetNextQueue(GlobalContext* globalCtx);
|
||||
void AnimationContext_DisableQueue(GlobalContext* globalCtx);
|
||||
void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
|
||||
Vec3s* frameTable);
|
||||
void AnimationContext_SetCopyAll(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src);
|
||||
void AnimationContext_SetInterp(GlobalContext* globalCtx, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
|
||||
void AnimationContext_SetCopyTrue(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
|
||||
void AnimationContext_SetCopyFalse(GlobalContext* globalCtx, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
|
||||
void AnimationContext_SetMoveActor(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3);
|
||||
void AnimationContext_Update(GlobalContext* globalCtx, AnimationContext* animationCtx);
|
||||
void SkelAnime_InitLink(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
|
||||
LinkAnimationHeader* segment, s32 initFlags, Vec3s* jointTable, Vec3s* morphTable,
|
||||
s32 limbCount);
|
||||
void LinkAnimation_SetUpdateFunction(SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_Update(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void LinkAnimation_AnimateFrame(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void Animation_SetMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 morphFrames);
|
||||
void LinkAnimation_Change(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 playSpeed,
|
||||
f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames);
|
||||
void LinkAnimation_PlayOnce(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment);
|
||||
void LinkAnimation_PlayOnceSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
|
||||
f32 playSpeed);
|
||||
void LinkAnimation_PlayLoop(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment);
|
||||
void LinkAnimation_PlayLoopSetSpeed(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment,
|
||||
f32 playSpeed);
|
||||
void LinkAnimation_CopyJointToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void LinkAnimation_CopyMorphToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime);
|
||||
void LinkAnimation_LoadToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
|
||||
void LinkAnimation_LoadToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment, f32 frame);
|
||||
void LinkAnimation_InterpJointMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame);
|
||||
void LinkAnimation_BlendToJoint(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment1,
|
||||
f32 frame1, LinkAnimationHeader* segment2, f32 frame2, f32 weight, Vec3s* blendTable);
|
||||
void LinkAnimation_BlendToMorph(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimationHeader* segment1,
|
||||
f32 frame1, LinkAnimationHeader* segment2, f32 frame2, f32 weight, Vec3s* blendTable);
|
||||
void LinkAnimation_EndLoop(SkelAnime* skelAnime);
|
||||
s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame);
|
||||
s32 SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animationseg, Vec3s* limbDrawTable, Vec3s* arg5, s32 limbCount);
|
||||
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
s32 SkelAnime_InitFlex(GlobalContext* globalCtx, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animationseg, Vec3s* limbDrawTable, Vec3s* arg5, s32 limbCount);
|
||||
void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animationseg);
|
||||
s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime);
|
||||
void SkelAnime_ChangeAnimImpl(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed, f32 frame,
|
||||
f32 frameCount, u8 unk1, f32 transitionRate, s8 unk2);
|
||||
void SkelAnime_ChangeAnim(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed, f32 frame,
|
||||
f32 frameCount, u8 mode, f32 transitionRate);
|
||||
void SkelAnime_ChangeAnimDefaultStop(SkelAnime* skelAnime, AnimationHeader* animationseg);
|
||||
void SkelAnime_ChangeAnimTransitionStop(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 transitionRate);
|
||||
void SkelAnime_ChangeAnimPlaybackStop(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed);
|
||||
void SkelAnime_ChangeAnimDefaultRepeat(SkelAnime* skelAnime, AnimationHeader* animationseg);
|
||||
void SkelAnime_ChangeAnimTransitionRepeat(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 transitionRate);
|
||||
void SkelAnime_ChangeAnimPlaybackRepeat(SkelAnime* skelAnime, AnimationHeader* animationseg, f32 playbackSpeed);
|
||||
void SkelAnime_AnimReverse(SkelAnime* skelAnime);
|
||||
void func_800A5428(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* index);
|
||||
void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
|
||||
s32 func_800A56C8(SkelAnime* skelAnime, f32 arg1);
|
||||
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
|
||||
s32 SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
|
||||
AnimationHeader* animation);
|
||||
s32 SkelAnime_Update(SkelAnime* skelAnime);
|
||||
void Animation_ChangeImpl(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
|
||||
u8 mode, f32 morphFrames, s8 taper);
|
||||
void Animation_Change(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame,
|
||||
u8 mode, f32 morphFrames);
|
||||
void Animation_PlayOnce(SkelAnime* skelAnime, AnimationHeader* animation);
|
||||
void Animation_MorphToPlayOnce(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
|
||||
void Animation_PlayOnceSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
|
||||
void Animation_PlayLoop(SkelAnime* skelAnime, AnimationHeader* animation);
|
||||
void Animation_MorphToLoop(SkelAnime* skelAnime, AnimationHeader* animation, f32 morphFrames);
|
||||
void Animation_PlayLoopSetSpeed(SkelAnime* skelAnime, AnimationHeader* animation, f32 playSpeed);
|
||||
void Animation_EndLoop(SkelAnime* skelAnime);
|
||||
void Animation_Reverse(SkelAnime* skelAnime);
|
||||
void SkelAnime_CopyVec3sTrue(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlags);
|
||||
void SkelAnime_CopyVec3sFalse(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src, u8* copyFlag);
|
||||
void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* pos, s16 angle);
|
||||
s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame);
|
||||
void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx);
|
||||
void SkelAnime_CopyVec3s(SkelAnime* skelAnime, Vec3s* dst, Vec3s* src);
|
||||
void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx* arg3, Vec3f* arg4);
|
||||
void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3);
|
||||
void func_800A5E28(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3, s32 arg4);
|
||||
|
||||
+104
-83
@@ -14,8 +14,23 @@ struct SkelAnime;
|
||||
(((u32)&_link_animetionSegmentRomStart) + ((u32)addr) - ((u32)&link_animetion_segment) + ((u32)offset))
|
||||
#define LIMB_DONE 0xFF
|
||||
#define ANIMATION_ENTRY_MAX 50
|
||||
#define ANIM_FLAG_UPDATEXZ (1 << 1)
|
||||
#define ANIM_FLAG_UPDATEY (1 << 4)
|
||||
#define ANIM_FLAG_UPDATEY (1 << 1)
|
||||
#define ANIM_FLAG_NOMOVE (1 << 4)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ANIMMODE_LOOP,
|
||||
/* 1 */ ANIMMODE_LOOP_INTERP,
|
||||
/* 2 */ ANIMMODE_ONCE,
|
||||
/* 3 */ ANIMMODE_ONCE_INTERP,
|
||||
/* 4 */ ANIMMODE_LOOP_PARTIAL,
|
||||
/* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP
|
||||
} AnimationModes;
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ ANIMTAPER_DECEL = -1,
|
||||
/* 0 */ ANIMTAPER_NONE,
|
||||
/* 1 */ ANIMTAPER_ACCEL
|
||||
} AnimationTapers;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s jointPos; // Root is position in model space, children are relative to parent
|
||||
@@ -51,22 +66,46 @@ typedef struct {
|
||||
/* 0x08 */ u8 dListCount;
|
||||
} FlexSkeletonHeader; // size = 0xC
|
||||
|
||||
// Index into the frame data table.
|
||||
typedef struct {
|
||||
s16 frameCount;
|
||||
s16 unk_02;
|
||||
} GenericAnimationHeader; // size = 0x4
|
||||
/* 0x00 */ u16 x;
|
||||
/* 0x02 */ u16 y;
|
||||
/* 0x04 */ u16 z;
|
||||
} JointIndex; // size = 0x06
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ GenericAnimationHeader genericHeader;
|
||||
/* 0x04 */ u32 rotationValueSeg; // "tbl"
|
||||
/* 0x08 */ u32 rotationIndexSeg; // "ref_tbl"
|
||||
/* 0x0C */ u16 limit;
|
||||
/* 0x00 */ s16 frameCount;
|
||||
} AnimationHeaderCommon;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ u32 segment;
|
||||
} LinkAnimationHeader; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ AnimationHeaderCommon common;
|
||||
/* 0x04 */ s16* frameData; // "tbl"
|
||||
/* 0x08 */ JointIndex* jointIndices; // "ref_tbl"
|
||||
/* 0x0C */ u16 staticIndexMax;
|
||||
} AnimationHeader; // size = 0x10
|
||||
|
||||
// Unused
|
||||
typedef struct {
|
||||
GenericAnimationHeader genericHeader;
|
||||
u32 segment;
|
||||
} LinkAnimationHeader; // size = 0x8
|
||||
/* 0x00 */ s16 xMax;
|
||||
/* 0x02 */ s16 x;
|
||||
/* 0x04 */ s16 yMax;
|
||||
/* 0x06 */ s16 y;
|
||||
/* 0x08 */ s16 zMax;
|
||||
/* 0x10 */ s16 z;
|
||||
} JointKey; // size = 0x12
|
||||
|
||||
// Unused
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 frameCount;
|
||||
/* 0x02 */ s16 limbCount;
|
||||
/* 0x04 */ s16* frameData;
|
||||
/* 0x08 */ JointKey* jointKey;
|
||||
} AnimationHeader2; // size = 0xC
|
||||
|
||||
typedef s32 (*OverrideLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void*);
|
||||
@@ -76,96 +115,78 @@ typedef void (*PostLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex,
|
||||
typedef s32 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
void*, Gfx** gfx);
|
||||
|
||||
typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*,
|
||||
Gfx** gfx);
|
||||
|
||||
typedef s16 AnimationRotationValue;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 x;
|
||||
/* 0x02 */ u16 y;
|
||||
/* 0x04 */ u16 z;
|
||||
} AnimationRotationIndex; // size = 0x06
|
||||
typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*, Gfx** gfx);
|
||||
|
||||
typedef enum {
|
||||
ANIMATION_LINK,
|
||||
ANIMATION_TYPE1,
|
||||
ANIMATION_TYPE2,
|
||||
ANIMATION_TYPE3,
|
||||
ANIMATION_TYPE4,
|
||||
ANIMATION_TYPE5
|
||||
ANIMENTRY_LOADFRAME,
|
||||
ANIMENTRY_COPYALL,
|
||||
ANIMENTRY_INTERP,
|
||||
ANIMENTRY_COPYTRUE,
|
||||
ANIMENTRY_COPYFALSE,
|
||||
ANIMENTRY_MOVEACTOR
|
||||
} AnimationType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ DmaRequest req;
|
||||
/* 0x020 */ OSMesgQueue msgQueue;
|
||||
/* 0x038 */ OSMesg msg;
|
||||
} AnimationEntryType0;
|
||||
} AnimEntryLoadFrame; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk_00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
} AnimationEntryType1;
|
||||
} AnimEntryCopyAll; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk_00;
|
||||
/* 0x001 */ u8 limbCount;
|
||||
/* 0x004 */ Vec3s* unk_04;
|
||||
/* 0x008 */ Vec3s* unk_08;
|
||||
/* 0x00C */ f32 unk_0C;
|
||||
} AnimationEntryType2;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* base;
|
||||
/* 0x008 */ Vec3s* mod;
|
||||
/* 0x00C */ f32 weight;
|
||||
} AnimEntryInterp; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk_00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
/* 0x00C */ u8* index;
|
||||
} AnimationEntryType3;
|
||||
/* 0x00C */ u8* copyFlag;
|
||||
} AnimEntryCopyTrue; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u8 unk_00;
|
||||
/* 0x000 */ u8 queueFlag;
|
||||
/* 0x001 */ u8 vecCount;
|
||||
/* 0x002 */ char unk_02[0x2];
|
||||
/* 0x004 */ Vec3s* dst;
|
||||
/* 0x008 */ Vec3s* src;
|
||||
/* 0x00C */ u8* index;
|
||||
} AnimationEntryType4;
|
||||
/* 0x00C */ u8* copyFlag;
|
||||
} AnimEntryCopyFalse; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ struct Actor* actor;
|
||||
/* 0x004 */ struct SkelAnime* skelAnime;
|
||||
/* 0x008 */ f32 unk_08;
|
||||
} AnimationEntryType5;
|
||||
|
||||
typedef struct {
|
||||
/* 0x004 */ char raw[0x3C];
|
||||
} AnimationEntryRaw;
|
||||
} AnimEntryMoveActor; // size = 0xC
|
||||
|
||||
typedef union {
|
||||
AnimationEntryRaw data;
|
||||
AnimationEntryType0 type0;
|
||||
AnimationEntryType1 type1;
|
||||
AnimationEntryType2 type2;
|
||||
AnimationEntryType3 type3;
|
||||
AnimationEntryType4 type4;
|
||||
AnimationEntryType5 type5;
|
||||
} AnimationEntryData;
|
||||
AnimEntryLoadFrame load;
|
||||
AnimEntryCopyAll copy;
|
||||
AnimEntryInterp interp;
|
||||
AnimEntryCopyTrue copy1;
|
||||
AnimEntryCopyFalse copy0;
|
||||
AnimEntryMoveActor move;
|
||||
} AnimationEntryData; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 type;
|
||||
/* 0x01 */ u8 unk_01;
|
||||
/* 0x02 */ char unk_02[2];
|
||||
/* 0x04 */ AnimationEntryData data;
|
||||
} AnimationEntry; // size = 0x40
|
||||
|
||||
typedef struct AnimationContext {
|
||||
s16 animationCount;
|
||||
char unk_02[2];
|
||||
AnimationEntry entries[ANIMATION_ENTRY_MAX];
|
||||
} AnimationContext;
|
||||
} AnimationContext; // size = 0xC84
|
||||
|
||||
typedef void (*AnimationEntryCallback)(struct GlobalContext* globalCtx, AnimationEntryData* data);
|
||||
|
||||
@@ -217,30 +238,30 @@ typedef struct {
|
||||
typedef s32 (*OverrideCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
typedef void (*PostCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
|
||||
typedef s32 (*AnimationUpdateFunc)();
|
||||
typedef s32 (*AnimUpdateFunc)();
|
||||
|
||||
typedef struct SkelAnime {
|
||||
/* 0x00 */ u8 limbCount; // "joint_Num"
|
||||
/* 0x01 */ u8 mode; // 0/1 repeat animation, 2/3 stop animation, >= 4 starts on frame 0 and plays once
|
||||
/* 0x02 */ u8 dListCount;
|
||||
/* 0x03 */ s8 unk_03;
|
||||
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb or SkinLimb.
|
||||
/* 0x08 */ void* animation; // Can be an AnimationHeader or LinkAnimationHeader.
|
||||
/* 0x0C */ f32 initialFrame;
|
||||
/* 0x10 */ f32 animFrameCount;
|
||||
/* 0x14 */ f32 totalFrames;
|
||||
/* 0x18 */ f32 animCurrentFrame;
|
||||
/* 0x1C */ f32 animPlaybackSpeed;
|
||||
/* 0x20 */ Vec3s* limbDrawTbl; // "now_joint"
|
||||
/* 0x24 */ Vec3s* transitionDrawTbl; // "morf_joint"
|
||||
/* 0x28 */ f32 transCurrentFrame;
|
||||
/* 0x2C */ f32 transitionStep;
|
||||
/* 0x30 */ AnimationUpdateFunc update;
|
||||
/* 0x34 */ s8 initFlags;
|
||||
/* 0x35 */ u8 flags;
|
||||
/* 0x36 */ s16 prevFrameRot;
|
||||
/* 0x38 */ Vec3s prevFramePos;
|
||||
/* 0x3E */ Vec3s unk_3E;
|
||||
/* 0x00 */ u8 limbCount; // Number of limbs in the skeleton
|
||||
/* 0x01 */ u8 mode; // 0: loop, 2: play once, 4: partial loop. +1 to interpolate between frames.
|
||||
/* 0x02 */ u8 dListCount; // Number of display lists in a flexible skeleton
|
||||
/* 0x03 */ s8 taper; // Tapering to use when morphing between animations. Only used by Door_Warp1.
|
||||
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb.
|
||||
/* 0x08 */ void* animation; // Can be an AnimationHeader or LinkAnimationHeader.
|
||||
/* 0x0C */ f32 startFrame; // In mode 4, start of partial loop.
|
||||
/* 0x10 */ f32 endFrame; // In mode 2, Update returns true when curFrame is equal to this. In mode 4, end of partial loop.
|
||||
/* 0x14 */ f32 animLength; // Total number of frames in the current animation's file.
|
||||
/* 0x18 */ f32 curFrame; // Current frame in the animation
|
||||
/* 0x1C */ f32 playSpeed; // Multiplied by R_UPDATE_RATE / 3 to get the animation's frame rate.
|
||||
/* 0x20 */ Vec3s* jointTable; // Current translation of model and rotations of all limbs
|
||||
/* 0x24 */ Vec3s* morphTable; // Table of values used to morph between animations
|
||||
/* 0x28 */ f32 morphWeight; // Weight of the current animation morph as a fraction in [0,1]
|
||||
/* 0x2C */ f32 morphRate; // Reciprocal of the number of frames in the morph
|
||||
/* 0x30 */ s32 (*update)(); // Can be Loop, Partial loop, Play once, Morph, or Tapered morph. Link only has Loop, Play once, and Morph
|
||||
/* 0x34 */ s8 initFlags; // Flags used when initializing Link's skeleton
|
||||
/* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
|
||||
/* 0x36 */ s16 prevRot; // Previous rotation in worldspace.
|
||||
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
|
||||
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
|
||||
} SkelAnime; // size = 0x44
|
||||
|
||||
typedef struct {
|
||||
|
||||
+5
-5
@@ -227,9 +227,9 @@ typedef struct Player {
|
||||
/* 0x01AC */ OSMesg giObjectLoadMsg;
|
||||
/* 0x01B0 */ void* giObjectSegment; // also used for title card textures
|
||||
/* 0x01B4 */ SkelAnime skelAnime;
|
||||
/* 0x01F8 */ Vec3s limbDrawTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0288 */ Vec3s transitionDrawTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0318 */ Vec3s unk_318[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x01F8 */ Vec3s jointTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0288 */ Vec3s morphTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0318 */ Vec3s blendTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x03A8 */ s16 unk_3A8[2];
|
||||
/* 0x03AC */ Actor* heldActor;
|
||||
/* 0x03B0 */ Vec3f leftHandPos;
|
||||
@@ -296,8 +296,8 @@ typedef struct Player {
|
||||
/* 0x06C2 */ s16 unk_6C2;
|
||||
/* 0x06C4 */ f32 unk_6C4;
|
||||
/* 0x06C8 */ SkelAnime skelAnime2;
|
||||
/* 0x070C */ Vec3s limbDrawTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x079C */ Vec3s transitionDrawTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x070C */ Vec3s jointTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x079C */ Vec3s morphTable2[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x082C */ PlayerFunc82C func_82C;
|
||||
/* 0x0830 */ f32 unk_830;
|
||||
/* 0x0834 */ s16 unk_834;
|
||||
|
||||
Reference in New Issue
Block a user