summaryrefslogtreecommitdiff
path: root/src/code/c_keyframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/c_keyframe.c')
-rw-r--r--src/code/c_keyframe.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/code/c_keyframe.c b/src/code/c_keyframe.c
index 9df0986..352eac5 100644
--- a/src/code/c_keyframe.c
+++ b/src/code/c_keyframe.c
@@ -38,12 +38,10 @@
#include "z64math.h"
#include "m_lib.h"
#include "gfx.h"
-#include "m_play.h"
#include "libc64/fp.h"
#include "sys_matrix.h"
#include "sys_math3d.h"
-
-UNK_PTR* B_801458A0_jp[4];
+#include "overlays/gamestates/ovl_play/m_play.h"
void cKF_FrameControl_zeroClear(FrameControl* frameControl) {
bzero(frameControl, sizeof(FrameControl));
@@ -719,13 +717,13 @@ void cKF_SkeletonInfo_R_init_reverse_setspeedandmorphandmode(SkeletonInfoR* skel
void func_80053384_jp(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, UNK_PTR* arg6, UNK_PTR* arg7,
UNK_PTR* arg8) {
if (arg3 != 0) {
- B_801458A0_jp[arg0] = OS_PHYSICAL_TO_K0(arg6);
+ gSegments[arg0] = (uintptr_t)OS_K0_TO_PHYSICAL(arg6);
}
if (arg4 != 0) {
- B_801458A0_jp[arg1] = OS_PHYSICAL_TO_K0(arg7);
+ gSegments[arg1] = (uintptr_t)OS_K0_TO_PHYSICAL(arg7);
}
if (arg5 != 0) {
- B_801458A0_jp[arg2] = OS_PHYSICAL_TO_K0(arg8);
+ gSegments[arg2] = (uintptr_t)OS_K0_TO_PHYSICAL(arg8);
}
}
@@ -888,14 +886,14 @@ s32 cKF_SkeletonInfo_R_combine_play(SkeletonInfoR* skeletonInfo1, SkeletonInfoR*
joint = (!IS_ZERO(skeletonInfo1->morphCounter)) ? (s16*)skeletonInfo1->morphTable : (s16*)skeletonInfo1->jointTable;
if (arg4 != 0) {
- sp44 = OS_PHYSICAL_TO_K0(B_801458A0_jp[arg2]);
- B_801458A0_jp[arg2] = OS_PHYSICAL_TO_K0(arg4);
+ sp44 = OS_PHYSICAL_TO_K0(gSegments[arg2]);
+ gSegments[arg2] = (uintptr_t)OS_K0_TO_PHYSICAL(arg4);
cKF_SkeletonInfo_R_combine_work_set(&combine3, skeletonInfo1);
}
if (arg5 != 0) {
- sp40 = OS_PHYSICAL_TO_K0(B_801458A0_jp[arg3]);
- B_801458A0_jp[arg3] = OS_PHYSICAL_TO_K0(arg5);
+ sp40 = OS_PHYSICAL_TO_K0(gSegments[arg3]);
+ gSegments[arg3] = (uintptr_t)OS_K0_TO_PHYSICAL(arg5);
cKF_SkeletonInfo_R_combine_work_set(&combine2, skeletonInfo2);
cKF_SkeletonInfo_R_combine_work_set(&combine1, skeletonInfo2);
}
@@ -966,18 +964,18 @@ void cKF_SkeletonInfo_R_T_combine_play(s32* arg0, s32* arg1, s32* arg2, Skeleton
spAC = (!IS_ZERO(skeletonInfo1->morphCounter)) ? (s16*)skeletonInfo1->morphTable : (s16*)skeletonInfo1->jointTable;
if (arg9 != 0) {
- sp48 = OS_PHYSICAL_TO_K0(B_801458A0_jp[arg6]);
- B_801458A0_jp[arg6] = OS_PHYSICAL_TO_K0(arg9);
+ sp48 = OS_PHYSICAL_TO_K0(gSegments[arg6]);
+ gSegments[arg6] = (uintptr_t)OS_K0_TO_PHYSICAL(arg9);
cKF_SkeletonInfo_R_combine_work_set(&sp4C, skeletonInfo1);
}
if (argA != 0) {
- sp44 = OS_PHYSICAL_TO_K0(B_801458A0_jp[arg7]);
- B_801458A0_jp[arg7] = OS_PHYSICAL_TO_K0(argA);
+ sp44 = OS_PHYSICAL_TO_K0(gSegments[arg7]);
+ gSegments[arg7] = (uintptr_t)OS_K0_TO_PHYSICAL(argA);
cKF_SkeletonInfo_R_combine_work_set(&sp6C, skeletonInfo2);
}
if (argB != 0) {
- sp40 = OS_PHYSICAL_TO_K0(B_801458A0_jp[arg8]);
- B_801458A0_jp[arg8] = OS_PHYSICAL_TO_K0(argB);
+ sp40 = OS_PHYSICAL_TO_K0(gSegments[arg8]);
+ gSegments[arg8] = (uintptr_t)OS_K0_TO_PHYSICAL(argB);
cKF_SkeletonInfo_R_combine_work_set(&sp8C, skeletonInfo3);
}