mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 00:16:19 -04:00
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:
+12
-12
@@ -3,7 +3,7 @@
|
||||
* Event Data Processor
|
||||
*/
|
||||
|
||||
#include "d/dolzel.h"
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/d_event_data.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
@@ -317,7 +317,7 @@ static int dEvDt_Next_Stage(int i_staffId, int i_wipe) {
|
||||
} else {
|
||||
// "Scene transition data is not complete!!"
|
||||
OS_REPORT_ERROR("シーン切り替えのデータ指定が足りない!!\n");
|
||||
JUT_ASSERT(379, 0);
|
||||
JUT_ASSERT(379, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -499,7 +499,7 @@ void dEvDtStaff_c::specialProcLight() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("LIGHT", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(663, 0);
|
||||
JUT_ASSERT(663, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ void dEvDtStaff_c::specialProcMessage() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("MESSAGE", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(741, 0);
|
||||
JUT_ASSERT(741, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -752,7 +752,7 @@ void dEvDtStaff_c::specialProcSound() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("SOUND", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(960, 0);
|
||||
JUT_ASSERT(960, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ void dEvDtStaff_c::specialProcCreate() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("CREATER", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(1055, 0);
|
||||
JUT_ASSERT(1055, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -900,7 +900,7 @@ void dEvDtStaff_c::specialProcDirector() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("DIRECTOR", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(1146, 0);
|
||||
JUT_ASSERT(1146, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1052,14 +1052,14 @@ void dEvDtStaff_c::specialProcDirector() {
|
||||
case 'VIBR':
|
||||
specialProc_WaitStart(staffId);
|
||||
if (data->unk2 == 0) {
|
||||
JUT_ASSERT(1291, 0);
|
||||
JUT_ASSERT(1291, FALSE);
|
||||
}
|
||||
|
||||
idata = dComIfGp_evmng_getMyIntegerP(staffId, "Pattern");
|
||||
idata2 = dComIfGp_evmng_getMyIntegerP(staffId, "Type");
|
||||
|
||||
if (idata == NULL || idata2 == NULL) {
|
||||
JUT_ASSERT(1295, 0);
|
||||
JUT_ASSERT(1295, FALSE);
|
||||
}
|
||||
|
||||
dComIfGp_getVibration().StartQuake((u8*)idata, 0, *idata2, cXyz(0.0f, 1.0f, 0.0f));
|
||||
@@ -1260,7 +1260,7 @@ void dEvDtStaff_c::specialProcPackage() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("PACKAGE", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(1528, 0);
|
||||
JUT_ASSERT(1528, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1342,7 +1342,7 @@ void dEvDtStaff_c::specialProcTimekeeper() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("TIMEKEEPER", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(1650, 0);
|
||||
JUT_ASSERT(1650, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1397,7 +1397,7 @@ void dEvDtStaff_c::specialProcEffect() {
|
||||
|
||||
int staffId = dComIfGp_evmng_getMyStaffId("EFFECT", NULL, 0);
|
||||
if (staffId == -1) {
|
||||
JUT_ASSERT(1720, 0);
|
||||
JUT_ASSERT(1720, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user