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
+5 -5
View File
@@ -6,7 +6,7 @@
*
*/
#include "d/dolzel_rel.h"
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_obj_stone.h"
#include "d/actor/d_a_player.h"
@@ -411,7 +411,7 @@ void daObjStone_c::mode_proc_call() {
dBgS_ObjGndChk adStack_c8;
adStack_c8.SetPos(&cStack_d4);
f32 dVar17 = dComIfG_Bgsp().GroundCross(&adStack_c8);
if (dVar17 == -1000000000.0f) {
if (dVar17 == -G_CM3D_F_INF) {
dVar17 = -100000.0f;
}
dVar17 = fabs(waterHeight - dVar17);
@@ -736,7 +736,7 @@ void daObjStone_c::modeWalk() {
bool iVar7 = fopAcM_gc_c::gndCheck(&cStack_c8);
bool isTriPla = fopAcM_gc_c::getTriPla(&acStack_a4);
f32 dVar12 = fopAcM_gc_c::getGroundY();
if (iVar7 && dVar12 != -1000000000.0f && isTriPla) {
if (iVar7 && dVar12 != -G_CM3D_F_INF && isTriPla) {
f32 dVar12 = cM_scos(cM_deg2s(dVar15 - 0.5f));
cXyz cStack_d4(acStack_a4.mNormal);
if (cStack_d4.y < dVar12) {
@@ -853,7 +853,7 @@ void daObjStone_c::init_modeBreak() {
acStack_40.setall(0.5f);
}
J3DModelData* stone_bmd = (J3DModelData*)dComIfG_getObjectRes("Always", 27);
JUT_ASSERT(1687, stone_bmd != 0);
JUT_ASSERT(1687, stone_bmd != NULL);
JPABaseEmitter* emitter = dComIfGp_particle_set(
0x15c, &current.pos, 0, &acStack_40, 0xff, &dPa_modelEcallBack::getEcallback(), fopAcM_GetRoomNo(this), 0, 0, 0);
dPa_modelEcallBack::setModel(emitter, stone_bmd, tevStr,
@@ -977,7 +977,7 @@ int daObjStone_c::checkRollAngle() {
bool triPla = dComIfG_Bgsp().GetTriPla(fopAcM_gc_c::mGndCheck, &plane);
f32 ground_y = fopAcM_gc_c::getGroundY();
if (gnd_chk && -1000000000.0f != ground_y && triPla) {
if (gnd_chk && -G_CM3D_F_INF != ground_y && triPla) {
f32 tmp2 = cM_scos(cM_deg2s(dVar11 - 0.5f));
cXyz pos2 = plane.mNormal;