Various debug conditional compilation cleanup (#2915)

* Global: Define DEBUG as 0 if not already defined

* Clean up DEBUG-guarded code
This commit is contained in:
Max Roncace
2025-12-06 16:34:47 -05:00
committed by GitHub
parent 9f1a648851
commit a30e617e5a
316 changed files with 1133 additions and 1267 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -87,7 +87,7 @@ public:
/* 0x0568 */ cXyz field_0x568;
/* 0x0574 */ csXyz field_0x574;
#ifdef DEBUG
#if DEBUG
cXyz debug_field_0x570;
csXyz debug_field_0x57c;
#endif
+1 -1
View File
@@ -77,7 +77,7 @@ public:
/* 0x70C */ dBgS_AcchCir mAcchCir;
/* 0x74C */ dBgS_ObjAcch mAcch;
/* 0x924 */ u8 field_0x924;
#ifndef DEBUG
#if !DEBUG
/* 0x928 */ f32 field_0x928;
#endif
/* 0x92C */ dCcD_Stts mStts;
-2
View File
@@ -131,9 +131,7 @@ public:
int bullRunning(void*);
int skipFence(void*);
int talk(void*);
#ifdef DEBUG
int test(void*);
#endif
daNpc_Aru_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
+3 -3
View File
@@ -54,7 +54,7 @@ struct daNpcCd_HIO_Jnt_c : public JORReflexible {
virtual ~daNpcCd_HIO_Jnt_c() {}
daNpcCd_HIO_Jnt_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
#endif
@@ -66,7 +66,7 @@ struct daNpcCd_HIO_Child_c : public JORReflexible {
virtual ~daNpcCd_HIO_Child_c() {}
daNpcCd_HIO_Child_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
#endif
@@ -91,7 +91,7 @@ public:
daNpcCd_HIO_c();
virtual ~daNpcCd_HIO_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
#endif
+1 -1
View File
@@ -274,7 +274,7 @@ public:
}
void setCollision() {
#ifdef DEBUG
#if DEBUG
mCyl.SetR(Cd2_HIO_cylR(m_type));
mCyl.SetH(Cd2_HIO_cylH(m_type));
#endif
+1 -3
View File
@@ -74,10 +74,8 @@ public:
OS_REPORT("|%06d:%x|daNpc_Doc_c -> コンストラクト\n", g_Counter.mCounter0, this);
}
#if DEBUG
int test(void*);
#endif
BOOL checkChangeJoint(int i_jointNo) { return i_jointNo == 4; }
BOOL checkRemoveJoint(int i_jointNo) { return i_jointNo == 8; }
s32 getBackboneJointNo() { return 1; }
-2
View File
@@ -196,9 +196,7 @@ public:
BOOL setAction(actionFunc, int);
int wait(int);
int talk(int);
#if DEBUG
int test(int);
#endif
void AppearDemoCall();
void ReturnDemoCall();
void PresentDemoCall();
+8 -7
View File
@@ -13,13 +13,19 @@
*
*/
#if DEBUG
#define NPC_GRMC_HIO_CLASS daNpc_grMC_HIO_c
#else
#define NPC_GRMC_HIO_CLASS daNpc_grMC_Param_c
#endif
struct daNpc_grMC_HIOParam {
/* 0x0 */ daNpcT_HIOParam common;
};
class daNpc_grMC_HIO_c : public mDoHIO_entry_c {
public:
/* 0x8 */ daNpc_grMC_HIOParam param;
/* 0x8 */ daNpc_grMC_HIOParam m;
};
class daNpc_grMC_Param_c {
@@ -92,9 +98,7 @@ public:
int tend(void*);
int talk(void*);
int shop(void*);
#ifdef DEBUG
int test(void*);
#endif
daNpc_grMC_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
@@ -118,10 +122,7 @@ public:
static cutFunc mCutList[1];
private:
#ifdef DEBUG
/* 0xFCC */ daNpc_grMC_HIO_c* mHIO;
#endif
/* 0x0F7C */ u8 field_0xf7c[0xf80 - 0xf7c];
/* 0x0F7C */ NPC_GRMC_HIO_CLASS* mHIO;
/* 0x0F80 */ dCcD_Cyl mCyl;
/* 0x10BC */ u8 mType;
/* 0x10C0 */ actionFunc mNextAction;
+1 -1
View File
@@ -17,7 +17,7 @@ struct daNpc_grR_HIOParam {
};
class daNpc_grR_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
-2
View File
@@ -91,9 +91,7 @@ public:
virtual void evtOrder();
virtual int drawDbgInfo();
#if DEBUG
int test(void*);
#endif
bool getGameStartFlag() { return mGameStartFlag; }
void setPotBreakFlag() { mPotBreakFlag = true; }
+1 -1
View File
@@ -20,7 +20,7 @@ struct daNpcKasiKyu_HIOParam {
};
class daNpcKasiKyu_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
+1 -1
View File
@@ -20,7 +20,7 @@ struct daNpcKasiMich_HIOParam {
};
class daNpcKasiMich_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
-2
View File
@@ -67,9 +67,7 @@ public:
int follow(void*);
int clothWait(void*);
int talk(void*);
#if DEBUG
int test(void*);
#endif
daNpc_Kolin_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
-2
View File
@@ -115,9 +115,7 @@ public:
int cutThankYou(int);
int wait(void*);
int talk(void*);
#if DEBUG
int test(void*);
#endif
daNpc_Kolinb_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
-2
View File
@@ -61,9 +61,7 @@ public:
BOOL setAction(actionFunc);
BOOL wait(void*);
BOOL talk(void*);
#ifdef DEBUG
BOOL test(void*);
#endif
BOOL _turn_to_link(s16);
BOOL _turn_pos(cXyz const&);
BOOL _turn_pos(cXyz const&, s16);
+2 -2
View File
@@ -22,7 +22,7 @@ class daNpc_Saru_Param_c : public JORReflexible {
public:
virtual ~daNpc_Saru_Param_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
#endif
@@ -129,7 +129,7 @@ public:
static char* mCutNameList[4];
static cutFunc mCutList[4];
private:
#ifdef DEBUG
#if DEBUG
/* 0xE90 */ daNpc_Saru_HIO_c* field_0xe90;
#endif
/* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40];
+2 -2
View File
@@ -60,14 +60,14 @@ class daNpc_seiC_Param_c {
};
class daNpc_seiC_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
public:
void genMessage(JORMContext*);
#ifdef DEBUG
#if DEBUG
/* 0x08 */ daNpc_seiC_HIOParam field_0x8;
/* 0x94 */ f32 field_0x94; // "強制会話距離" "Forced conversation distance" | Slider
/* 0x98 */ f32 field_0x98; // "会話距離" "Conversation distance" | Slider
+2 -2
View File
@@ -60,14 +60,14 @@ class daNpc_seiD_Param_c {
};
class daNpc_seiD_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
public:
void genMessage(JORMContext*);
#ifdef DEBUG
#if DEBUG
/* 0x08 */ daNpc_seiD_HIOParam field_0x8;
// /* 0x94 */ f32 field_0x94; // "強制会話距離" "Forced conversation distance" | Slider
// /* 0x98 */ f32 field_0x98; // "会話距離" "Conversation distance" | Slider
+1 -1
View File
@@ -55,7 +55,7 @@ class daNpc_Taro_Param_c {
};
class daNpc_Taro_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
+1 -1
View File
@@ -28,7 +28,7 @@ struct daNpcTks_HIOParam {
};
class daNpcTks_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
-2
View File
@@ -90,9 +90,7 @@ public:
int walk(void*);
int play(void*);
int talk(void*);
#if DEBUG
int test(void*);
#endif
daNpc_Toby_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
-2
View File
@@ -249,9 +249,7 @@ public:
BOOL cook(void*);
BOOL race(void*);
BOOL talk(void*);
#ifdef DEBUG
BOOL test(void*);
#endif
daNpc_ykM_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
-2
View File
@@ -75,9 +75,7 @@ public:
int walk(void*);
int race(void*);
int talk(void*);
#if DEBUG
int test(void*);
#endif
daNpc_ykW_c(const daNpcT_faceMotionAnmData_c * param_0,
const daNpcT_motionAnmData_c* param_1,
const daNpcT_MotionSeqMngr_c::sequenceStepData_c* param_2,
-2
View File
@@ -115,9 +115,7 @@ public:
BOOL setAction(actionFunc);
int wait(void*);
int talk(void*);
#ifdef DEBUG
int test(void*);
#endif
daNpc_ZelRo_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
+1 -1
View File
@@ -123,7 +123,7 @@ public:
void initActionDead();
void actionDead();
int Draw();
#ifdef DEBUG
#if DEBUG
/* 0x000000 */ void debugDraw();
#endif
int Delete();
+1 -1
View File
@@ -14,7 +14,7 @@
*
*/
class daObjDamCps_c : public fopAc_ac_c {
#ifdef DEBUG
#if DEBUG
public:
daObjDamCps_c() {};
void initBaseMtx();
+1 -1
View File
@@ -68,7 +68,7 @@ private:
STATIC_ASSERT(sizeof(daObjFallObj_c) == 0x614);
#ifdef DEBUG
#if DEBUG
class daObjFallObj_HIO_c : public mDoHIO_entry_c {
public:
daObjFallObj_HIO_c();
+2 -2
View File
@@ -22,12 +22,12 @@ struct daObj_KBacket_HIOParam
};
class daObj_KBacket_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
public:
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
daObj_KBacket_HIOParam param;
+1 -1
View File
@@ -45,7 +45,7 @@ public:
inline float getStartRate(cXyz* param_1);
#ifdef DEBUG
#if DEBUG
const daObjLndRope_Hio_c* attr() const {
return &M_Hio;
};
+1 -1
View File
@@ -51,7 +51,7 @@ public:
STATIC_ASSERT(sizeof(daObjLv6SwTurn_c) == 0x5cc);
#ifdef DEBUG
#if DEBUG
class daObjLv6SwTurn_HIO_c : public mDoHIO_entry_c {
public:
daObjLv6SwTurn_HIO_c();
+1 -1
View File
@@ -26,7 +26,7 @@ struct daObj_Mie_Param_c {
};
class daObj_Mie_HIO_c
#ifdef DEBUG
#if DEBUG
: public mDoHIO_entry_c
#endif
{
+1 -1
View File
@@ -117,7 +117,7 @@ private:
/* 0xA9C */ u8 field_0xa9c;
/* 0xA9D */ u8 field_0xa9d;
/* 0xA9E */ u8 field_0xa9e;
#ifdef DEBUG
#if DEBUG
/* 0xAA0 */ cXyz field_0xac0;
#endif
};
+1 -1
View File
@@ -67,7 +67,7 @@ public:
STATIC_ASSERT(sizeof(daObjThDoor_c) == 0x8c0);
#ifdef DEBUG
#if DEBUG
class daObjThDoor_HIO_c : public mDoHIO_entry_c {
public:
daObjThDoor_HIO_c();
+1 -1
View File
@@ -79,7 +79,7 @@ public:
STATIC_ASSERT(sizeof(daObjTobyHouse_c) == 0x600);
#ifdef DEBUG
#if DEBUG
class daObjTobyHouse_HIO_c : public mDoHIO_entry_c {
public:
+1 -1
View File
@@ -68,7 +68,7 @@ public:
daTogeTrap_HIO_c();
~daTogeTrap_HIO_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext* ctx) {
// Speed
ctx->genLabel("--- 速 出現時---", 0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18);
+1 -1
View File
@@ -131,7 +131,7 @@ private:
STATIC_ASSERT(sizeof(daObjVolcBom_c) == 0xa1c);
#ifdef DEBUG
#if DEBUG
class daObjVolcBom_HIO_c : public mDoHIO_entry_c {
public:
daObjVolcBom_HIO_c();
+3 -3
View File
@@ -45,7 +45,7 @@ private:
class dAttParam_c : public JORReflexible {
public:
#ifdef DEBUG
#if DEBUG
/* 0x04 */ s8 mHIOChildNo;
#endif
@@ -66,7 +66,7 @@ public:
/* 0x35 */ u8 mAttnCursorDisappearFrames;
/* 0x38 */ f32 field_0x38;
/* 0x3C */ f32 field_0x3c;
#ifdef DEBUG
#if DEBUG
/* 0x44 */ s32 mDebugDispPosX;
/* 0x48 */ s32 mDebugDispPosY;
#endif
@@ -75,7 +75,7 @@ public:
dAttParam_c() {}
dAttParam_c(s32);
#ifdef DEBUG
#if DEBUG
void connectHIO(char* i_name) {
mHIOChildNo = mDoHIO_CREATE_CHILD(i_name, this);
}
+4 -4
View File
@@ -66,7 +66,7 @@ u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0);
class dBgS_HIO : public JORReflexible {
public:
#ifdef DEBUG
#if DEBUG
dBgS_HIO() {
field_0x6 = 0;
field_0x8 = 0;
@@ -152,7 +152,7 @@ public:
void DebugDrawPoly(dBgW_Base *param_1) {}
fopAc_ac_c* GetActorPointer(cBgS_PolyInfo const& param_0) const { return cBgS::GetActorPointer(param_0); }
bool LineCross(cBgS_LinChk* i_linChk) {
#ifdef DEBUG
#if DEBUG
if (m_hio.ChkLineOff()) {
return false;
}
@@ -173,7 +173,7 @@ public:
#endif
}
f32 GroundCross(cBgS_GndChk* i_gndChk) {
#ifdef DEBUG
#if DEBUG
if (m_hio.ChkCheckCounter()) {
g_ground_counter++;
}
@@ -193,7 +193,7 @@ public:
void ChkDeleteActorRegist(fopAc_ac_c*);
#ifdef DEBUG
#if DEBUG
/* 0x1404 */ u8 field_0x1404[0x1408 - 0x1404];
/* 0x1408 */ dBgS_HIO m_hio;
#endif
+2 -2
View File
@@ -199,7 +199,7 @@ public:
/* 0x02C */ u32 m_flags;
/* 0x030 */ cXyz* pm_pos;
/* 0x034 */ cXyz* pm_old_pos;
#ifdef DEBUG
#if DEBUG
/* 0x038 */ cXyz unk_0x38;
#endif
/* 0x038 */ cXyz* pm_speed;
@@ -227,7 +227,7 @@ public:
/* 0x0CC */ f32 field_0xcc;
/* 0x0D0 */ f32 m_wtr_chk_offset;
/* 0x0D4 */ cBgS_PolyInfo* pm_out_poly_info;
#ifdef DEBUG
#if DEBUG
/* 0x0E4 */ cXyz unk_0xe4;
#endif
/* 0x0D8 */ f32 field_0xd8;
+1 -1
View File
@@ -65,7 +65,7 @@ public:
// /* 0x0000 */ cCcS mCCcS;
/* 0x284C */ dCcMassS_Mng mMass_Mng;
#ifdef DEBUG
#if DEBUG
/* 0x2AD0 */ u8 field_0x2ad0;
#endif
}; // Size = 0x2AC4
+1 -1
View File
@@ -128,7 +128,7 @@ public:
u8 getMode() const { return mMode; }
void onHindFlag(u16 flag) { mHindFlag |= flag; }
#ifdef DEBUG
#if DEBUG
void offHindFlag(u16 flag) { mHindFlag &= (u16)~flag; }
#else
void offHindFlag(u16 flag) { mHindFlag &= ~flag; }
-3
View File
@@ -1,7 +1,6 @@
#ifndef D_EVENT_D_EVENT_DEBUG_H
#define D_EVENT_D_EVENT_DEBUG_H
#ifdef DEBUG
#include "JSystem/JHostIO/JORMContext.h"
#include "d/d_event.h"
@@ -171,6 +170,4 @@ struct dEvM_HIO_c : public JORReflexible {
};
};
#endif /* DEBUG */
#endif /* D_EVENT_D_EVENT_DEBUG_H */
+1 -1
View File
@@ -259,7 +259,7 @@ public:
/* 0x09B8 */ DUNGEON_LIGHT dungeonlight[8];
/* 0x0C18 */ BOSS_LIGHT field_0x0c18[8];
/* 0x0D58 */ BOSS_LIGHT field_0x0d58[6];
#ifdef DEBUG
#if DEBUG
/* 0x0E48 */ NAVYCHAN navy;
/* 0x0E58 */ u8 field_0xe58[0xE68 - 0xE58]; // part of NAVYCHAN?
#endif
+3 -3
View File
@@ -587,7 +587,7 @@ public:
#endif
}
#ifdef DEBUG
#if DEBUG
virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void genMessage(JORMContext*);
@@ -601,7 +601,7 @@ public:
/* 0x000 */ // vtable
/* 0x004 */ s8 field_0x4;
#ifdef DEBUG
#if DEBUG
int field_0x8_debug;
#endif
/* 0x008 */ f32 mLifeTopPosX;
@@ -1185,7 +1185,7 @@ public:
}; // Size: 0x28
dMeter_fmapHIO_c();
#ifdef DEBUG
#if DEBUG
void update();
void createEvtCallBackObject();
void deleteEvtCallBackObject();
+1 -1
View File
@@ -173,7 +173,7 @@ public:
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
#ifdef DEBUG
#if DEBUG
void dbgPrint();
#endif
+1 -1
View File
@@ -52,7 +52,7 @@ private:
/* 0x18 */ JKRHeap* heap;
/* 0x1C */ JKRSolidHeap* mDataHeap;
/* 0x20 */ void** mRes;
#ifdef DEBUG
#if DEBUG
/* 0x24 */ void* unk_0x24;
#endif
}; // Size: 0x24
+1 -1
View File
@@ -6,7 +6,7 @@
class mDoDvdThd_toMainRam_c;
#ifdef DEBUG
#if DEBUG
class myFontClass : public JUTResFont {
public:
myFontClass(const ResFONT* i_font, JKRHeap* i_heap)
+3 -3
View File
@@ -19,7 +19,7 @@ class dScnPly_reg_HIO_c : public JORReflexible {
public:
virtual ~dScnPly_reg_HIO_c() {}
#ifdef DEBUG
#if DEBUG
void genMessage(JORMContext*);
/* 0x4 */ s8 id;
@@ -83,7 +83,7 @@ public:
extern dScnPly_env_HIO_c g_envHIO;
extern dScnPly_reg_HIO_c g_regHIO;
#ifdef DEBUG
#if DEBUG
extern dScnPly_preset_HIO_c g_presetHIO;
#endif
@@ -95,7 +95,7 @@ extern dScnPly_preset_HIO_c g_presetHIO;
* Float Reg(25-29) ... -1.0 - +1.0
*/
#ifdef DEBUG
#if DEBUG
// Morita
#define TREG_F(i) g_regHIO.mChildReg[0].mFloatReg[i]
#define TREG_S(i) g_regHIO.mChildReg[0].mShortReg[i]
+3 -3
View File
@@ -8,13 +8,13 @@ public:
virtual ~dScnPly_env_otherHIO_c() {}
void genMessage(JORMContext*);
#ifdef DEBUG
#if DEBUG
/* 0x04 */ s8 field_0x04;
#endif
/* 0x08 */ f32 mShadowDensity;
#ifdef DEBUG
#if DEBUG
/* 0x0C */ f32 mCullFarValue;
/* 0x10 */ f32 mRailSize;
/* 0x14 */ s16 mRailColorR;
@@ -28,7 +28,7 @@ public:
/* 0x45 */ u8 field_0x45;
/* 0x46 */ u8 mDisplayTransparentCyl;
#ifdef DEBUG
#if DEBUG
/* 0x47 */ u8 mDisplayShadows;
/* 0x48 */ u8 mDisplayShadowImage;
/* 0x49 */ u8 mDisplayShadowPoly;
+2 -2
View File
@@ -1011,7 +1011,7 @@ public:
/* 0x54 */ stage_tgsc_class* mDrTg;
/* 0x58 */ stage_tgsc_class* mDoor;
/* 0x5C */ dStage_FloorInfo_c* mFloorInfo;
#ifdef DEBUG
#if DEBUG
/* 0x60 */ int field_0x60;
#endif
/* 0x60 */ u16 mPlayerNum;
@@ -1092,7 +1092,7 @@ public:
static void SetTimePass(int i_TimePass) { m_time_pass = i_TimePass; }
static void setZoneNo(int, int);
static dBgp_c* getBgp(int i_roomNo) {
#ifdef DEBUG
#if DEBUG
// NONMATCHING
#else
return NULL;
+1 -1
View File
@@ -88,7 +88,7 @@ public:
static const vib_pattern CQ_patt[VIBMODE_Q_MAX];
private:
#ifdef DEBUG
#if DEBUG
/* 0x00 */ dVibTest_c mVibTest;
#endif