Use more TRUNCF_BINANG for f32 -> s16 casts (#1503)

* TRUNCF_BINANG

* brackets

* extra cast
This commit is contained in:
engineer124
2023-12-13 15:16:24 +11:00
committed by GitHub
parent ed4da0ecef
commit 5607eec18b
127 changed files with 387 additions and 373 deletions
+3 -3
View File
@@ -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);
}
}