More General Cleanup (#1638)

* LINKER_FILES in makefile

* COLPOLY_GET_NORMAL

* math header

* libc

* M_PI for cosf and sinf files

* MAXFLOAT

* Revert "MAXFLOAT"

This reverts commit 96b75ffaa8.

* Remove SHT_MINV

* SHRT_MAX

* Add M_PI

* Angle macros

* f suffix

* Format
This commit is contained in:
Derek Hensley
2024-06-03 11:33:03 -07:00
committed by GitHub
parent 312b65d5e3
commit f26e77ba40
144 changed files with 372 additions and 369 deletions
+9 -9
View File
@@ -45,7 +45,7 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "libc/string.h"
#include "string.h"
#include "z64malloc.h"
#include "z64quake.h"
#include "z64shrink_window.h"
@@ -1536,10 +1536,10 @@ s32 Camera_CalcAtForFriendlyLockOn(Camera* camera, VecGeo* eyeAtDir, Vec3f* targ
deltaY = focalActorPosRot->pos.y - *yPosOffset;
temp_f0_6 = Math_FAtan2F(deltaY, OLib_Vec3fDistXZ(at, &camera->eye));
if (temp_f0_6 > 0.34906584f) { // (M_PI / 9)
phi_f16 = 1.0f - Math_SinF(temp_f0_6 - 0.34906584f);
} else if (temp_f0_6 < -0.17453292f) { // (M_PI / 18)
phi_f16 = 1.0f - Math_SinF(-0.17453292f - temp_f0_6);
if (temp_f0_6 > (f32)(M_PI / 9)) {
phi_f16 = 1.0f - Math_SinF(temp_f0_6 - (f32)(M_PI / 9));
} else if (temp_f0_6 < -(f32)(M_PI / 18)) {
phi_f16 = 1.0f - Math_SinF(-(f32)(M_PI / 18) - temp_f0_6);
} else {
phi_f16 = 1.0f;
}
@@ -1616,10 +1616,10 @@ s32 Camera_CalcAtForEnemyLockOn(Camera* camera, VecGeo* arg1, Vec3f* arg2, f32 y
focalActorAtOffsetTarget.y -= deltaY;
} else {
if (temp_f0_3 > 0.34906584f) { // (M_PI / 9)
temp = 1.0f - Math_SinF(temp_f0_3 - 0.34906584f);
} else if (temp_f0_3 < -0.17453292f) { // (M_PI / 18)
temp = 1.0f - Math_SinF(-0.17453292f - temp_f0_3);
if (temp_f0_3 > (f32)(M_PI / 9)) {
temp = 1.0f - Math_SinF(temp_f0_3 - (f32)(M_PI / 9));
} else if (temp_f0_3 < -(f32)(M_PI / 18)) {
temp = 1.0f - Math_SinF(-(f32)(M_PI / 18) - temp_f0_3);
} else {
temp = 1.0f;
}