Fix JUT_ASSERT and several other macros (#2711)

* Fix JUT_ASSERT to be a nested define

* Switch names that appear in asserts to be constants instead of defines

* Replace `0` in asserts with `NULL` or `FALSE`

* Fix fpclassify

* Fix ARRAY_SIZE

* Use G_CM3D_F_INF

* More fixes for fpclassify

* Remove FLOAT_LABEL

* Remove incorrect FLAG_ON macro

* Remove UNK_BSS macro

* Silence clangd unused header warning for PCH
This commit is contained in:
LagoLunatic
2025-09-28 16:11:07 -04:00
committed by GitHub
parent 737250d7f5
commit 6ec6fce8cb
1008 changed files with 3172 additions and 3237 deletions
+4 -4
View File
@@ -3,7 +3,7 @@
* NPC - Zora
*/
#include "d/dolzel_rel.h"
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_npc_zra.h"
#include "SSystem/SComponent/c_math.h"
@@ -229,7 +229,7 @@ f32 daNpc_zrA_Path_c::chkPassDst(u16 i_idx, cXyz i_pos) {
daNpcF_pntVsLineSegmentLengthSquare2D(i_pos.x, i_pos.z, prev_pos.x, prev_pos.z,
next_pos.x, next_pos.z, &proj_x, &proj_z, &dist);
if (cM3d_IsZero(dist)) {
return -1e9f;
return -G_CM3D_F_INF;
} else {
daNpcF_pntVsLineSegmentLengthSquare2D(cur_pos.x, cur_pos.z, prev_pos.x, prev_pos.z,
next_pos.x, next_pos.z, &proj2_x, &proj2_z, &dist);
@@ -249,7 +249,7 @@ f32 daNpc_zrA_Path_c::chkPassDst(u16 i_idx, cXyz i_pos) {
}
}
} else {
return -1e9f;
return -G_CM3D_F_INF;
}
}
@@ -2133,7 +2133,7 @@ BOOL daNpc_zrA_c::doEvent() {
int act_idx = event_manager->getMyActIdx(staff_id, mEvtCutNameList,
ARRAY_SIZEU(mEvtCutNameList), 0, 0);
JUT_ASSERT(0xf0e, act_idx >= 0 && act_idx < 11);
JUT_ASSERT(0xf0f, mEvtCutList[act_idx] != 0);
JUT_ASSERT(0xf0f, mEvtCutList[act_idx] != NULL);
if ((this->*mEvtCutList[act_idx])(staff_id)) {
event_manager->cutEnd(staff_id);
}