more DMA i missed

This commit is contained in:
angie 2023-03-28 13:22:05 -03:00
parent 1d2626514c
commit 6c0ca44f45
5 changed files with 21 additions and 21 deletions

View File

@ -323,7 +323,7 @@ void AnimationContext_SetCopyFalse(struct PlayState* play, s32 vecCount, Vec3s*
void AnimationContext_SetMoveActor(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 arg3); void AnimationContext_SetMoveActor(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 arg3);
void AnimationContext_Update(struct PlayState* play, AnimationContext* animationCtx); void AnimationContext_Update(struct PlayState* play, AnimationContext* animationCtx);
void SkelAnime_InitPlayer(struct PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, DmaAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, s32 limbBufCount); void SkelAnime_InitDma(struct PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, DmaAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, s32 limbBufCount);
void DmaAnimation_SetUpdateFunction(SkelAnime* skelAnime); void DmaAnimation_SetUpdateFunction(SkelAnime* skelAnime);
s32 DmaAnimation_Update(struct PlayState* play, SkelAnime* skelAnime); s32 DmaAnimation_Update(struct PlayState* play, SkelAnime* skelAnime);
void Animation_SetMorph(struct PlayState* play, SkelAnime* skelAnime, f32 morphFrames); void Animation_SetMorph(struct PlayState* play, SkelAnime* skelAnime, f32 morphFrames);

View File

@ -999,7 +999,7 @@ AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, Animat
(SEGMENT_ROM_START(link_animetion) + ((uintptr_t)addr & 0xFFFFFF) + ((u32)offset)) (SEGMENT_ROM_START(link_animetion) + ((uintptr_t)addr & 0xFFFFFF) + ((u32)offset))
/** /**
* Requests loading frame data from the Player animation into frameTable * Requests loading frame data from the DMA animation into frameTable
*/ */
void AnimationContext_SetLoadFrame(PlayState* play, DmaAnimationHeader* animation, s32 frame, s32 limbCount, void AnimationContext_SetLoadFrame(PlayState* play, DmaAnimationHeader* animation, s32 frame, s32 limbCount,
Vec3s* frameTable) { Vec3s* frameTable) {
@ -1198,9 +1198,9 @@ void AnimationContext_Update(PlayState* play, AnimationContext* animationCtx) {
* Initializes a skeleton to be used with DMA animations to a looping animation, dynamically allocating the frame * Initializes a skeleton to be used with DMA animations to a looping animation, dynamically allocating the frame
* tables if not given. * tables if not given.
*/ */
void SkelAnime_InitPlayer(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, void SkelAnime_InitDma(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
DmaAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, DmaAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer,
s32 limbBufCount) { s32 limbBufCount) {
FlexSkeletonHeader* skeletonHeader; FlexSkeletonHeader* skeletonHeader;
s32 headerJointCount; s32 headerJointCount;
s32 limbCount; s32 limbCount;
@ -1225,7 +1225,7 @@ void SkelAnime_InitPlayer(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHea
allocSize = sizeof(Vec3s) * limbCount; allocSize = sizeof(Vec3s) * limbCount;
if (flags & 8) { if (flags & 8) {
allocSize += 2; allocSize += sizeof(u16);
} }
if (jointTableBuffer == NULL) { if (jointTableBuffer == NULL) {
@ -1252,7 +1252,7 @@ void DmaAnimation_SetUpdateFunction(SkelAnime* skelAnime) {
} }
/** /**
* Advances the current Player animation and updates all frame tables. If the animation plays once, returns true when it * Advances the current DMA animation and updates all frame tables. If the animation plays once, returns true when it
* finishes. * finishes.
*/ */
s32 DmaAnimation_Update(PlayState* play, SkelAnime* skelAnime) { s32 DmaAnimation_Update(PlayState* play, SkelAnime* skelAnime) {
@ -1278,7 +1278,7 @@ s32 DmaAnimation_Morph(PlayState* play, SkelAnime* skelAnime) {
} }
/** /**
* Requests a load of the next frame of a Player animation, advances the morph, and requests an interpolation between * Requests a load of the next frame of a DMA animation, advances the morph, and requests an interpolation between
* jointTable and morphTable * jointTable and morphTable
*/ */
void DmaAnimation_AnimateFrame(PlayState* play, SkelAnime* skelAnime) { void DmaAnimation_AnimateFrame(PlayState* play, SkelAnime* skelAnime) {
@ -1297,7 +1297,7 @@ void DmaAnimation_AnimateFrame(PlayState* play, SkelAnime* skelAnime) {
} }
/** /**
* Advances a Player animation that loops over its full length * Advances a DMA animation that loops over its full length
*/ */
s32 DmaAnimation_Loop(PlayState* play, SkelAnime* skelAnime) { s32 DmaAnimation_Loop(PlayState* play, SkelAnime* skelAnime) {
f32 updateRate = (s32)play->state.framerateDivisor * 0.5f; f32 updateRate = (s32)play->state.framerateDivisor * 0.5f;
@ -1313,7 +1313,7 @@ s32 DmaAnimation_Loop(PlayState* play, SkelAnime* skelAnime) {
} }
/** /**
* Advances a Player animation that stops at endFrame and returns true when it is reached. * Advances a DMA animation that stops at endFrame and returns true when it is reached.
*/ */
s32 DmaAnimation_Once(PlayState* play, SkelAnime* skelAnime) { s32 DmaAnimation_Once(PlayState* play, SkelAnime* skelAnime) {
f32 updateRate = (s32)play->state.framerateDivisor * 0.5f; f32 updateRate = (s32)play->state.framerateDivisor * 0.5f;
@ -1347,7 +1347,7 @@ void Animation_SetMorph(PlayState* play, SkelAnime* skelAnime, f32 morphFrames)
} }
/** /**
* General way to set a new Player animation, allowing choice of playback speed, start frame, end frame, play mode, and * General way to set a new DMA animation, allowing choice of playback speed, start frame, end frame, play mode, and
* number of transition frames. Positive morph frames morph from the current pose to the start pose of the new * number of transition frames. Positive morph frames morph from the current pose to the start pose of the new
* animation, then start the new animation. Negative morph frames start the new animation immediately, modified by the * animation, then start the new animation. Negative morph frames start the new animation immediately, modified by the
* pose immediately before the animation change. * pose immediately before the animation change.
@ -1382,7 +1382,7 @@ void DmaAnimation_Change(PlayState* play, SkelAnime* skelAnime, DmaAnimationHead
} }
/** /**
* Immediately changes to a Player animation that plays once at the default speed. * Immediately changes to a DMA animation that plays once at the default speed.
*/ */
void DmaAnimation_PlayOnce(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation) { void DmaAnimation_PlayOnce(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation) {
DmaAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(&animation->common), DmaAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(&animation->common),
@ -1390,7 +1390,7 @@ void DmaAnimation_PlayOnce(PlayState* play, SkelAnime* skelAnime, DmaAnimationHe
} }
/** /**
* Immediately changes to a Player animation that plays once at the specified speed. * Immediately changes to a DMA animation that plays once at the specified speed.
*/ */
void DmaAnimation_PlayOnceSetSpeed(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, void DmaAnimation_PlayOnceSetSpeed(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation,
f32 playSpeed) { f32 playSpeed) {
@ -1399,7 +1399,7 @@ void DmaAnimation_PlayOnceSetSpeed(PlayState* play, SkelAnime* skelAnime, DmaAni
} }
/** /**
* Immediately changes to a Player animation that loops at the default speed. * Immediately changes to a DMA animation that loops at the default speed.
*/ */
void DmaAnimation_PlayLoop(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation) { void DmaAnimation_PlayLoop(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation) {
DmaAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(&animation->common), DmaAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(&animation->common),
@ -1407,7 +1407,7 @@ void DmaAnimation_PlayLoop(PlayState* play, SkelAnime* skelAnime, DmaAnimationHe
} }
/** /**
* Immediately changes to a Player animation that loops at the specified speed. * Immediately changes to a DMA animation that loops at the specified speed.
*/ */
void DmaAnimation_PlayLoopSetSpeed(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, void DmaAnimation_PlayLoopSetSpeed(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation,
f32 playSpeed) { f32 playSpeed) {
@ -1430,14 +1430,14 @@ void DmaAnimation_CopyMorphToJoint(PlayState* play, SkelAnime* skelAnime) {
} }
/** /**
* Requests loading frame data from the Player animation into morphTable * Requests loading frame data from the DMA animation into morphTable
*/ */
void DmaAnimation_LoadToMorph(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, f32 frame) { void DmaAnimation_LoadToMorph(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, f32 frame) {
AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->morphTable); AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->morphTable);
} }
/** /**
* Requests loading frame data from the Player animation into jointTable * Requests loading frame data from the DMA animation into jointTable
*/ */
void DmaAnimation_LoadToJoint(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, f32 frame) { void DmaAnimation_LoadToJoint(PlayState* play, SkelAnime* skelAnime, DmaAnimationHeader* animation, f32 frame) {
AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->jointTable); AnimationContext_SetLoadFrame(play, animation, (s32)frame, skelAnime->limbCount, skelAnime->jointTable);
@ -1516,7 +1516,7 @@ s32 Animation_OnFrameImpl(SkelAnime* skelAnime, f32 frame, f32 updateRate) {
} }
/** /**
* Checks if the current Player animation has reached the specified frame * Checks if the current DMA animation has reached the specified frame
*/ */
s32 DmaAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) { s32 DmaAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
f32 updateRate = gFramerateDivisorHalf; f32 updateRate = gFramerateDivisorHalf;

View File

@ -2558,7 +2558,7 @@
0x80135DB8:("AnimationContext_CopyFalse",), 0x80135DB8:("AnimationContext_CopyFalse",),
0x80135E3C:("AnimationContext_MoveActor",), 0x80135E3C:("AnimationContext_MoveActor",),
0x80135EE8:("AnimationContext_Update",), 0x80135EE8:("AnimationContext_Update",),
0x80135F88:("SkelAnime_InitPlayer",), 0x80135F88:("SkelAnime_InitDma",),
0x801360A8:("DmaAnimation_SetUpdateFunction",), 0x801360A8:("DmaAnimation_SetUpdateFunction",),
0x801360E0:("DmaAnimation_Update",), 0x801360E0:("DmaAnimation_Update",),
0x80136104:("DmaAnimation_Morph",), 0x80136104:("DmaAnimation_Morph",),

View File

@ -193,7 +193,7 @@ wordReplace = {
"SkelAnime_AnimationType4Loaded": "AnimationContext_CopyFalse", "SkelAnime_AnimationType4Loaded": "AnimationContext_CopyFalse",
"SkelAnime_AnimationType5Loaded": "AnimationContext_MoveActor", "SkelAnime_AnimationType5Loaded": "AnimationContext_MoveActor",
"func_80135EE8": "AnimationContext_Update", "func_80135EE8": "AnimationContext_Update",
"SkelAnime_InitLink": "SkelAnime_InitPlayer", "SkelAnime_InitLink": "SkelAnime_InitDma",
"LinkAnimation_SetUpdateFunction": "DmaAnimation_SetUpdateFunction", "LinkAnimation_SetUpdateFunction": "DmaAnimation_SetUpdateFunction",
"LinkAnimation_Update": "DmaAnimation_Update", "LinkAnimation_Update": "DmaAnimation_Update",
"SkelAnime_SetTransition": "Animation_SetMorph", "SkelAnime_SetTransition": "Animation_SetMorph",

View File

@ -2072,7 +2072,7 @@ asm/non_matchings/code/z_skelanime/AnimationContext_CopyTrue.s,AnimationContext_
asm/non_matchings/code/z_skelanime/AnimationContext_CopyFalse.s,AnimationContext_CopyFalse,0x80135DB8,0x21 asm/non_matchings/code/z_skelanime/AnimationContext_CopyFalse.s,AnimationContext_CopyFalse,0x80135DB8,0x21
asm/non_matchings/code/z_skelanime/AnimationContext_MoveActor.s,AnimationContext_MoveActor,0x80135E3C,0x2B asm/non_matchings/code/z_skelanime/AnimationContext_MoveActor.s,AnimationContext_MoveActor,0x80135E3C,0x2B
asm/non_matchings/code/z_skelanime/AnimationContext_Update.s,AnimationContext_Update,0x80135EE8,0x28 asm/non_matchings/code/z_skelanime/AnimationContext_Update.s,AnimationContext_Update,0x80135EE8,0x28
asm/non_matchings/code/z_skelanime/SkelAnime_InitPlayerAnimetion.s,SkelAnime_InitPlayerAnimetion,0x80135F88,0x48 asm/non_matchings/code/z_skelanime/SkelAnime_InitDmaAnimetion.s,SkelAnime_InitDmaAnimetion,0x80135F88,0x48
asm/non_matchings/code/z_skelanime/DmaAnimation_SetUpdateFunction.s,DmaAnimation_SetUpdateFunction,0x801360A8,0xE asm/non_matchings/code/z_skelanime/DmaAnimation_SetUpdateFunction.s,DmaAnimation_SetUpdateFunction,0x801360A8,0xE
asm/non_matchings/code/z_skelanime/DmaAnimation_Update.s,DmaAnimation_Update,0x801360E0,0x9 asm/non_matchings/code/z_skelanime/DmaAnimation_Update.s,DmaAnimation_Update,0x801360E0,0x9
asm/non_matchings/code/z_skelanime/DmaAnimation_Morph.s,DmaAnimation_Morph,0x80136104,0x2E asm/non_matchings/code/z_skelanime/DmaAnimation_Morph.s,DmaAnimation_Morph,0x80136104,0x2E

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2072 asm/non_matchings/code/z_skelanime/AnimationContext_CopyFalse.s AnimationContext_CopyFalse 0x80135DB8 0x21
2073 asm/non_matchings/code/z_skelanime/AnimationContext_MoveActor.s AnimationContext_MoveActor 0x80135E3C 0x2B
2074 asm/non_matchings/code/z_skelanime/AnimationContext_Update.s AnimationContext_Update 0x80135EE8 0x28
2075 asm/non_matchings/code/z_skelanime/SkelAnime_InitPlayerAnimetion.s asm/non_matchings/code/z_skelanime/SkelAnime_InitDmaAnimetion.s SkelAnime_InitPlayerAnimetion SkelAnime_InitDmaAnimetion 0x80135F88 0x48
2076 asm/non_matchings/code/z_skelanime/DmaAnimation_SetUpdateFunction.s DmaAnimation_SetUpdateFunction 0x801360A8 0xE
2077 asm/non_matchings/code/z_skelanime/DmaAnimation_Update.s DmaAnimation_Update 0x801360E0 0x9
2078 asm/non_matchings/code/z_skelanime/DmaAnimation_Morph.s DmaAnimation_Morph 0x80136104 0x2E