summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-08-27 20:37:31 -0400
committerGitHub <noreply@github.com>2025-08-27 17:37:31 -0700
commit956e84b0e7090fde541f25319d0255c45b657b39 (patch)
tree2feeca19517a6ae97fcf68fbbe8a0ff401879bb3 /include
parente09f037fa3a3e1ddecf4075c7aa0e45d52b5616b (diff)
Start linking some TUs on debug and PAL (#2612)
* Fix clang union handling (affects all TUs including d_camera.h) Union members with non-trivial ctors/dtors is undefined behavior and clangd normally throws a fit and refuses to parse the whole union, but it seems to be possible to ifdef the problematic ctors out for non-mwerks compilers and explicitly tell modern compilers to use the defaults instead. Thanks to encounter for this fix. * Link all TUs that already match on debug In order to link TUs for debug, most functions seem to need to have their alignment set to 16 in symbols.txt. There are a few hundred functions that seem to be the exception and break when their alignment is set to 16, but I don't know the reason for this. * Remove some fakematches (nosyminline/sym off) for weak func order in retail * Fix clang not knowing that MSL_C++ is C++ * Link more debug TUs * Fix missing PAL split * Fix wrong slashes being used in includes * RZDE01_00: Fix incorrect capitalization in config.yml * Add RZDE01_00 to configure task * Revert configure.py to use MatchingFor * Fix PAL splits and symbols, link matching PAL TUs
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JFramework/JFWSystem.h1
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-object.h8
-rw-r--r--include/JSystem/JStudio/JStudio/stb.h1
-rw-r--r--include/JSystem/JStudio/JStudio_JParticle/control.h1
-rw-r--r--include/JSystem/JSupport/JSUFileStream.h2
-rw-r--r--include/SSystem/SComponent/c_angle.h16
-rw-r--r--include/SSystem/SComponent/c_xyz.h20
-rw-r--r--include/Z2AudioLib/Z2LinkMgr.h1
-rw-r--r--include/Z2AudioLib/Z2SpeechMgr2.h1
-rw-r--r--include/d/dolzel.pch2
-rw-r--r--include/d/dolzel_base.pch4
-rw-r--r--include/d/dolzel_rel.pch2
-rw-r--r--include/m_Do/m_Do_graphic.h7
13 files changed, 35 insertions, 31 deletions
diff --git a/include/JSystem/JFramework/JFWSystem.h b/include/JSystem/JFramework/JFWSystem.h
index b535c47da2..dfdbf31def 100644
--- a/include/JSystem/JFramework/JFWSystem.h
+++ b/include/JSystem/JFramework/JFWSystem.h
@@ -52,6 +52,7 @@ struct JFWSystem {
static JUTResFont* systemFont;
static JUTConsoleManager* systemConsoleManager;
static JUTConsole* systemConsole;
+ static bool sInitCalled;
};
#endif /* JFWSYSTEM_H */
diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/include/JSystem/JStudio/JStudio/jstudio-object.h
index e7181f4ae0..c1f98384d6 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-object.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-object.h
@@ -254,7 +254,6 @@ struct TObject_actor : public TObject {
/* 80286910 */ TObject_actor(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_actor*);
- /* 802881A4 */ virtual ~TObject_actor() {}
/* 8028694C */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -272,7 +271,6 @@ struct TObject_ambientLight : public TObject {
/* 80286CFC */ TObject_ambientLight(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_ambientLight*);
- /* 80288144 */ virtual ~TObject_ambientLight() {}
/* 80286D38 */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -306,7 +304,6 @@ struct TObject_camera : public TObject {
/* 80286E7C */ TObject_camera(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_camera*);
- /* 802880E4 */ virtual ~TObject_camera() {}
/* 80286EB8 */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -330,7 +327,6 @@ struct TObject_fog : public TObject {
/* 802871DC */ TObject_fog(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_fog*);
- /* 80288084 */ virtual ~TObject_fog() {}
/* 80287218 */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -362,7 +358,6 @@ struct TObject_light : public TObject {
/* 80287368 */ TObject_light(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_light*);
- /* 80288024 */ virtual ~TObject_light() {}
/* 802873A4 */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -376,7 +371,6 @@ struct TObject_message : public TObject {
/* 80287640 */ TObject_message(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_message*);
- /* 80287FC4 */ virtual ~TObject_message() {}
/* 8028767C */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -411,7 +405,6 @@ struct TObject_particle : public TObject {
/* 8028776C */ TObject_particle(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_particle*);
- /* 80287F64 */ virtual ~TObject_particle() {}
/* 802877A8 */ virtual void do_paragraph(u32, void const*, u32);
};
@@ -450,7 +443,6 @@ struct TObject_sound : public TObject {
/* 80287B9C */ TObject_sound(JStudio::stb::data::TParse_TBlock_object const&,
JStudio::TAdaptor_sound*);
- /* 80287F04 */ virtual ~TObject_sound() {}
/* 80287BD8 */ virtual void do_paragraph(u32, void const*, u32);
};
diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h
index eae49feced..8b5b80f69c 100644
--- a/include/JSystem/JStudio/JStudio/stb.h
+++ b/include/JSystem/JStudio/JStudio/stb.h
@@ -118,7 +118,6 @@ public:
class TObject_control : public TObject {
public:
/* 80289068 */ TObject_control(void const*, u32);
- /* 80289134 */ ~TObject_control() {}
};
// Manages TObjects
diff --git a/include/JSystem/JStudio/JStudio_JParticle/control.h b/include/JSystem/JStudio/JStudio_JParticle/control.h
index ee54a51c91..725751b844 100644
--- a/include/JSystem/JStudio/JStudio_JParticle/control.h
+++ b/include/JSystem/JStudio/JStudio_JParticle/control.h
@@ -44,7 +44,6 @@ struct TAdaptor_particle : public JStudio::TAdaptor_particle {
pOld = NULL;
JUT_ASSERT(113, pThis_!=0);
}
- /* 8028E700 */ virtual ~TJPACallback_emitter_() {}
/* 8028ECC0 */ virtual void execute(JPABaseEmitter*);
/* 8028F060 */ virtual void executeAfter(JPABaseEmitter*);
/* 8028F098 */ virtual void draw(JPABaseEmitter*);
diff --git a/include/JSystem/JSupport/JSUFileStream.h b/include/JSystem/JSupport/JSUFileStream.h
index e19a516df4..08bdf64099 100644
--- a/include/JSystem/JSupport/JSUFileStream.h
+++ b/include/JSystem/JSupport/JSUFileStream.h
@@ -11,8 +11,6 @@ class JKRFile;
*/
class JSUFileInputStream : public JSURandomInputStream {
public:
- virtual ~JSUFileInputStream() {}
-
// TODO: fix return values
/* 802DC638 */ JSUFileInputStream(JKRFile*);
/* 802DC67C */ u32 readData(void*, s32);
diff --git a/include/SSystem/SComponent/c_angle.h b/include/SSystem/SComponent/c_angle.h
index fc3436c64f..af34015ee4 100644
--- a/include/SSystem/SComponent/c_angle.h
+++ b/include/SSystem/SComponent/c_angle.h
@@ -13,9 +13,15 @@ public:
const static cSAngle _90;
const static cSAngle _180;
const static cSAngle _270;
+#ifdef __MWERKS__
cSAngle() {}
~cSAngle() {}
cSAngle(const cSAngle&);
+#else
+ cSAngle() = default;
+ ~cSAngle() = default;
+ cSAngle(const cSAngle&) = default;
+#endif
cSAngle(s16);
cSAngle(float);
s16 Val() const { return this->mAngle; }
@@ -132,17 +138,23 @@ public:
cSAngle mInclination; // original: V
cSAngle mAzimuth; // original: U
+#ifdef __MWERKS__
cSGlobe() {}
+ ~cSGlobe() {}
+ cSGlobe(const cSGlobe&);
+#else
+ cSGlobe() = default;
+ ~cSGlobe() = default;
+ cSGlobe(const cSGlobe&) = default;
+#endif
void R(f32 i_radius) { mRadius = i_radius; }
void U(cSAngle const& i_azimuth) { mAzimuth = i_azimuth.Val(); }
void V(cSAngle const& i_inclination) { mInclination = i_inclination.Val(); }
- cSGlobe(const cSGlobe&);
cSGlobe(float, short, short);
cSGlobe(float, const cSAngle&, const cSAngle&);
cSGlobe(const cXyz&);
- ~cSGlobe() {}
cSGlobe& Formal(void);
void Val(const cSGlobe&);
void Val(float, short, short);
diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h
index 489769cb72..2084f8eeeb 100644
--- a/include/SSystem/SComponent/c_xyz.h
+++ b/include/SSystem/SComponent/c_xyz.h
@@ -13,18 +13,24 @@ struct cXyz : Vec {
static const cXyz BaseXZ;
static const cXyz BaseYZ;
static const cXyz BaseXYZ;
- /* 80009184 */ ~cXyz() {}
- /* inlined */ cXyz() {}
+#ifdef __MWERKS__
+ cXyz() {}
+ ~cXyz() {}
+ cXyz(const cXyz& vec) {
+ x = vec.x;
+ y = vec.y;
+ z = vec.z;
+ }
+#else
+ cXyz() = default;
+ ~cXyz() = default;
+ cXyz(const cXyz& vec) = default;
+#endif
cXyz(f32 x, f32 y, f32 z) {
this->x = x;
this->y = y;
this->z = z;
}
- cXyz(const cXyz& vec) {
- this->x = vec.x;
- this->y = vec.y;
- this->z = vec.z;
- }
cXyz(const Vec& vec) {
this->x = vec.x;
this->y = vec.y;
diff --git a/include/Z2AudioLib/Z2LinkMgr.h b/include/Z2AudioLib/Z2LinkMgr.h
index 66eeef2ca0..35b8ebcb71 100644
--- a/include/Z2AudioLib/Z2LinkMgr.h
+++ b/include/Z2AudioLib/Z2LinkMgr.h
@@ -101,7 +101,6 @@ class Z2CreatureRide;
struct Z2RideSoundStarter : public Z2SoundStarter {
/* 802C5234 */ Z2RideSoundStarter(Z2CreatureRide*);
- /* 802C5078 */ virtual ~Z2RideSoundStarter() {}
/* 802C5284 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
diff --git a/include/Z2AudioLib/Z2SpeechMgr2.h b/include/Z2AudioLib/Z2SpeechMgr2.h
index ee0e3a5e19..bac45adc6f 100644
--- a/include/Z2AudioLib/Z2SpeechMgr2.h
+++ b/include/Z2AudioLib/Z2SpeechMgr2.h
@@ -8,7 +8,6 @@
struct Z2SpeechStarter : public Z2SoundStarter {
/* 802CCFB8 */ Z2SpeechStarter();
- /* 802CBCEC */ virtual ~Z2SpeechStarter() {}
/* 802CCFF8 */ virtual bool startSound(JAISoundID, JAISoundHandle*,
JGeometry::TVec3<f32> const*, u32, f32, f32, f32, f32,
f32, u32);
diff --git a/include/d/dolzel.pch b/include/d/dolzel.pch
index 8c4611d50a..21d68d9deb 100644
--- a/include/d/dolzel.pch
+++ b/include/d/dolzel.pch
@@ -1,6 +1,6 @@
#ifndef DOLZEL_PCH
#define DOLZEL_PCH
-#include "d/dolzel_base.pch"
+#include "d/dolzel_base.pch" // IWYU pragma: export
#endif // DOLZEL_PCH
diff --git a/include/d/dolzel_base.pch b/include/d/dolzel_base.pch
index bac86e13a5..8e5582f71e 100644
--- a/include/d/dolzel_base.pch
+++ b/include/d/dolzel_base.pch
@@ -10,8 +10,8 @@
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
// Fixes weak function ordering
-#include "cmath.h"
-#include "string.h"
+#include "cmath.h" // IWYU pragma: export
+#include "string.h" // IWYU pragma: export
#include "d/d_com_inf_game.h" // IWYU pragma: export
#include "d/d_bg_w.h" // IWYU pragma: export
#include "m_Do/m_Do_graphic.h" // IWYU pragma: export
diff --git a/include/d/dolzel_rel.pch b/include/d/dolzel_rel.pch
index 0a83b35bf3..70d25504da 100644
--- a/include/d/dolzel_rel.pch
+++ b/include/d/dolzel_rel.pch
@@ -1,6 +1,6 @@
#ifndef DOLZEL_REL_PCH
#define DOLZEL_REL_PCH
-#include "d/dolzel_base.pch"
+#include "d/dolzel_base.pch" // IWYU pragma: export
#endif // DOLZEL_REL_PCH
diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h
index eea4fa6661..b6363b849e 100644
--- a/include/m_Do/m_Do_graphic.h
+++ b/include/m_Do/m_Do_graphic.h
@@ -8,8 +8,6 @@
int mDoGph_Create();
void mDoGph_drawFilterQuad(s8 param_0, s8 param_1);
-extern bool data_80450BE7; // AutoForcus
-
struct ResTIMG;
class mDoGph_gInf_c {
public:
@@ -71,8 +69,8 @@ public:
static void setBlureRate(u8 i_rate) { mBlureRate = i_rate; }
static u8 getBlureRate() { return mBlureRate; }
static MtxP getBlureMtx() { return mBlureMtx; }
- static void offAutoForcus() { data_80450BE7 = 0; }
- static BOOL isAutoForcus() { return data_80450BE7; }
+ static void offAutoForcus() { mAutoForcus = 0; }
+ static BOOL isAutoForcus() { return mAutoForcus; }
static void setTickRate(u32 rate) { JFWDisplay::getManager()->setTickRate(rate); }
static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); }
@@ -174,6 +172,7 @@ public:
static bool mBlureFlag;
static u8 mBlureRate;
static u8 mFade;
+ static bool mAutoForcus;
#if PLATFORM_WII || PLATFORM_SHIELD
static cXyz m_nowEffPos;