summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-12-13 15:16:24 +1100
committerGitHub <noreply@github.com>2023-12-13 15:16:24 +1100
commit5607eec18bae68e4cd38ef6d1fa69d7f1d84bfc8 (patch)
treebb13ad49718f8883bc65d7bd0a9db4d791800cf2 /src/code/z_player_lib.c
parented4da0ecef698ad0112c7cdf575368ac3c61903b (diff)
Use more `TRUNCF_BINANG` for f32 -> s16 casts (#1503)
* TRUNCF_BINANG * brackets * extra cast
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index ec051f1fb..8901069e3 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -1895,8 +1895,8 @@ void func_80124F18(s16* arg0, f32* arg1, s16 arg2, f32 arg3, f32 arg4) {
}
*arg1 = CLAMP(*arg1, -arg4, arg4);
- *arg0 += (s16)*arg1;
- if (((arg2 - *arg0) * (s16)*arg1) < 0) {
+ *arg0 += TRUNCF_BINANG(*arg1);
+ if (((arg2 - *arg0) * TRUNCF_BINANG(*arg1)) < 0) {
*arg0 = arg2;
}
}
@@ -2168,7 +2168,7 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
rotX = player->upperLimbRot.x;
if ((player->transformation == PLAYER_FORM_DEKU) && (player->stateFlags3 & PLAYER_STATE3_40)) {
if (player->heldActor != NULL) {
- rotX += (s16)(((EnArrow*)(player->heldActor))->bubble.unk_144 * -470.0f);
+ rotX += TRUNCF_BINANG(((EnArrow*)(player->heldActor))->bubble.unk_144 * -470.0f);
}
}