summaryrefslogtreecommitdiff
path: root/src/code/c_keyframe.c
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-08-17 12:19:13 -0400
committerGitHub <noreply@github.com>2023-08-17 09:19:13 -0700
commitc65a8dbc3903af19fe0253ab8774accbc06b0cb7 (patch)
tree8c136e0ecea87503261cdd22fc5b81cf31044f50 /src/code/c_keyframe.c
parent1bebc761b638ad061778667e4bab4ec92fe81aa7 (diff)
Game renaming (#63)
* rename GameState to Game * Rename the structs * fix table * whoops * rename play parameter * format * undo what i messed in z64compress
Diffstat (limited to 'src/code/c_keyframe.c')
-rw-r--r--src/code/c_keyframe.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/code/c_keyframe.c b/src/code/c_keyframe.c
index 352eac5..385de5e 100644
--- a/src/code/c_keyframe.c
+++ b/src/code/c_keyframe.c
@@ -529,7 +529,7 @@ s32 cKF_SkeletonInfo_R_play(SkeletonInfoR* skeletonInfo) {
return cKF_FrameControl_play(&skeletonInfo->frameControl);
} else if (skeletonInfo->morphCounter > 0.0f) {
- // A positive morphCounter will wait to play the animation until the morph has finished.
+ // A positive morphCounter will wait to game_play the animation until the morph has finished.
cKF_SkeletonInfo_R_morphJoint(skeletonInfo);
skeletonInfo->morphCounter -= 1.0f;
@@ -539,7 +539,7 @@ s32 cKF_SkeletonInfo_R_play(SkeletonInfoR* skeletonInfo) {
return 0;
} else {
- // A negative morphCounter will play the animation and morph at the same time.
+ // A negative morphCounter will game_play the animation and morph at the same time.
cKF_SkeletonInfo_R_morphJoint(skeletonInfo);
skeletonInfo->morphCounter += 1.0f;
@@ -563,8 +563,8 @@ s32 cKF_SkeletonInfo_R_play(SkeletonInfoR* skeletonInfo) {
*
* @param jointIndex The index of the jointElem to draw.
*/
-void cKF_Si3_draw_SV_R_child(PlayState* play, SkeletonInfoR* skeletonInfo, s32* jointIndex, DrawCallback beforeCallback,
- DrawCallback afterCallback, void* arg, Mtx** mtx) {
+void cKF_Si3_draw_SV_R_child(Game_Play* game_play, SkeletonInfoR* skeletonInfo, s32* jointIndex,
+ DrawCallback beforeCallback, DrawCallback afterCallback, void* arg, Mtx** mtx) {
JointElemR* jointElem = *jointIndex + (JointElemR*)Lib_SegmentedToVirtual(skeletonInfo->skeleton->jointElemTable);
s32 i;
Gfx* newDlist;
@@ -616,14 +616,14 @@ void cKF_Si3_draw_SV_R_child(PlayState* play, SkeletonInfoR* skeletonInfo, s32*
}
}
- OPEN_DISPS(play->state.gfxCtx);
+ OPEN_DISPS(game_play->state.gfxCtx);
Matrix_push();
newDlist = shape = jointElem->shape;
displayBufferFlag = jointElem->displayBufferFlag;
if ((beforeCallback == NULL) ||
- (beforeCallback != NULL && beforeCallback(play, skeletonInfo, *jointIndex, &newDlist, &displayBufferFlag, arg,
- &rotation, &translation) != NULL)) {
+ (beforeCallback != NULL && beforeCallback(game_play, skeletonInfo, *jointIndex, &newDlist, &displayBufferFlag,
+ arg, &rotation, &translation) != NULL)) {
Matrix_softcv3_mult(&translation, &rotation);
if (newDlist != NULL) {
@@ -647,17 +647,18 @@ void cKF_Si3_draw_SV_R_child(PlayState* play, SkeletonInfoR* skeletonInfo, s32*
}
if (afterCallback != NULL) {
- afterCallback(play, skeletonInfo, *jointIndex, &newDlist, &displayBufferFlag, arg, &rotation, &translation);
+ afterCallback(game_play, skeletonInfo, *jointIndex, &newDlist, &displayBufferFlag, arg, &rotation,
+ &translation);
}
(*jointIndex)++;
for (i = 0; i < jointElem->numberOfChildren; i++) {
- cKF_Si3_draw_SV_R_child(play, skeletonInfo, jointIndex, beforeCallback, afterCallback, arg, mtx);
+ cKF_Si3_draw_SV_R_child(game_play, skeletonInfo, jointIndex, beforeCallback, afterCallback, arg, mtx);
}
Matrix_pull();
- CLOSE_DISPS(play->state.gfxCtx);
+ CLOSE_DISPS(game_play->state.gfxCtx);
}
/**
@@ -665,17 +666,17 @@ void cKF_Si3_draw_SV_R_child(PlayState* play, SkeletonInfoR* skeletonInfo, s32*
*
* This function calls cKF_Si3_draw_SV_R_child() to recursively draw each joint.
*/
-void cKF_Si3_draw_R_SV(PlayState* play, SkeletonInfoR* skeletonInfo, Mtx* mtx, DrawCallback beforeCallback,
+void cKF_Si3_draw_R_SV(Game_Play* game_play, SkeletonInfoR* skeletonInfo, Mtx* mtx, DrawCallback beforeCallback,
DrawCallback afterCallback, void* arg) {
s32 jointIndex;
if (mtx != NULL) {
- OPEN_DISPS(play->state.gfxCtx);
+ OPEN_DISPS(game_play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx);
gSPSegment(POLY_XLU_DISP++, 0x0D, mtx);
jointIndex = 0;
- cKF_Si3_draw_SV_R_child(play, skeletonInfo, &jointIndex, beforeCallback, afterCallback, arg, &mtx);
- CLOSE_DISPS(play->state.gfxCtx);
+ cKF_Si3_draw_SV_R_child(game_play, skeletonInfo, &jointIndex, beforeCallback, afterCallback, arg, &mtx);
+ CLOSE_DISPS(game_play->state.gfxCtx);
}
}