From fcf1f4bed108d23bab4177906375e31947a0f7aa Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Tue, 24 Feb 2026 16:56:49 +0100 Subject: [PATCH] Fix wrong forward declares (struct/class) Requires removing the now-matching symbols from jsystem_stubs.cpp --- include/JSystem/J3DGraphBase/J3DShape.h | 2 +- include/JSystem/JAWExtSystem/JAWExtSystem.h | 2 +- include/JSystem/JAWExtSystem/JAWWindow.h | 2 +- include/JSystem/JAWWinLib/JAWHioReceiver.h | 2 +- include/JSystem/JAudio2/JAIStreamMgr.h | 2 +- include/JSystem/JAudio2/JASAramStream.h | 2 +- include/JSystem/JAudio2/JASBank.h | 2 +- include/JSystem/JAudio2/JASTrack.h | 2 +- include/JSystem/JAudio2/JAUSectionHeap.h | 8 ++++---- include/JSystem/JAudio2/JAUSeqCollection.h | 4 ++-- include/JSystem/JAudio2/JAUSeqDataBlockMgr.h | 4 ++-- include/JSystem/JHostIO/JORReflexible.h | 4 ++-- include/JSystem/JParticle/JPABaseShape.h | 2 +- include/JSystem/JParticle/JPAChildShape.h | 2 +- include/JSystem/JParticle/JPADynamicsBlock.h | 2 +- include/JSystem/JParticle/JPAExTexShape.h | 2 +- include/JSystem/JParticle/JPAExtraShape.h | 2 +- include/JSystem/JParticle/JPAFieldBlock.h | 2 +- include/JSystem/JParticle/JPAResource.h | 2 +- .../JSystem/JStudio/JStudio_JPreviewer/control.h | 2 +- include/SSystem/SComponent/c_m3d.h | 2 +- include/Z2AudioLib/Z2LinkMgr.h | 2 +- include/Z2AudioLib/Z2SoundObject.h | 2 +- include/d/actor/d_a_b_yo.h | 2 +- include/d/d_event_data.h | 2 +- include/d/d_jcam_editor.h | 2 +- include/d/d_jpreviewer.h | 2 +- include/d/d_kankyo.h | 14 +++++++------- include/d/d_kankyo_wether.h | 2 +- include/d/d_msg_flow.h | 2 +- include/f_op/f_op_msg_mng.h | 2 +- include/m_Do/m_Do_ext.h | 4 ++-- src/dusk/jsystem_stubs.cpp | 9 --------- 33 files changed, 45 insertions(+), 54 deletions(-) diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index 151f4235ab..8687b2b794 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -100,7 +100,7 @@ protected: class J3DMaterial; class J3DVertexData; -class J3DDrawMtxData; +struct J3DDrawMtxData; enum J3DShpFlag { J3DShpFlag_Visible = 0x0001, diff --git a/include/JSystem/JAWExtSystem/JAWExtSystem.h b/include/JSystem/JAWExtSystem/JAWExtSystem.h index 609592d832..a0a9fce32b 100644 --- a/include/JSystem/JAWExtSystem/JAWExtSystem.h +++ b/include/JSystem/JAWExtSystem/JAWExtSystem.h @@ -5,7 +5,7 @@ #include "JSystem/JGadget/std-list.h" class JAWWindow; -class JUTGamePad; +struct JUTGamePad; namespace JAWExtSystem { BOOL registWindow(u32, JAWWindow*, int, int); diff --git a/include/JSystem/JAWExtSystem/JAWWindow.h b/include/JSystem/JAWExtSystem/JAWWindow.h index 6228c10376..7a570565cd 100644 --- a/include/JSystem/JAWExtSystem/JAWWindow.h +++ b/include/JSystem/JAWExtSystem/JAWWindow.h @@ -7,7 +7,7 @@ #include "JSystem/JGeometry.h" class JAWGraphContext; -class JUTGamePad; +struct JUTGamePad; class JUTPoint { public: diff --git a/include/JSystem/JAWWinLib/JAWHioReceiver.h b/include/JSystem/JAWWinLib/JAWHioReceiver.h index bf89b70040..a38506f6af 100644 --- a/include/JSystem/JAWWinLib/JAWHioReceiver.h +++ b/include/JSystem/JAWWinLib/JAWHioReceiver.h @@ -6,7 +6,7 @@ #include "JSystem/JHostIO/JHICommonMem.h" #include "JSystem/JAudio2/JAISound.h" -class JAISeqData; +struct JAISeqData; class JADHioReceiver : JHITag { public: diff --git a/include/JSystem/JAudio2/JAIStreamMgr.h b/include/JSystem/JAudio2/JAIStreamMgr.h index 3b2b9c7f42..7c8e68a852 100644 --- a/include/JSystem/JAudio2/JAIStreamMgr.h +++ b/include/JSystem/JAudio2/JAIStreamMgr.h @@ -6,7 +6,7 @@ #include "JSystem/JUtility/JUTAssert.h" class JAIStreamAramMgr; -class JAIStreamDataMgr; +struct JAIStreamDataMgr; /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASAramStream.h b/include/JSystem/JAudio2/JASAramStream.h index f737f76cd3..385b47f627 100644 --- a/include/JSystem/JAudio2/JASAramStream.h +++ b/include/JSystem/JAudio2/JASAramStream.h @@ -8,7 +8,7 @@ class JASChannel; namespace JASDsp { - class TChannel; + struct TChannel; } /** diff --git a/include/JSystem/JAudio2/JASBank.h b/include/JSystem/JAudio2/JASBank.h index f99d245d89..9c2fae3dfa 100644 --- a/include/JSystem/JAudio2/JASBank.h +++ b/include/JSystem/JAudio2/JASBank.h @@ -8,7 +8,7 @@ class JASInstParam; class JASWaveBank; namespace JASDsp { - class TChannel; + struct TChannel; } /** diff --git a/include/JSystem/JAudio2/JASTrack.h b/include/JSystem/JAudio2/JASTrack.h index 4b0d3ea0fa..06a54ebec8 100644 --- a/include/JSystem/JAudio2/JASTrack.h +++ b/include/JSystem/JAudio2/JASTrack.h @@ -12,7 +12,7 @@ struct JASSoundParams; namespace JASDsp { - class TChannel; + struct TChannel; extern const u32 FILTER_MODE_IIR; }; diff --git a/include/JSystem/JAudio2/JAUSectionHeap.h b/include/JSystem/JAudio2/JAUSectionHeap.h index a7535500a4..b6aec38a31 100644 --- a/include/JSystem/JAudio2/JAUSectionHeap.h +++ b/include/JSystem/JAudio2/JAUSectionHeap.h @@ -6,10 +6,10 @@ #include "JSystem/JKernel/JKRDisposer.h" #include -class JAISeqData; -class JAISeqDataMgr; -class JAISeqDataUser; -class JAIStreamDataMgr; +struct JAISeqData; +struct JAISeqDataMgr; +struct JAISeqDataUser; +struct JAIStreamDataMgr; class JASVoiceBank; class JAUBankTableLink; class JAUDisposer_; diff --git a/include/JSystem/JAudio2/JAUSeqCollection.h b/include/JSystem/JAudio2/JAUSeqCollection.h index fae2688bed..37c5afc6d3 100644 --- a/include/JSystem/JAudio2/JAUSeqCollection.h +++ b/include/JSystem/JAudio2/JAUSeqCollection.h @@ -3,8 +3,8 @@ #include "JSystem/JAudio2/JAISeqDataMgr.h" -class JAISeqData; -class JAISeqDataRegion; +struct JAISeqData; +struct JAISeqDataRegion; /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h b/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h index aa77383a4f..5c04bf66d3 100644 --- a/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h +++ b/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h @@ -4,8 +4,8 @@ #include "JSystem/JAudio2/JAISeqDataMgr.h" #include "JSystem/JSupport/JSUList.h" -class JAISeqData; -class JAISeqDataUser; +struct JAISeqData; +struct JAISeqDataUser; class JKRArchive; /** diff --git a/include/JSystem/JHostIO/JORReflexible.h b/include/JSystem/JHostIO/JORReflexible.h index a0e0aeaaa3..6af8780515 100644 --- a/include/JSystem/JHostIO/JORReflexible.h +++ b/include/JSystem/JHostIO/JORReflexible.h @@ -33,8 +33,8 @@ struct JORNodeEvent : JOREvent { /* 0x00 */ u32 field_0x0; }; -struct JORMContext; -struct JORServer; +class JORMContext; +class JORServer; class JOREventListener { public: diff --git a/include/JSystem/JParticle/JPABaseShape.h b/include/JSystem/JParticle/JPABaseShape.h index 35dcbb83ad..d02ac150bc 100644 --- a/include/JSystem/JParticle/JPABaseShape.h +++ b/include/JSystem/JParticle/JPABaseShape.h @@ -3,7 +3,7 @@ #include -class JPAEmitterWorkData; +struct JPAEmitterWorkData; class JPABaseParticle; class JKRHeap; diff --git a/include/JSystem/JParticle/JPAChildShape.h b/include/JSystem/JParticle/JPAChildShape.h index 9cfc484460..ff22d2d69e 100644 --- a/include/JSystem/JParticle/JPAChildShape.h +++ b/include/JSystem/JParticle/JPAChildShape.h @@ -3,7 +3,7 @@ #include -class JPAEmitterWorkData; +struct JPAEmitterWorkData; class JPABaseParticle; /** diff --git a/include/JSystem/JParticle/JPADynamicsBlock.h b/include/JSystem/JParticle/JPADynamicsBlock.h index a27922913e..fa3e9012b3 100644 --- a/include/JSystem/JParticle/JPADynamicsBlock.h +++ b/include/JSystem/JParticle/JPADynamicsBlock.h @@ -5,7 +5,7 @@ #include -class JPAEmitterWorkData; +struct JPAEmitterWorkData; /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAExTexShape.h b/include/JSystem/JParticle/JPAExTexShape.h index 43175517ec..610a516290 100644 --- a/include/JSystem/JParticle/JPAExTexShape.h +++ b/include/JSystem/JParticle/JPAExTexShape.h @@ -3,7 +3,7 @@ #include -class JPAEmitterWorkData; +struct JPAEmitterWorkData; /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAExtraShape.h b/include/JSystem/JParticle/JPAExtraShape.h index 9e9f315ff5..613413711c 100644 --- a/include/JSystem/JParticle/JPAExtraShape.h +++ b/include/JSystem/JParticle/JPAExtraShape.h @@ -3,7 +3,7 @@ #include -class JPAEmitterWorkData; +struct JPAEmitterWorkData; class JPABaseParticle; /** diff --git a/include/JSystem/JParticle/JPAFieldBlock.h b/include/JSystem/JParticle/JPAFieldBlock.h index 56a2de1d15..59186439ab 100644 --- a/include/JSystem/JParticle/JPAFieldBlock.h +++ b/include/JSystem/JParticle/JPAFieldBlock.h @@ -5,7 +5,7 @@ #include class JKRHeap; -class JPAEmitterWorkData; +struct JPAEmitterWorkData; class JPABaseParticle; class JPAFieldBlock; diff --git a/include/JSystem/JParticle/JPAResource.h b/include/JSystem/JParticle/JPAResource.h index f07868208d..2d9aec49ef 100644 --- a/include/JSystem/JParticle/JPAResource.h +++ b/include/JSystem/JParticle/JPAResource.h @@ -4,7 +4,7 @@ #include class JKRHeap; -class JPAEmitterWorkData; +struct JPAEmitterWorkData; class JPABaseEmitter; class JPABaseParticle; diff --git a/include/JSystem/JStudio/JStudio_JPreviewer/control.h b/include/JSystem/JStudio/JStudio_JPreviewer/control.h index 5d19028ca9..0957620168 100644 --- a/include/JSystem/JStudio/JStudio_JPreviewer/control.h +++ b/include/JSystem/JStudio/JStudio_JPreviewer/control.h @@ -8,7 +8,7 @@ class J2DOrthoGraph; class JUTFont; -class JUTGamePad; +struct JUTGamePad; namespace JStudio { class TControl; diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 12303b9a65..58f0e28753 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -12,7 +12,7 @@ class cM3dGPla; class cM3dGSph; class cM3dGTri; class csXyz; -class cXyz; +struct cXyz; struct cM3d_Range { /* 0x0 */ f32 mMin; diff --git a/include/Z2AudioLib/Z2LinkMgr.h b/include/Z2AudioLib/Z2LinkMgr.h index 7432a2bc82..cf05ed14d9 100644 --- a/include/Z2AudioLib/Z2LinkMgr.h +++ b/include/Z2AudioLib/Z2LinkMgr.h @@ -61,7 +61,7 @@ public: static Z2CreatureLink* getLink() { return mLinkPtr; } friend class Z2LinkSoundStarter; - friend class Z2RideSoundStarter; + friend struct Z2RideSoundStarter; private: /* 0x90 Z2LinkSoundStarter */ diff --git a/include/Z2AudioLib/Z2SoundObject.h b/include/Z2AudioLib/Z2SoundObject.h index 46256aeda7..ca4b69a520 100644 --- a/include/Z2AudioLib/Z2SoundObject.h +++ b/include/Z2AudioLib/Z2SoundObject.h @@ -4,7 +4,7 @@ #include "Z2AudioLib/Z2SoundHandles.h" #include "JSystem/JAudio2/JAUSoundAnimator.h" -class Z2SoundStarter; +struct Z2SoundStarter; class Z2SoundObjBase : public Z2SoundHandles #if DEBUG diff --git a/include/d/actor/d_a_b_yo.h b/include/d/actor/d_a_b_yo.h index b4cef6d648..a133d364d6 100644 --- a/include/d/actor/d_a_b_yo.h +++ b/include/d/actor/d_a_b_yo.h @@ -8,7 +8,7 @@ #include "d/d_bg_s_acch.h" class dBgW; -class msg_class; +struct msg_class; /** * @ingroup actors-enemies diff --git a/include/d/d_event_data.h b/include/d/d_event_data.h index 17549363c1..22a835ec24 100644 --- a/include/d/d_event_data.h +++ b/include/d/d_event_data.h @@ -4,7 +4,7 @@ #include "global.h" #include "f_pc/f_pc_base.h" -class msg_class; +struct msg_class; struct event_binary_data_header { /* 0x00 */ u32 eventTop; // offset to Event chunk diff --git a/include/d/d_jcam_editor.h b/include/d/d_jcam_editor.h index 87f0c890b0..3662f1c956 100644 --- a/include/d/d_jcam_editor.h +++ b/include/d/d_jcam_editor.h @@ -6,7 +6,7 @@ #include "JSystem/JUtility/JUTResFont.h" #include "JSystem/JKernel/JKRExpHeap.h" -class JUTGamePad; +struct JUTGamePad; class dJcame_c { public: diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h index b34880c1c0..9971fa6674 100644 --- a/include/d/d_jpreviewer.h +++ b/include/d/d_jpreviewer.h @@ -10,7 +10,7 @@ namespace JStudio { class J2DOrthoGraph; class JKRExpHeap; -class JUTGamePad; +struct JUTGamePad; class JUTResFont; class tParse_; diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index 277e6d6dbc..3c81f08d10 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -12,7 +12,7 @@ class JPABaseEmitter; class cBgS_PolyInfo; -class color_RGB_class; +struct color_RGB_class; struct LIGHT_INFLUENCE { /* 0x00 */ cXyz mPosition; @@ -148,12 +148,12 @@ struct LightStatus { }; // Size: 0xE8 class fopAc_ac_c; -class dKyd_lightSchejule; -class stage_palette_info_class; -class stage_pselect_info_class; -class stage_envr_info_class; -class stage_vrboxcol_info_class; -class stage_plight_info_class; +struct dKyd_lightSchejule; +struct stage_palette_info_class; +struct stage_pselect_info_class; +struct stage_envr_info_class; +struct stage_vrboxcol_info_class; +struct stage_plight_info_class; class kytag08_class; struct dKy_pol_arg_struct { diff --git a/include/d/d_kankyo_wether.h b/include/d/d_kankyo_wether.h index 14a8d00657..31aa1fd8e3 100644 --- a/include/d/d_kankyo_wether.h +++ b/include/d/d_kankyo_wether.h @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_sxyz.h" #include "SSystem/SComponent/c_xyz.h" -class WIND_INFLUENCE; +struct WIND_INFLUENCE; void dKyw_wether_draw(); void dKyw_wether_delete(); diff --git a/include/d/d_msg_flow.h b/include/d/d_msg_flow.h index 89037d78cb..8f242f3eec 100644 --- a/include/d/d_msg_flow.h +++ b/include/d/d_msg_flow.h @@ -16,7 +16,7 @@ enum { }; class fopAc_ac_c; -class msg_class; +struct msg_class; // all mesg_flow_node structs members might be wrong struct mesg_flow_node { diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h index 214d38da8e..9bb8bc0ff3 100644 --- a/include/f_op/f_op_msg_mng.h +++ b/include/f_op/f_op_msg_mng.h @@ -8,7 +8,7 @@ class JKRExpHeap; class JKRHeap; class fopAc_ac_c; -class msg_class; +struct msg_class; struct msg_process_profile_definition { /* 0x00 */ leaf_process_profile_definition base; diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 35e81f0059..4478098064 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -221,7 +221,7 @@ private: /* 0x14 */ J3DAnmCluster* mpAnm; }; -class J3DTransformInfo; +struct J3DTransformInfo; class mDoExt_AnmRatioPack { public: @@ -832,7 +832,7 @@ intptr_t mDoExt_getSafeZeldaHeapSize(); JKRHeap* mDoExt_createHostIOHeap(u32, JKRHeap*); #endif -struct JUTFont; +class JUTFont; JUTFont* mDoExt_getMesgFont(); JUTFont* mDoExt_getSubFont(); JUTFont* mDoExt_getRubyFont(); diff --git a/src/dusk/jsystem_stubs.cpp b/src/dusk/jsystem_stubs.cpp index 3a1b18fbab..54f870ba56 100644 --- a/src/dusk/jsystem_stubs.cpp +++ b/src/dusk/jsystem_stubs.cpp @@ -5,10 +5,6 @@ #pragma mark J3DShapeTable #include "JSystem/J3DGraphAnimator/J3DShapeTable.h" -void J3DShapeTable::initShapeNodes(J3DDrawMtxData* mtxData, J3DVertexData* vtxData) { - puts("J3DShapeTable::initShapeNodes is a stub"); -} - // JAISe::JAISeMgr_startID_, JAISeq::JAISeqMgr_startID_, JAIStream::JAIStreamMgr_startID_ // are compiled from their real source files (JAISe.obj, JAISeq.obj, JAIStream.obj) @@ -25,11 +21,6 @@ JAUSoundNameTable* JAUSection::newSoundNameTable(void const* data, u32 size, boo return nullptr; } -JAIStreamDataMgr* JAUSection::newStreamFileTable(void const* data, bool flag) { - puts("JAUSection::newStreamFileTable is a stub"); - return nullptr; -} - #pragma mark JASHeap #include "JSystem/JAudio2/JASHeapCtrl.h"