diff --git a/include/functions.h b/include/functions.h index d33f385181..69216ed574 100644 --- a/include/functions.h +++ b/include/functions.h @@ -398,10 +398,10 @@ Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx); s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u16 (*unkFunc1)(GlobalContext*, Actor*), s16 (*unkFunc2)(GlobalContext*, Actor*)); s16 func_800347E8(s16 arg0); -void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, - SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha); -void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, - SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha); +void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, + PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha); +void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, + PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha); void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* arg1, s32 arg2); void Actor_Noop(Actor* actor, GlobalContext* globalCtx); void Gfx_DrawDListOpa(GlobalContext* globalCtx, u32 dlist); @@ -1137,24 +1137,19 @@ 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_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex); -void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex); -void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor); -void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor); +void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex); +void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex); +void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor); +void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor); s16 SkelAnime_GetFrameCount(GenericAnimationHeader* animationSeg); -Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx); -Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx); +Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx); +Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx); void SkelAnime_InterpolateVec3s(s32, Vec3s*, Vec3s*, Vec3s*, f32); void SkelAnime_AnimationCtxReset(AnimationContext* animationCtx); void func_800A32F4(GlobalContext* globalCtx); @@ -1168,8 +1163,8 @@ void SkelAnime_LoadAnimationType4(GlobalContext* globalCtx, s32 vecCount, Vec3s* void SkelAnime_LoadAnimationType5(GlobalContext* globalCtx, Actor* actor, SkelAnime* skelAnime, f32 arg3); void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx); void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, Vec3s* arg6, - s32 limbBufCount); + LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* limbDrawTable, + Vec3s* arg6, s32 limbBufCount); void func_800A3B8C(SkelAnime* skelAnime); s32 func_800A3BC0(GlobalContext* globalCtx, SkelAnime* skelAnime); void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime); @@ -1192,15 +1187,15 @@ void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetion void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame); void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, - Vec3s* actorDrawTable); + Vec3s* limbDrawTable); void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, Vec3s* arg7); s32 func_800A4530(SkelAnime* skelAnime, f32 arg1); void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - AnimationHeader* animationseg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount); + AnimationHeader* animationseg, Vec3s* limbDrawTable, Vec3s* arg5, s32 limbCount); void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - AnimationHeader* animationseg, Vec3s* actorDrawTable, Vec3s* arg5, s32 limbCount); + AnimationHeader* animationseg, Vec3s* limbDrawTable, Vec3s* arg5, s32 limbCount); void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, AnimationHeader* animationseg); s32 SkelAnime_FrameUpdateMatrix(SkelAnime* skelAnime); diff --git a/include/z64animation.h b/include/z64animation.h index 598c25b362..9a63dc7db5 100755 --- a/include/z64animation.h +++ b/include/z64animation.h @@ -160,7 +160,7 @@ struct SkelAnime { /* 0x14 */ f32 totalFrames; /* 0x18 */ f32 animCurrentFrame; /* 0x1C */ f32 animPlaybackSpeed; - /* 0x20 */ Vec3s* actorDrawTbl; // now_joint + /* 0x20 */ Vec3s* limbDrawTbl; // now_joint /* 0x24 */ Vec3s* transitionDrawTbl; // morf_joint /* 0x28 */ f32 transCurrentFrame; /* 0x2C */ f32 transitionStep; @@ -172,16 +172,16 @@ struct SkelAnime { /* 0x3E */ Vec3s unk_3E; }; // size = 0x44 -typedef s32 (*SkelAnime_LimbUpdateMatrix)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, +typedef s32 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, struct Actor* actor); -typedef void (*SkelAnime_LimbAppendDlist)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, +typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, struct Actor* actor); -typedef s32 (*SkelAnime_LimbUpdateMatrix2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, +typedef s32 (*OverrideLimbDraw2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, struct Actor* actor, Gfx** gfx); -typedef void (*SkelAnime_LimbAppendDlist2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, +typedef void (*PostLimbDraw2)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, struct Actor* actor, Gfx** gfx); typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryType*); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index dd4822943c..89b7e3e526 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3869,8 +3869,8 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx) { #pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_80034B54.s") #endif -void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, - SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) { +void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, + PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Gfx* dispRefs[4]; @@ -3883,14 +3883,14 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_Lim gDPPipeSync(gfxCtx->polyOpa.p++); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx)); - gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, - skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p); + gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + overrideLimbDraw, postLimbDraw, actor, gfxCtx->polyOpa.p); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8860); } -void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1, - SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) { +void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw2 overrideLimbDraw, + PostLimbDraw2 postLimbDraw, Actor* actor, s16 alpha) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Gfx* dispRefs[4]; @@ -3902,8 +3902,8 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_Lim gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx)); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, - skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p); + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + overrideLimbDraw, postLimbDraw, actor, gfxCtx->polyXlu.p); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 8904); } diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 36a5c8a858..afb142a8c7 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -28,9 +28,8 @@ u32 D_801600B0; /* * Draws the limb at `limbIndex` with a level of detail display lists index by `dListIndex` */ -void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) { +void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -43,14 +42,14 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; pos.z = limbEntry->translation.z; dList = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { do { @@ -64,20 +63,20 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex); } Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 821); @@ -86,9 +85,8 @@ void SkelAnime_LodDrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk /* * Draws the Skeleton described by `skeleton` with a level of detail display list indexed by `dListIndex` */ -void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) { +void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList; @@ -108,14 +106,14 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable->x; - pos.y = actorDrawTable->y; - pos.z = actorDrawTable->z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList = limbEntry->displayLists[dListIndex]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 881), G_MTX_LOAD); @@ -123,13 +121,13 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto gSPDisplayList(gfxCtx->polyOpa.p++, dList); } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList, &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList, &rot, actor); } if (limbEntry->firstChildIndex != 0xFF) { - SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex); + SkelAnime_LodDrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex); } Matrix_Pull(); @@ -140,9 +138,9 @@ void SkelAnime_LodDraw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto * Draws the limb at `limbIndex` with a level of detail display lists index by `dListIndex`, Limb matrices come * from a dynamic allocation from the graph arena. */ -void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex, Mtx** mtx) { +void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex, + Mtx** mtx) { SkelLimbEntry* limbEntry; Gfx* dList[2]; Vec3f pos; @@ -155,7 +153,7 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; @@ -164,7 +162,7 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* dList[0] = limbEntry->displayLists[dListIndex]; dList[1] = dList[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 945); @@ -179,19 +177,19 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* (*mtx)++; } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex, mtx); + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex, mtx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex, mtx); + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex, mtx); } } @@ -200,9 +198,8 @@ void SkelAnime_LodDrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* * Matricies for the limbs are dynamically allocted from the graph arena. The dynamic allocation occurs * because the Skeleton is too large to be supported by the normal matrix stack. */ -void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, s32 dListIndex) { +void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s32 dListIndex) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList[2]; @@ -226,16 +223,16 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* ac Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable->x; - pos.y = actorDrawTable->y; - pos.z = actorDrawTable->z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList[0] = limbEntry->displayLists[dListIndex]; dList[1] = dList[0]; - if ((updateMtxFunc == 0) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == 0) || (overrideLimbDraw(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1033); @@ -248,12 +245,12 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* ac } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, dListIndex, &mtx); + SkelAnime_LodDrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, dListIndex, &mtx); } Matrix_Pull(); @@ -264,9 +261,8 @@ void SkelAnime_LodDrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* ac /* * Draws the limb of the Skeleton `skeleton` at `limbIndex` */ -void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor) { +void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -281,13 +277,13 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; pos.z = limbEntry->translation.z; dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { do { @@ -300,27 +296,27 @@ void SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skele } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor); + SkelAnime_DrawLimb(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor); + SkelAnime_DrawLimb(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, postLimbDraw, + actor); } Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1121); } -void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, Actor* actor) { +void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor) { SkelLimbEntry* rootLimb; char pad[4]; Gfx* dList; @@ -342,14 +338,14 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDr Matrix_Push(); rootLimb = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable[0].x; - pos.y = actorDrawTable[0].y; - pos.z = actorDrawTable[0].z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList = rootLimb->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1176), @@ -358,13 +354,13 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDr } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList, &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList, &rot, actor); } if (rootLimb->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor); + SkelAnime_DrawLimb(globalCtx, rootLimb->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor); } Matrix_Pull(); @@ -372,9 +368,9 @@ void SkelAnime_Draw(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDr Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1190); } -void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor, Mtx** limbMatricies) { +void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, + Mtx** limbMatricies) { SkelLimbEntry* limbEntry; Gfx* dList[2]; Vec3f pos; @@ -388,7 +384,7 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; @@ -397,7 +393,7 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske dList[0] = limbEntry->displayLists[0]; dList[1] = dList[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(*limbMatricies, "../z_skelanime.c", 1242); @@ -410,28 +406,27 @@ void SkelAnime_DrawLimbSV(GlobalContext* globalCtx, s32 limbIndex, Skeleton* ske } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList[0], &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, limbMatricies); + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, limbMatricies); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, limbMatricies); + SkelAnime_DrawLimbSV(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, limbMatricies); } Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_skelanime.c", 1265); } -void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix updateMtxFunc, SkelAnime_LimbAppendDlist appendDlistFunc, - Actor* actor) { +void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList[2]; @@ -460,16 +455,16 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actor limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable->x; - pos.y = actorDrawTable->y; - pos.z = actorDrawTable->z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList[0] = limbEntry->displayLists[0]; dList[1] = dList[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList[1], &pos, &rot, actor) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList[1] != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1327); @@ -484,13 +479,13 @@ void SkelAnime_DrawSV(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actor } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList[0], &rot, actor); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList[0], &rot, actor); } if (limbEntry->firstChildIndex != LIMB_DONE) { - SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, &mtx); + SkelAnime_DrawLimbSV(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, &mtx); } Matrix_Pull(); @@ -547,9 +542,8 @@ s16 SkelAnime_GetFrameCount(GenericAnimationHeader* animationSeg) { * Draws the Skeleton `skeleton`'s limb at index `limbIndex`. Appends all generated graphics commands to * `gfx`. Returns a pointer to the next gfx to be appended to. */ -Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) { +Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList; Vec3f pos; @@ -560,7 +554,7 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skel limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; @@ -568,7 +562,7 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skel dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1489), G_MTX_LOAD); @@ -576,20 +570,20 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skel } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList, &rot, actor, &gfx); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, gfx); } return gfx; @@ -599,9 +593,8 @@ Gfx* SkelAnime_Draw2Limb(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skel * Draws the Skeleton `skeleton` Appends all generated graphics to `gfx`, and returns a pointer to the * next gfx to be appended to. */ -Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) { +Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList; @@ -619,15 +612,15 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorD limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable->x; - pos.y = actorDrawTable->y; - pos.z = actorDrawTable->z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList != NULL) { gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_skelanime.c", 1558), G_MTX_LOAD); @@ -635,13 +628,13 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorD } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList, &rot, actor, &gfx); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, gfx); + gfx = SkelAnime_Draw2Limb(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, gfx); } Matrix_Pull(); @@ -649,9 +642,9 @@ Gfx* SkelAnime_Draw2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorD return gfx; } -Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* actorDrawTable, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Mtx** mtx, Gfx* gfx) { +Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* skeleton, Vec3s* limbDrawTable, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Mtx** mtx, + Gfx* gfx) { SkelLimbEntry* limbEntry; Gfx* dList1; Gfx* dList2; @@ -663,14 +656,14 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[limbIndex]); limbIndex++; - rot = actorDrawTable[limbIndex]; + rot = limbDrawTable[limbIndex]; pos.x = limbEntry->translation.x; pos.y = limbEntry->translation.y; pos.z = limbEntry->translation.z; dList1 = dList2 = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, limbIndex, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList1 != NULL) { Matrix_ToMtx(*mtx, "../z_skelanime.c", 1623); @@ -684,19 +677,19 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk } } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, limbIndex, &dList2, &rot, actor, &gfx); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, limbIndex, &dList2, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, mtx, gfx); } Matrix_Pull(); if (limbEntry->nextLimbIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->nextLimbIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, mtx, gfx); } return gfx; @@ -706,9 +699,8 @@ Gfx* SkelAnime_DrawLimbSV2(GlobalContext* globalCtx, s32 limbIndex, Skeleton* sk * Draws the Skeleton `skeleton` Appends all generated graphics to `gfx`, and returns a pointer to the * next gfx to be appended to. Allocates matricies for display lists on the graph heap. */ -Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* actorDrawTable, s32 dListCount, - SkelAnime_LimbUpdateMatrix2 updateMtxFunc, SkelAnime_LimbAppendDlist2 appendDlistFunc, - Actor* actor, Gfx* gfx) { +Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, + OverrideLimbDraw2 overrideLimbDraw, PostLimbDraw2 postLimbDraw, Actor* actor, Gfx* gfx) { SkelLimbEntry* limbEntry; char pad[4]; Gfx* dList1; @@ -730,15 +722,15 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto Matrix_Push(); limbEntry = SEGMENTED_TO_VIRTUAL(skeleton->limbs[0]); - pos.x = actorDrawTable->x; - pos.y = actorDrawTable->y; - pos.z = actorDrawTable->z; + pos.x = limbDrawTable[0].x; + pos.y = limbDrawTable[0].y; + pos.z = limbDrawTable[0].z; - rot = actorDrawTable[1]; + rot = limbDrawTable[1]; dList1 = dList2 = limbEntry->displayLists[0]; - if ((updateMtxFunc == NULL) || (updateMtxFunc(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) { + if ((overrideLimbDraw == NULL) || (overrideLimbDraw(globalCtx, 1, &dList1, &pos, &rot, actor, &gfx) == 0)) { Matrix_TranslateThenRotateZYX(&pos, &rot); if (dList1 != NULL) { Matrix_ToMtx(mtx, "../z_skelanime.c", 1710); @@ -752,12 +744,12 @@ Gfx* SkelAnime_DrawSV2(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* acto } } } - if (appendDlistFunc != NULL) { - appendDlistFunc(globalCtx, 1, &dList2, &rot, actor, &gfx); + if (postLimbDraw != NULL) { + postLimbDraw(globalCtx, 1, &dList2, &rot, actor, &gfx); } if (limbEntry->firstChildIndex != LIMB_DONE) { - gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, actorDrawTable, updateMtxFunc, - appendDlistFunc, actor, &mtx, gfx); + gfx = SkelAnime_DrawLimbSV2(globalCtx, limbEntry->firstChildIndex, skeleton, limbDrawTable, overrideLimbDraw, + postLimbDraw, actor, &mtx, gfx); } Matrix_Pull(); @@ -1055,7 +1047,7 @@ void func_800A390C(GlobalContext* globalCtx, AnimationContext* animationCtx) { } void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* actorDrawTbl, + LinkAnimetionEntry* linkAnimetionEntrySeg, s32 flags, Vec3s* limbDrawTbl, Vec3s* transitionDrawTbl, s32 limbBufCount) { char pad[8]; SkeletonHeader* skeletonHeader; @@ -1085,19 +1077,19 @@ void SkelAnime_InitLinkAnimetion(GlobalContext* globalCtx, SkelAnime* skelAnime, allocSize += 2; } - if (actorDrawTbl == NULL) { - skelAnime->actorDrawTbl = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2364); + if (limbDrawTbl == NULL) { + skelAnime->limbDrawTbl = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2364); skelAnime->transitionDrawTbl = ZeldaArena_MallocDebug(allocSize, "../z_skelanime.c", 2365); } else { if (limbBufCount != limbCount) { __assert("joint_buff_num == joint_num", "../z_skelanime.c", 2369); } - skelAnime->actorDrawTbl = (Vec3s*)ALIGN16((u32)actorDrawTbl); + skelAnime->limbDrawTbl = (Vec3s*)ALIGN16((u32)limbDrawTbl); skelAnime->transitionDrawTbl = (Vec3s*)ALIGN16((u32)transitionDrawTbl); } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { + if ((skelAnime->limbDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error @@ -1130,7 +1122,7 @@ s32 func_800A3BE4(GlobalContext* globalCtx, SkelAnime* skelAnime) { func_800A3B8C(skelAnime); } - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->transitionDrawTbl, + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, 1.0f - (skelAnime->transCurrentFrame / prevUnk28)); return 0; } @@ -1139,7 +1131,7 @@ void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { f32 updateRate; SkelAnime_LoadLinkAnimetion(globalCtx, skelAnime->linkAnimetionSeg, skelAnime->animCurrentFrame, - skelAnime->limbCount, skelAnime->actorDrawTbl); + skelAnime->limbCount, skelAnime->limbDrawTbl); if (skelAnime->transCurrentFrame != 0) { updateRate = R_UPDATE_RATE * 0.5f; skelAnime->transCurrentFrame -= skelAnime->transitionStep * updateRate; @@ -1147,7 +1139,7 @@ void func_800A3C9C(GlobalContext* globalCtx, SkelAnime* skelAnime) { skelAnime->transCurrentFrame = 0.0f; return; } - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, skelAnime->transCurrentFrame); } } @@ -1199,7 +1191,7 @@ void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, Li ((linkAnimetionEntrySeg != skelAnime->linkAnimetionSeg) || (frame != skelAnime->animCurrentFrame))) { if (transitionRate < 0) { func_800A3B8C(skelAnime); - SkelAnime_CopyVec3s(skelAnime, skelAnime->transitionDrawTbl, skelAnime->actorDrawTbl); + SkelAnime_CopyVec3s(skelAnime, skelAnime->transitionDrawTbl, skelAnime->limbDrawTbl); transitionRate = -transitionRate; } else { skelAnime->animUpdate = &func_800A3BE4; @@ -1211,7 +1203,7 @@ void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, Li } else { func_800A3B8C(skelAnime); SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + skelAnime->limbDrawTbl); skelAnime->transCurrentFrame = 0.0f; } @@ -1249,13 +1241,11 @@ void SkelAnime_ChangeLinkAnimPlaybackRepeat(GlobalContext* globalCtx, SkelAnime* } void func_800A41FC(GlobalContext* globalCtx, SkelAnime* skelAnime) { - SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->transitionDrawTbl, - skelAnime->actorDrawTbl); + SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->transitionDrawTbl, skelAnime->limbDrawTbl); } void func_800A422C(GlobalContext* globalCtx, SkelAnime* skelAnime) { - SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, - skelAnime->transitionDrawTbl); + SkelAnime_LoadAnimationType1(globalCtx, skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl); } void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, @@ -1267,42 +1257,42 @@ void func_800A425C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetion void func_800A42A0(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 frame) { SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)frame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + skelAnime->limbDrawTbl); } void func_800A42E4(GlobalContext* globalCtx, SkelAnime* skelAnime, f32 frame) { - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->transitionDrawTbl, + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, frame); } void func_800A431C(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, - Vec3s* actorDrawTbl) { - Vec3s* alignedActorDrawTbl; + Vec3s* limbDrawTbl) { + Vec3s* alignedLimbDrawTbl; SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)transitionFrame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + skelAnime->limbDrawTbl); - alignedActorDrawTbl = (Vec3s*)ALIGN16((u32)actorDrawTbl); + alignedLimbDrawTbl = (Vec3s*)ALIGN16((u32)limbDrawTbl); SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg2, (s32)frame, skelAnime->limbCount, - alignedActorDrawTbl); - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->actorDrawTbl, alignedActorDrawTbl, + alignedLimbDrawTbl); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->limbDrawTbl, alignedLimbDrawTbl, transitionRate); } void func_800A43B8(GlobalContext* globalCtx, SkelAnime* skelAnime, LinkAnimetionEntry* linkAnimetionEntrySeg, f32 transitionFrame, LinkAnimetionEntry* linkAnimetionEntrySeg2, f32 frame, f32 transitionRate, - Vec3s* actorDrawTbl) { - Vec3s* alignedActorDrawTbl; + Vec3s* limbDrawTbl) { + Vec3s* alignedLimbDrawTbl; SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg, (s32)transitionFrame, skelAnime->limbCount, skelAnime->transitionDrawTbl); - alignedActorDrawTbl = (Vec3s*)ALIGN16((u32)actorDrawTbl); + alignedLimbDrawTbl = (Vec3s*)ALIGN16((u32)limbDrawTbl); SkelAnime_LoadLinkAnimetion(globalCtx, linkAnimetionEntrySeg2, (s32)frame, skelAnime->limbCount, - alignedActorDrawTbl); - SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->transitionDrawTbl, alignedActorDrawTbl, + alignedLimbDrawTbl); + SkelAnime_LoadAnimationType2(globalCtx, skelAnime->limbCount, skelAnime->transitionDrawTbl, alignedLimbDrawTbl, transitionRate); } @@ -1342,25 +1332,25 @@ s32 func_800A4530(SkelAnime* skelAnime, f32 arg1) { } void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - AnimationHeader* animationSeg, Vec3s* actorDrawTable, Vec3s* transitionDrawTable, s32 limbCount) { + AnimationHeader* animationSeg, Vec3s* limbDrawTbl, Vec3s* transitionDrawTable, s32 limbCount) { SkeletonHeader* skeletonHeader; skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); skelAnime->limbCount = skeletonHeader->limbCount + 1; skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); - if (actorDrawTable == NULL) { - skelAnime->actorDrawTbl = - ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 2968); + if (limbDrawTbl == NULL) { + skelAnime->limbDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->limbDrawTbl), "../z_skelanime.c", 2968); skelAnime->transitionDrawTbl = ZeldaArena_MallocDebug( skelAnime->limbCount * sizeof(*skelAnime->transitionDrawTbl), "../z_skelanime.c", 2969); } else { if (limbCount != skelAnime->limbCount) { __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 2973); } - skelAnime->actorDrawTbl = actorDrawTable; + skelAnime->limbDrawTbl = limbDrawTbl; skelAnime->transitionDrawTbl = transitionDrawTable; } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { + if ((skelAnime->limbDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf("Skeleton_Info2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_ct memory allocation error osSyncPrintf(VT_RST); @@ -1372,7 +1362,7 @@ void SkelAnime_Init(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHead } void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg, - AnimationHeader* animationSeg, Vec3s* actorDrawTable, Vec3s* transitionDrawTable, s32 limbCount) { + AnimationHeader* animationSeg, Vec3s* limbDrawTbl, Vec3s* transitionDrawTable, s32 limbCount) { SkeletonHeader* skeletonHeader; skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); @@ -1380,9 +1370,9 @@ void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHe skelAnime->dListCount = skeletonHeader->dListCount; skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); - if (actorDrawTable == NULL) { - skelAnime->actorDrawTbl = - ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3047); + if (limbDrawTbl == NULL) { + skelAnime->limbDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->limbDrawTbl), "../z_skelanime.c", 3047); skelAnime->transitionDrawTbl = ZeldaArena_MallocDebug( skelAnime->limbCount * sizeof(*skelAnime->transitionDrawTbl), "../z_skelanime.c", 3048); @@ -1390,10 +1380,10 @@ void SkelAnime_InitSV(GlobalContext* globalCtx, SkelAnime* skelAnime, SkeletonHe if (limbCount != skelAnime->limbCount) { __assert("joint_buff_num == this->joint_num", "../z_skelanime.c", 3052); } - skelAnime->actorDrawTbl = actorDrawTable; + skelAnime->limbDrawTbl = limbDrawTbl; skelAnime->transitionDrawTbl = transitionDrawTable; } - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { + if ((skelAnime->limbDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n"); // Skeleton_Info_Rom_SV_ct Memory allocation error @@ -1412,11 +1402,11 @@ void SkelAnime_InitSkin(GlobalContext* globalCtx, SkelAnime* skelAnime, Skeleton skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg); skelAnime->limbCount = skeletonHeader->limbCount + 1; skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->skeletonSeg); - skelAnime->actorDrawTbl = - ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->actorDrawTbl), "../z_skelanime.c", 3120); + skelAnime->limbDrawTbl = + ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->limbDrawTbl), "../z_skelanime.c", 3120); skelAnime->transitionDrawTbl = ZeldaArena_MallocDebug(skelAnime->limbCount * sizeof(*skelAnime->transitionDrawTbl), "../z_skelanime.c", 3121); - if ((skelAnime->actorDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { + if ((skelAnime->limbDrawTbl == NULL) || (skelAnime->transitionDrawTbl == NULL)) { osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf( "Skeleton_Info2_skin2_ct メモリアロケーションエラー\n"); // Skeleton_Info2_skin2_ct Memory allocation error @@ -1453,7 +1443,7 @@ s32 func_800A4A20(SkelAnime* skelAnime) { func_800A49B0(skelAnime); skelAnime->transCurrentFrame = 0.0f; } - SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, + SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, 1.0f - (skelAnime->transCurrentFrame / prevUnk28)); return 0; } @@ -1485,7 +1475,7 @@ s32 func_800A4AD8(SkelAnime* skelAnime) { } else { phi_f2 = 0.0f; } - SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, + SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, 1.0f - phi_f2); return 0; } @@ -1499,7 +1489,7 @@ void func_800A4C58(SkelAnime* skelAnime) { f32 temp_f2; SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, skelAnime->animCurrentFrame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + skelAnime->limbDrawTbl); if (skelAnime->mode & 0x1) { t = (s32)skelAnime->animCurrentFrame; temp_f10 = t; @@ -1509,8 +1499,7 @@ void func_800A4C58(SkelAnime* skelAnime) { t = 0; } SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, t, skelAnime->limbCount, sp38); - SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, sp38, - temp_f2); + SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->limbDrawTbl, sp38, temp_f2); } if (skelAnime->transCurrentFrame != 0) { updateRate = R_UPDATE_RATE * (1.0f / 3.0f); @@ -1519,7 +1508,7 @@ void func_800A4C58(SkelAnime* skelAnime) { skelAnime->transCurrentFrame = 0.0f; return; } - SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->actorDrawTbl, skelAnime->actorDrawTbl, + SkelAnime_InterpolateVec3s(skelAnime->limbCount, skelAnime->limbDrawTbl, skelAnime->limbDrawTbl, skelAnime->transitionDrawTbl, skelAnime->transCurrentFrame); } } @@ -1558,7 +1547,7 @@ s32 func_800A4EE0(SkelAnime* skelAnime) { if (skelAnime->animCurrentFrame == skelAnime->animFrameCount) { SkelAnime_AnimateFrame(skelAnime->animCurrentSeg, (s32)skelAnime->animCurrentFrame, skelAnime->limbCount, - skelAnime->actorDrawTbl); + skelAnime->limbDrawTbl); func_800A4C58(skelAnime); return 1; } @@ -1585,7 +1574,7 @@ void SkelAnime_ChangeAnimImpl(SkelAnime* skelAnime, AnimationHeader* animationSe ((animationSeg != skelAnime->animCurrentSeg) || (frame != skelAnime->animCurrentFrame))) { if (transitionRate < 0) { func_800A49B0(skelAnime); - SkelAnime_CopyVec3s(skelAnime, skelAnime->transitionDrawTbl, skelAnime->actorDrawTbl); + SkelAnime_CopyVec3s(skelAnime, skelAnime->transitionDrawTbl, skelAnime->limbDrawTbl); transitionRate = -transitionRate; } else { if (unk2 != 0) { @@ -1600,7 +1589,7 @@ void SkelAnime_ChangeAnimImpl(SkelAnime* skelAnime, AnimationHeader* animationSe skelAnime->transitionStep = 1.0f / transitionRate; } else { func_800A49B0(skelAnime); - SkelAnime_AnimateFrame(animationSeg, frame, skelAnime->limbCount, skelAnime->actorDrawTbl); + SkelAnime_AnimateFrame(animationSeg, frame, skelAnime->limbCount, skelAnime->limbDrawTbl); skelAnime->transCurrentFrame = 0.0f; } @@ -1699,8 +1688,8 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { pos->x = 0.0f; } else { // `angle` rotation around y axis. - x = skelAnime->actorDrawTbl->x; - z = skelAnime->actorDrawTbl->z; + x = skelAnime->limbDrawTbl->x; + z = skelAnime->limbDrawTbl->z; sin = Math_Sins(angle); cos = Math_Coss(angle); pos->x = x * cos + z * sin; @@ -1715,21 +1704,21 @@ void func_800A54FC(SkelAnime* skelAnime, Vec3f* pos, s16 angle) { } skelAnime->prevFrameRot = angle; - skelAnime->prevFramePos.x = skelAnime->actorDrawTbl->x; - skelAnime->actorDrawTbl->x = skelAnime->unk_3E.x; - skelAnime->prevFramePos.z = skelAnime->actorDrawTbl->z; - skelAnime->actorDrawTbl->z = skelAnime->unk_3E.z; + skelAnime->prevFramePos.x = skelAnime->limbDrawTbl->x; + skelAnime->limbDrawTbl->x = skelAnime->unk_3E.x; + skelAnime->prevFramePos.z = skelAnime->limbDrawTbl->z; + skelAnime->limbDrawTbl->z = skelAnime->unk_3E.z; if (skelAnime->flags & ANIM_FLAG_UPDATEXZ) { if (skelAnime->flags & ANIM_FLAG_UPDATEY) { pos->y = 0.0f; } else { - pos->y = skelAnime->actorDrawTbl->y - skelAnime->prevFramePos.y; + pos->y = skelAnime->limbDrawTbl->y - skelAnime->prevFramePos.y; } - skelAnime->prevFramePos.y = skelAnime->actorDrawTbl->y; - skelAnime->actorDrawTbl->y = skelAnime->unk_3E.y; + skelAnime->prevFramePos.y = skelAnime->limbDrawTbl->y; + skelAnime->limbDrawTbl->y = skelAnime->unk_3E.y; } else { pos->y = 0.0f; - skelAnime->prevFramePos.y = skelAnime->actorDrawTbl->y; + skelAnime->prevFramePos.y = skelAnime->limbDrawTbl->y; } skelAnime->flags &= ~ANIM_FLAG_UPDATEY; } @@ -1739,8 +1728,8 @@ s32 func_800A56C8(SkelAnime* skelAnime, f32 arg1) { } void SkelAnime_Free(SkelAnime* skelAnime, GlobalContext* globalCtx) { - if (skelAnime->actorDrawTbl != NULL) { - ZeldaArena_FreeDebug(skelAnime->actorDrawTbl, "../z_skelanime.c", 3729); + if (skelAnime->limbDrawTbl != NULL) { + ZeldaArena_FreeDebug(skelAnime->limbDrawTbl, "../z_skelanime.c", 3729); } else { osSyncPrintf("now_joint あきまへん!!\n"); // now_joint Akimane! ! } diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 5abdba9e61..3baf97a8fa 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -342,7 +342,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8)); gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9)); - SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, + SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 8bd205480c..378e66b93a 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -23,8 +23,8 @@ void func_809B0994(EnAni* this, GlobalContext* globalCtx); void func_809B0A28(EnAni* this, GlobalContext* globalCtx); void func_809B0A6C(EnAni* this, GlobalContext* globalCtx); void EnAni_Update(EnAni* this, GlobalContext* globalCtx); -s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni); -void EnAni_LimbAppendDList(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni); +s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni); +void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni); void EnAni_Draw(EnAni* this, GlobalContext* globalCtx); extern SkeletonHeader D_060000F0; @@ -73,7 +73,7 @@ void EnAni_Init(EnAni* this, GlobalContext* globalCtx) { anim = &D_060076EC; Actor_ProcessInitChain(&this->actor, initChain); ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawFunc_Circle, 36.0f); - SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, anim, this->actorDrawTable, this->transitionDrawTable, + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, anim, this->limbDrawTable, this->transitionDrawTable, 0x10); SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, anim); ActorCollider_AllocCylinder(globalCtx, &this->collider); @@ -297,7 +297,7 @@ void EnAni_Update(EnAni* this, GlobalContext* globalCtx) { } } -s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni) { +s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni) { EnAni* temp; temp = enAni; @@ -308,7 +308,7 @@ s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve return 0; } -void EnAni_LimbAppendDList(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni) { +void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni) { if (limbIndex == 15) { Matrix_MultVec3f(&EnAniVec, &enAni->actor.posRot2.pos); } @@ -328,7 +328,7 @@ void EnAni_Draw(EnAni* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(temp[this->unk_2AC])); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, - EnAni_UpdateMtxFunc, EnAni_LimbAppendDList, &this->actor); + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, + EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, &this->actor); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ani.c", 736); } diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.h b/src/overlays/actors/ovl_En_Ani/z_en_ani.h index f19cbc4911..c690d89571 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.h +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.h @@ -8,7 +8,7 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderCylinderMain collider; /* 0x0198 */ SkelAnime skelAnime; - /* 0x01DC */ Vec3s actorDrawTable[16]; + /* 0x01DC */ Vec3s limbDrawTable[16]; /* 0x023C */ Vec3s transitionDrawTable[16]; /* 0x029C */ Vec3s unk_29C; /* 0x02A2 */ Vec3s unk_2A2; diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index a48c8e7c06..dd7b67efd1 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -144,5 +144,5 @@ void EnBird_Update(EnBird* this, GlobalContext* globalCtx) { } void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) { - SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, 0, NULL, NULL); + SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, 0, NULL, NULL); } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index b9fc98a70f..eea273209c 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -462,7 +462,7 @@ void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g, colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, EnDog_Callback1, EnDog_Callback2, &this->actor); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_dog.c", 994); } diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 2f368bb98b..fb3a533648 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -52,7 +52,7 @@ void EnDs_Init(EnDs* this, GlobalContext* globalCtx) { SkelAnime* skelAnime = &this->skelAnime; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f); - SkelAnime_InitSV(globalCtx, skelAnime, &D_06004768, &D_0600039C, &this->actorDrawTable, &this->unk_1B4, 6); + SkelAnime_InitSV(globalCtx, skelAnime, &D_06004768, &D_0600039C, &this->limbDrawTable, &this->unk_1B4, 6); SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, &D_0600039C); this->actor.sub_98.mass = 0xFF; @@ -286,6 +286,6 @@ void func_809FDA7C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* void EnDs_Draw(EnDs* this, GlobalContext* globalCtx) { func_800943C8(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, &func_809FDA38, &func_809FDA7C, this); } diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.h b/src/overlays/actors/ovl_En_Ds/z_en_ds.h index 7a1f4e9c9e..63caa72e6f 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.h +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.h @@ -7,7 +7,7 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; - /* 0x0190 */ Vec3s actorDrawTable; + /* 0x0190 */ Vec3s limbDrawTable; /* 0x0196 */ char unk_194[0x1E]; /* 0x01B4 */ Vec3s unk_1B4; /* 0x01BA */ char unk_1B8[0x1E]; diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index c212a360e0..1e2e5d4042 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -176,6 +176,6 @@ void EnMs_Update(EnMs* this, GlobalContext* globalCtx) { void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, - NULL, NULL, &this->actor); + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, NULL, + NULL, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 23a1868a66..ecda80c5a7 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -477,7 +477,7 @@ void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) { void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) { SkelAnime* skelAnime = &this->skelAnime; - if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) { + if (skelAnime->unk_3E.y < skelAnime->limbDrawTbl[0].y) { skelAnime->flags |= 3; SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f); } @@ -486,9 +486,9 @@ void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) { void func_80AEB738(EnRu1* this, GlobalContext* globalCtx) { SkelAnime* skelAnime = &this->skelAnime; - skelAnime->unk_3E = *skelAnime->actorDrawTbl; - skelAnime->prevFramePos = *skelAnime->actorDrawTbl; - if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) { + skelAnime->unk_3E = *skelAnime->limbDrawTbl; + skelAnime->prevFramePos = *skelAnime->limbDrawTbl; + if (skelAnime->unk_3E.y < skelAnime->limbDrawTbl[0].y) { skelAnime->flags |= 3; SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f); } @@ -2252,7 +2252,7 @@ void EnRu1_Init(EnRu1* this, GlobalContext* globalCtx) { u32 temp_ret; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); - SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06012700, NULL, &this->actorDrawTable, &this->transitionDrawTable, + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06012700, NULL, &this->limbDrawTable, &this->transitionDrawTable, 17); func_80AEAD20(this, globalCtx); switch (func_80AEADF0(this)) { @@ -2352,9 +2352,8 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); - gfxCtx->polyOpa.p = - SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, func_80AF02E8, - func_80AF0368, &this->actor, gfxCtx->polyOpa.p); + gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + func_80AF02E8, func_80AF0368, &this->actor, gfxCtx->polyOpa.p); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309); } @@ -2378,8 +2377,8 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2A8); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, - skelAnime->dListCount, func_80AF02E8, NULL, &this->actor, gfxCtx->polyXlu.p); + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + func_80AF02E8, NULL, &this->actor, gfxCtx->polyXlu.p); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353); } diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h index 4f00f09006..581cdedecf 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h @@ -10,7 +10,7 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; - /* 0x0190 */ Vec3s actorDrawTable[17]; + /* 0x0190 */ Vec3s limbDrawTable[17]; /* 0x01F6 */ Vec3s transitionDrawTable[17]; /* 0x025C */ s16 unk_25C; /* 0x025E */ char unk_25E[0x2]; diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index a8415dcaf9..002dcca43e 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -479,8 +479,8 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2B4); gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]); - gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, - skelAnime->dListCount, NULL, NULL, NULL, gfxCtx->polyXlu.p); + gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, + NULL, NULL, NULL, gfxCtx->polyXlu.p); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291); } @@ -757,7 +757,8 @@ void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) { void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); func_80AF2550(this, globalCtx); - SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->actorDrawTable, &this->transitionDrawTable, 23); + SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->limbDrawTable, &this->transitionDrawTable, + 23); switch (func_80AF26A0(this)) { case 2: @@ -797,7 +798,7 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF); gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]); - SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, + SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2.c", 663); } diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h index 88b25e1e7c..01e67ae106 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h @@ -7,7 +7,7 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; - /* 0x0190 */ Vec3s actorDrawTable[23]; + /* 0x0190 */ Vec3s limbDrawTable[23]; /* 0x021A */ Vec3s transitionDrawTable[23]; /* 0x02A4 */ s16 unk_2A4; /* 0x02A6 */ s16 unk_2A6; diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.h b/src/overlays/actors/ovl_En_Test/z_en_test.h index fe5cc2d6a1..61ca04a16d 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.h +++ b/src/overlays/actors/ovl_En_Test/z_en_test.h @@ -8,10 +8,10 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ char unk_14C[0x03C]; /* 0x0188 */ SkelAnime skelAnime_188; - /* 0x01CC */ Vec3s actorDrawTbl_1CC[61]; + /* 0x01CC */ Vec3s limbDrawTable_1CC[61]; /* 0x033A */ Vec3s transitionTbl_16E[61]; /* 0x04A8 */ SkelAnime skelAnime_4A8; - /* 0x04EC */ Vec3s actorDrawTbl_4EC[61]; + /* 0x04EC */ Vec3s limbDrawTable_4EC[61]; /* 0x065A */ Vec3s transitionTbl_65A[61]; /* 0x07C8 */ char unk_7C8[0x160]; } EnTest; // size = 0x0928 diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 85c4e7fcb4..0ea3c3220d 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -759,7 +759,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) { gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx])); - SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.actorDrawTbl, + SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.limbDrawTbl, thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor); Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 3b838e45fa..700123ee57 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -629,7 +629,7 @@ void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) { if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) { func_80093D18(globalCtx->state.gfxCtx); - SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, + SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, &EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor); }