summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2025-01-27 07:48:59 -0800
committerGitHub <noreply@github.com>2025-01-27 12:48:59 -0300
commit982ca889e2180165f7d2dd33c5fda2b6e8f998a0 (patch)
tree0850d4416d7971fe738300c200a394f1693791df /src/code/z_player_lib.c
parentb9267f0550e4f408c93ac9d091332f51e9ea7838 (diff)
Misc Cleanup (#1782)
* Remove some unnecessary casts in Graph_TaskSet00 * gGfxSPTaskYieldBuffer as u64 * gGfxSPTaskStack size macro * R_THREE_DAY_CLOCK_Y_POS set to negative number * scope cfb in Graph_TaskSet00 * Graph_ThreadEntry types * func_80124618 * SysCfb_SetHiResMode
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index c32f604d7..8a7a622da 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -1782,6 +1782,7 @@ void Player_UpdateBunnyEars(Player* player) {
}
void func_80124618(struct_80124618 arg0[], f32 curFrame, Vec3f* arg2) {
+ struct_80124618* prev;
s32 currentFrame = curFrame;
f32 temp_f0;
f32 temp_f14;
@@ -1793,16 +1794,18 @@ void func_80124618(struct_80124618 arg0[], f32 curFrame, Vec3f* arg2) {
arg0++;
} while (temp_v1 < currentFrame);
- temp_f0 = arg0[-1].unk_0;
+ prev = arg0 - 1;
+
+ temp_f0 = prev->unk_0;
progress = (curFrame - temp_f0) / (temp_v1 - temp_f0);
- temp_f14 = arg0[-1].unk_2.x;
+ temp_f14 = prev->unk_2.x;
arg2->x = LERPIMP(temp_f14, arg0->unk_2.x, progress) * 0.01f;
- temp_f14 = arg0[-1].unk_2.y;
+ temp_f14 = prev->unk_2.y;
arg2->y = LERPIMP(temp_f14, arg0->unk_2.y, progress) * 0.01f;
- temp_f14 = arg0[-1].unk_2.z;
+ temp_f14 = prev->unk_2.z;
arg2->z = LERPIMP(temp_f14, arg0->unk_2.z, progress) * 0.01f;
}