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
+8 -8
View File
@@ -3,7 +3,7 @@
// Translation Unit: d/d_camera
//
#include "d/dolzel.h"
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_camera.h"
#include "SSystem/SComponent/c_counter.h"
@@ -459,8 +459,8 @@ void dCamera_c::initialize(camera_class* i_camera, fopAc_ac_c* i_player, u32 i_c
mBG.field_0x5c.field_0x0 = 0;
mBG.field_0x0.field_0x0 = 0;
mBG.field_0xc0.field_0x3c = 0xFF;
mBG.field_0x5c.field_0x58 = -1000000000.0f;
mBG.field_0x0.field_0x58 = -1000000000.0f;
mBG.field_0x5c.field_0x58 = -G_CM3D_F_INF;
mBG.field_0x0.field_0x58 = -G_CM3D_F_INF;
mBG.field_0x0.field_0x4.OffNormalGrp();
mBG.field_0x0.field_0x4.OnWaterGrp();
mBG.field_0xc0.field_0x1 = 0;
@@ -473,7 +473,7 @@ void dCamera_c::initialize(camera_class* i_camera, fopAc_ac_c* i_player, u32 i_c
mBG.field_0xc0.field_0x34 = 0;
mBG.field_0x108.field_0x0 = 0;
mBG.field_0x108.field_0x4 = 0.0f;
mBG.field_0xc0.field_0x38 = -1000000000.0f;
mBG.field_0xc0.field_0x38 = -G_CM3D_F_INF;
mBG.field_0xc0.field_0x40 = 0xFF;
mWallUpDist = mCamSetup.mBGChk.WallUpDistance();
@@ -2238,7 +2238,7 @@ f32 dCamera_c::groundHeight(cXyz* param_0) {
}
f32 height_correct;
if (height == -1000000000.0f) {
if (height == -G_CM3D_F_INF) {
height_correct = param_0->y;
} else {
height_correct = height;
@@ -2942,7 +2942,7 @@ void dCamera_c::tooNearEscape(cXyz* param_0) {
/* 80167EF4-80167FEC 162834 00F8+00 2/2 0/0 0/0 .text getWaterSurfaceHeight__9dCamera_cFP4cXyz */
f32 dCamera_c::getWaterSurfaceHeight(cXyz* param_0) {
f32 var_f31 = -1000000000.0f;
f32 var_f31 = -G_CM3D_F_INF;
cXyz spF8(*param_0);
dBgS_RoofChk roofchk;
@@ -10056,7 +10056,7 @@ static int camera_draw(camera_process_class* i_this) {
gndchk.SetPos(&i_this->lookat.eye);
f32 cross = dComIfG_Bgsp().GroundCross(&gndchk);
if (cross != -1000000000.0f) {
if (cross != -G_CM3D_F_INF) {
if (dComIfG_Bgsp().ChkGrpInf(gndchk, 0x100)) {
mDoAud_getCameraMapInfo(6);
} else {
@@ -10117,7 +10117,7 @@ static int init_phase2(camera_class* i_this) {
spA4.y += 50.0f;
gndchk.SetPos(&spA4);
if (dComIfG_Bgsp().GroundCross(&gndchk) == -1000000000.0f) {
if (dComIfG_Bgsp().GroundCross(&gndchk) == -G_CM3D_F_INF) {
#if DEBUG
if (i_this->field_0x238 < 100) {
if (i_this->field_0x238 % 100 == 0 && i_this->field_0x238 != 0) {