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
+6 -6
View File
@@ -3,7 +3,7 @@
*
*/
#include "d/dolzel_rel.h"
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_kago.h"
#include "d/d_camera.h"
@@ -307,7 +307,7 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) {
field_0x738 = 0;
if (field_0x700 != -1e+09f) {
if (field_0x700 != -G_CM3D_F_INF) {
field_0x738 = dComIfG_Bgsp().GetSpecialCode(gndChk);
field_0x700 += l_HIO.mFlightGroundAltitude;
if (retVal < field_0x700) {
@@ -329,7 +329,7 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) {
dBgS_ObjGndChk_Spl gndChkSpl;
gndChkSpl.SetPos(&gndChkPos);
f32 gndCrossMag = dComIfG_Bgsp().GroundCross(&gndChkSpl);
if (gndCrossMag != -1e+09f) {
if (gndCrossMag != -G_CM3D_F_INF) {
field_0x70c = gndCrossMag;
gndCrossMag += l_HIO.mFlightGroundAltitude;
if (current.pos.y < gndCrossMag + 50.0f) {
@@ -378,7 +378,7 @@ f32 daKago_c::checkRoofHeight(cXyz param_0) {
roofChk.SetPos(unkXyz1);
roofChkYVal = dComIfG_Bgsp().RoofChk(&roofChk);
if (roofChkYVal != 1e9f) {
if (roofChkYVal != G_CM3D_F_INF) {
roofChkYVal -= l_HIO.mFlightCeilingAltitude;
if (current.pos.y > roofChkYVal) {
mRoofHeight = current.pos.y;
@@ -400,7 +400,7 @@ f32 daKago_c::checkRoofHeight(cXyz param_0) {
}
}
} else {
mRoofHeight = 1e9f;
mRoofHeight = G_CM3D_F_INF;
}
if (!unkFlag1 && current.pos.y >= mRoofHeight - 100.0f) {
@@ -3793,7 +3793,7 @@ int daKago_c::CreateHeap() {
} else {
modelData = (J3DModelData*)dComIfG_getObjectRes(field_0x75c, 0x10);
}
JUT_ASSERT(0x139f, modelData != 0);
JUT_ASSERT(0x139f, modelData != NULL);
mpMorf = new mDoExt_McaMorfSO(
modelData, NULL, NULL,