summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2025-04-29 09:49:09 -0700
committerGitHub <noreply@github.com>2025-04-29 12:49:09 -0400
commit5e7b59f2fe2f0a7e39d2b7ba6f9e19f3bbdf3254 (patch)
tree07cf9ad7a5f7bf7423c0a520b8d64d024990136d
parenteef20535ac9416dcdc8164ecb2c9d4b7bb50f365 (diff)
Improve compiler compatibility (#743)
* fix returns * use standard C headers * struct/class mismatch * explicit this in template * switch variable scope * C standard compliance * & l-value
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DTevs.h2
-rw-r--r--include/JSystem/J3DGraphLoader/J3DAnmLoader.h24
-rw-r--r--include/JSystem/J3DGraphLoader/J3DMaterialFactory.h6
-rw-r--r--include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h34
-rw-r--r--include/JSystem/JAudio/JAIAnimation.h2
-rw-r--r--include/JSystem/JAudio/JASDrumSet.h2
-rw-r--r--include/JSystem/JAudio/osdsp.h2
-rw-r--r--include/JSystem/JAudio/osdsp_task.h4
-rw-r--r--include/JSystem/JGadget/linklist.h2
-rw-r--r--include/JSystem/JMessage/processor.h4
-rw-r--r--include/JSystem/JParticle/JPAField.h2
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-control.h2
-rw-r--r--include/JSystem/JStudio/JStudio/stb.h2
-rw-r--r--include/JSystem/JStudio/JStudio_JAudio/control.h4
-rw-r--r--include/SSystem/SComponent/c_m2d.h2
-rw-r--r--include/d/actor/d_a_bk.h2
-rw-r--r--include/d/actor/d_a_wind_tag.h2
-rw-r--r--include/d/actor/d_a_ykgr.h2
-rw-r--r--include/d/d_2dnumber.h2
-rw-r--r--include/d/d_auction_screen.h2
-rw-r--r--include/d/d_camera.h2
-rw-r--r--include/d/d_com_inf_game.h2
-rw-r--r--include/d/d_drawlist.h4
-rw-r--r--include/d/d_event.h2
-rw-r--r--include/d/d_kankyo.h12
-rw-r--r--include/d/d_kankyo_demo.h2
-rw-r--r--include/d/d_kankyo_wether.h2
-rw-r--r--include/d/d_map.h2
-rw-r--r--include/d/d_menu_collect.h2
-rw-r--r--include/d/d_menu_dmap.h2
-rw-r--r--include/d/d_menu_fmap.h2
-rw-r--r--include/d/d_menu_fmap2.h4
-rw-r--r--include/d/d_menu_item.h2
-rw-r--r--include/d/d_menu_option.h2
-rw-r--r--include/d/d_menu_save.h2
-rw-r--r--include/d/d_meter.h2
-rw-r--r--include/d/d_minigame_starter.h2
-rw-r--r--include/d/d_minigame_terminater.h2
-rw-r--r--include/d/d_operate_wind.h2
-rw-r--r--include/d/d_particle.h2
-rw-r--r--include/d/d_picture_box.h4
-rw-r--r--include/dolphin/os/OSAlarm.h2
-rw-r--r--src/JSystem/J2DGraph/J2DTextBox.cpp2
-rw-r--r--src/JSystem/JAudio/dspproc.c9
-rw-r--r--src/JSystem/JAudio/dsptask.c2
-rw-r--r--src/JSystem/JMessage/processor.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/functionvalue.cpp2
-rw-r--r--src/d/actor/d_a_player_boomerang.inc8
-rw-r--r--src/d/actor/d_a_player_bottle.inc2
-rw-r--r--src/d/actor/d_a_player_hook.inc4
-rw-r--r--src/d/actor/d_a_player_rope.inc6
-rw-r--r--src/d/d_camera.cpp2
-rw-r--r--src/d/d_mesg.cpp6
-rw-r--r--src/d/d_msg.cpp2
-rw-r--r--src/f_op/f_op_msg_mng.cpp4
-rw-r--r--src/m_Do/m_Do_MemCardRWmng.cpp2
57 files changed, 113 insertions, 106 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index c96709d6..266636a8 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -55,7 +55,7 @@ public:
class J3DMaterial;
class J3DVertexData;
-class J3DDrawMtxData;
+struct J3DDrawMtxData;
enum J3DShpFlag {
J3DShpFlag_Hide = 0x0001,
diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h
index 10f13e34..d3d75b26 100644
--- a/include/JSystem/J3DGraphBase/J3DTevs.h
+++ b/include/JSystem/J3DGraphBase/J3DTevs.h
@@ -204,7 +204,7 @@ struct J3DNBTScale : public J3DNBTScaleInfo {
Vec* getScale() { return &mScale; }
};
-class J3DTexCoord;
+struct J3DTexCoord;
void loadTexCoordGens(u32, J3DTexCoord*);
void loadNBTScale(J3DNBTScale& param_0);
diff --git a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h
index a97bf995..5199d4d9 100644
--- a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h
+++ b/include/JSystem/J3DGraphLoader/J3DAnmLoader.h
@@ -7,29 +7,29 @@ enum J3DAnmLoaderDataBaseFlag { J3DLOADER_UNK_FLAG0 };
class J3DAnmBase;
class J3DAnmClusterFull;
-class J3DAnmClusterFullData;
+struct J3DAnmClusterFullData;
class J3DAnmClusterKey;
-class J3DAnmClusterKeyData;
+struct J3DAnmClusterKeyData;
class J3DAnmColorFull;
-class J3DAnmColorFullData;
+struct J3DAnmColorFullData;
class J3DAnmColorKey;
-class J3DAnmColorKeyData;
+struct J3DAnmColorKeyData;
class J3DAnmTevRegKey;
-class J3DAnmTevRegKeyData;
+struct J3DAnmTevRegKeyData;
class J3DAnmTexPattern;
-class J3DAnmTexPatternFullData;
+struct J3DAnmTexPatternFullData;
class J3DAnmTextureSRTKey;
-class J3DAnmTextureSRTKeyData;
+struct J3DAnmTextureSRTKeyData;
class J3DAnmTransformFull;
-class J3DAnmTransformFullData;
+struct J3DAnmTransformFullData;
class J3DAnmTransformKey;
-class J3DAnmTransformKeyData;
+struct J3DAnmTransformKeyData;
class J3DAnmVisibilityFull;
-class J3DAnmVisibilityFullData;
+struct J3DAnmVisibilityFullData;
class J3DAnmVtxColorFull;
-class J3DAnmVtxColorFullData;
+struct J3DAnmVtxColorFullData;
class J3DAnmVtxColorKey;
-class J3DAnmVtxColorKeyData;
+struct J3DAnmVtxColorKeyData;
struct J3DAnmLoaderDataBase {
static J3DAnmBase* load(const void*);
diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h b/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
index 8b6c52c6..d97cb003 100644
--- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
+++ b/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h
@@ -11,7 +11,7 @@ struct J3DMaterialDLBlock;
struct J3DMaterialInitData;
struct J3DIndInitData;
struct J3DColorChanInfo;
-struct J3DLightInfo;
+class J3DLightInfo;
struct J3DTexCoordInfo;
struct J3DTexCoord2Info;
struct J3DTexMtxInfo;
@@ -24,13 +24,13 @@ struct J3DAlphaCompInfo;
struct J3DBlendInfo;
struct J3DZModeInfo;
struct J3DNBTScaleInfo;
-struct J3DCurrentMtxInfo;
+class J3DCurrentMtxInfo;
struct J3DColorChan;
struct J3DGXColor;
struct J3DGXColorS10;
struct J3DTexCoord;
-struct J3DTexMtx;
+class J3DTexMtx;
struct J3DTevOrder;
struct J3DTevStage;
struct J3DTevSwapMode;
diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h b/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
index e1113eca..d4154791 100644
--- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
+++ b/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h
@@ -7,24 +7,24 @@
class J3DMaterial;
struct J3DMaterialBlock_v21;
-class J3DMaterialInitData_v21;
-class J3DIndInitData;
-class J3DColorChanInfo;
+struct J3DMaterialInitData_v21;
+struct J3DIndInitData;
+struct J3DColorChanInfo;
class J3DLightInfo;
-class J3DTexCoordInfo;
-class J3DTexCoord2Info;
-class J3DTexMtxInfo;
-class J3DTevOrderInfo;
-class J3DTevStageInfo;
-class J3DTevSwapModeInfo;
-class J3DTevSwapModeTableInfo;
-class J3DFogInfo;
-class J3DAlphaCompInfo;
-class J3DBlendInfo;
-class J3DZModeInfo;
-class J3DNBTScaleInfo;
-class J3DDisplayListInit;
-class J3DPatchingInfo;
+struct J3DTexCoordInfo;
+struct J3DTexCoord2Info;
+struct J3DTexMtxInfo;
+struct J3DTevOrderInfo;
+struct J3DTevStageInfo;
+struct J3DTevSwapModeInfo;
+struct J3DTevSwapModeTableInfo;
+struct J3DFogInfo;
+struct J3DAlphaCompInfo;
+struct J3DBlendInfo;
+struct J3DZModeInfo;
+struct J3DNBTScaleInfo;
+struct J3DDisplayListInit;
+struct J3DPatchingInfo;
class J3DCurrentMtxInfo;
struct J3DMaterialInitData_v21 {
diff --git a/include/JSystem/JAudio/JAIAnimation.h b/include/JSystem/JAudio/JAIAnimation.h
index bed199d7..9df25641 100644
--- a/include/JSystem/JAudio/JAIAnimation.h
+++ b/include/JSystem/JAudio/JAIAnimation.h
@@ -3,7 +3,7 @@
#include "dolphin/types.h"
-class Vec;
+struct Vec;
class JAISound;
class JAIBasic;
namespace JAInter {
diff --git a/include/JSystem/JAudio/JASDrumSet.h b/include/JSystem/JAudio/JASDrumSet.h
index f758d22e..fd3dee3f 100644
--- a/include/JSystem/JAudio/JASDrumSet.h
+++ b/include/JSystem/JAudio/JASDrumSet.h
@@ -5,7 +5,7 @@
namespace JASystem {
class TInstEffect;
- class TInstParam;
+ struct TInstParam;
class TDrumSet : public TInst {
public:
diff --git a/include/JSystem/JAudio/osdsp.h b/include/JSystem/JAudio/osdsp.h
index 7cc4d6a1..8e9e6e19 100644
--- a/include/JSystem/JAudio/osdsp.h
+++ b/include/JSystem/JAudio/osdsp.h
@@ -3,6 +3,6 @@
#include "dolphin/dsp.h"
-void DSPAddPriorTask(STRUCT_DSP_TASK*);
+void DSPAddPriorTask(DSPTaskInfo*);
#endif /* OSDSP_H */
diff --git a/include/JSystem/JAudio/osdsp_task.h b/include/JSystem/JAudio/osdsp_task.h
index 0000efd0..0a8db375 100644
--- a/include/JSystem/JAudio/osdsp_task.h
+++ b/include/JSystem/JAudio/osdsp_task.h
@@ -8,7 +8,11 @@ typedef struct OSContext OSContext;
extern DSPTaskInfo* DSP_prior_task;
+#ifdef __cplusplus
extern "C" void __DSPHandler(int, OSContext*);
+#else
+void __DSPHandler(int, OSContext*);
+#endif
void DsyncFrame2(u32, u32, u32);
void Dsp_Update_Request();
BOOL Dsp_Running_Check();
diff --git a/include/JSystem/JGadget/linklist.h b/include/JSystem/JGadget/linklist.h
index 2b60ce03..9ad3148d 100644
--- a/include/JSystem/JGadget/linklist.h
+++ b/include/JSystem/JGadget/linklist.h
@@ -184,7 +184,7 @@ struct TLinkList_factory : public TLinkList<T, I> {
virtual T* Do_create() = 0;
virtual void Do_destroy(T*) = 0;
void Erase_destroy(T* elem) {
- Erase(elem);
+ this->Erase(elem);
Do_destroy(elem);
}
};
diff --git a/include/JSystem/JMessage/processor.h b/include/JSystem/JMessage/processor.h
index f55597a5..b63e80be 100644
--- a/include/JSystem/JMessage/processor.h
+++ b/include/JSystem/JMessage/processor.h
@@ -7,7 +7,7 @@ namespace JMessage {
struct TReference;
struct TControl;
-struct TResource;
+class TResource;
struct TProcessor {
public:
@@ -80,7 +80,7 @@ public:
static const char* process_select_(TProcessor*);
void pushCurrent(const char*);
- const char* popCurrent();
+ void popCurrent();
void on_select_begin(OnSelectBeginCallBack, const void*, const char*, u32);
void on_select_end();
void on_select_separate();
diff --git a/include/JSystem/JParticle/JPAField.h b/include/JSystem/JParticle/JPAField.h
index f82dbadd..ec36021e 100644
--- a/include/JSystem/JParticle/JPAField.h
+++ b/include/JSystem/JParticle/JPAField.h
@@ -5,7 +5,7 @@
#include "JSystem/JGeometry.h"
class JPADataBlockLinkInfo;
-class JPAEmitterInfo;
+struct JPAEmitterInfo;
class JPAFieldData;
class JPABaseParticle;
class JPABaseField;
diff --git a/include/JSystem/JStudio/JStudio/jstudio-control.h b/include/JSystem/JStudio/JStudio/jstudio-control.h
index 234e2e66..3fca92ee 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-control.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-control.h
@@ -8,7 +8,7 @@
#include "dolphin/mtx/mtxvec.h"
namespace JStudio {
-struct TObject;
+class TObject;
struct TCreateObject {
TCreateObject() {}
virtual ~TCreateObject() = 0;
diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h
index 5735c928..03c68331 100644
--- a/include/JSystem/JStudio/JStudio/stb.h
+++ b/include/JSystem/JStudio/JStudio/stb.h
@@ -7,7 +7,7 @@
#include "global.h"
namespace JStudio {
-struct TObject;
+class TObject;
namespace stb {
class TControl;
diff --git a/include/JSystem/JStudio/JStudio_JAudio/control.h b/include/JSystem/JStudio/JStudio_JAudio/control.h
index d87b83b7..4e8010ab 100644
--- a/include/JSystem/JStudio/JStudio_JAudio/control.h
+++ b/include/JSystem/JStudio/JStudio_JAudio/control.h
@@ -5,8 +5,8 @@
#include "JSystem/JStudio/JStudio/jstudio-object.h"
#include "JSystem/JStage/JSGSystem.h"
-struct JAIBasic;
-struct JAISound;
+class JAIBasic;
+class JAISound;
namespace JStudio_JAudio {
typedef JStudio::TObject* (*JStudioAudioCreateFunc)(const JStudio::stb::data::TParse_TBlock_object&, JAIBasic*);
typedef void (JAISound::*TVVOSoundSetFunc)(f32, u32); // e.g. JAISound::setDirectVolume, JAISound::setDirectPitch
diff --git a/include/SSystem/SComponent/c_m2d.h b/include/SSystem/SComponent/c_m2d.h
index 8fca640d..ade8e9d2 100644
--- a/include/SSystem/SComponent/c_m2d.h
+++ b/include/SSystem/SComponent/c_m2d.h
@@ -3,7 +3,7 @@
#include "global.h"
-struct cM2dGCir;
+class cM2dGCir;
void cM2d_CrossCirLin(cM2dGCir&, float, float, float, float, float*, float*);
diff --git a/include/d/actor/d_a_bk.h b/include/d/actor/d_a_bk.h
index 6b528d05..ab0cdaf0 100644
--- a/include/d/actor/d_a_bk.h
+++ b/include/d/actor/d_a_bk.h
@@ -6,7 +6,7 @@
#include "SSystem/SComponent/c_phase.h"
#include "m_Do/m_Do_hostIO.h"
-class dPath;
+struct dPath;
namespace daObj_Search { class Act_c; };
struct br_s;
diff --git a/include/d/actor/d_a_wind_tag.h b/include/d/actor/d_a_wind_tag.h
index 6d3a04e0..441e6359 100644
--- a/include/d/actor/d_a_wind_tag.h
+++ b/include/d/actor/d_a_wind_tag.h
@@ -8,7 +8,7 @@
#include "m_Do/m_Do_ext.h"
class JPABaseEmitter;
-class dPath;
+struct dPath;
namespace daWindTag {
static BOOL CheckCreateHeap(fopAc_ac_c*);
diff --git a/include/d/actor/d_a_ykgr.h b/include/d/actor/d_a_ykgr.h
index 8ee54cc7..7f119417 100644
--- a/include/d/actor/d_a_ykgr.h
+++ b/include/d/actor/d_a_ykgr.h
@@ -3,7 +3,7 @@
#include "f_op/f_op_actor.h"
-class dPath;
+struct dPath;
class JPABaseEmitter;
class JPABaseParticle;
diff --git a/include/d/d_2dnumber.h b/include/d/d_2dnumber.h
index 9e5c4e7b..9e93d2e9 100644
--- a/include/d/d_2dnumber.h
+++ b/include/d/d_2dnumber.h
@@ -5,7 +5,7 @@
struct ResTIMG;
class JUTFont;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class dDlst_2DNumber_c : public dDlst_base_c {
public:
diff --git a/include/d/d_auction_screen.h b/include/d/d_auction_screen.h
index 638690ae..bfa2c7e3 100644
--- a/include/d/d_auction_screen.h
+++ b/include/d/d_auction_screen.h
@@ -3,7 +3,7 @@
#include "dolphin/types.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class J2DPane;
class JKRArchive;
diff --git a/include/d/d_camera.h b/include/d/d_camera.h
index d3e54ccf..0f371320 100644
--- a/include/d/d_camera.h
+++ b/include/d/d_camera.h
@@ -17,7 +17,7 @@ class camera_process_class;
class dBgS_LinChk;
class dBgS_CamGndChk;
class d2DBSplinePath;
-class dStage_Event_dt_c;
+struct dStage_Event_dt_c;
class fopAc_ac_c;
struct dCamera__EventParam {
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 91569f9d..636e7145 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -3544,7 +3544,7 @@ inline void dComIfGp_setFmapData(void * pData) { g_dComIfG_gameInfo.play.setFmap
* === RESOURCE ===
*/
-class request_of_phase_process_class;
+struct request_of_phase_process_class;
cPhs_State dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name);
int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName);
diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h
index e0b17751..267ee99c 100644
--- a/include/d/d_drawlist.h
+++ b/include/d/d_drawlist.h
@@ -9,7 +9,7 @@
#include "SSystem/SComponent/c_rnd.h"
#include "global.h"
-class ResTIMG;
+struct ResTIMG;
class cM3dGPla;
class dDlst_base_c {
@@ -427,7 +427,7 @@ public:
struct view_port_class;
struct view_class;
-struct camera_class;
+class camera_class;
struct dDlst_alphaModelData_c {
public:
diff --git a/include/d/d_event.h b/include/d/d_event.h
index 70a2355a..4d7556e7 100644
--- a/include/d/d_event.h
+++ b/include/d/d_event.h
@@ -56,7 +56,7 @@ public:
/* 0x15 */ u8 mEventInfoIdx;
}; // Size = 0x18
-class dStage_Event_dt_c;
+struct dStage_Event_dt_c;
enum dTalkXYButton_e {
dTalkBtn_NONE_e = 0,
diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h
index fbf35432..f7139dc8 100644
--- a/include/d/d_kankyo.h
+++ b/include/d/d_kankyo.h
@@ -157,13 +157,13 @@ class dKankyo_cloud_Packet;
class dKankyo_vrkumo_Packet;
class dKankyo_wave_Packet;
class dKankyo_poison_Packet;
-class WINDEFF_SET;
+struct WINDEFF_SET;
class dKankyo_star_Packet;
-class stage_palet_info_class;
-class stage_pselect_info_class;
-class stage_envr_info_class;
-class stage_vrbox_info_class;
-class stage_plight_info_class;
+struct stage_palet_info_class;
+struct stage_pselect_info_class;
+struct stage_envr_info_class;
+struct stage_vrbox_info_class;
+struct stage_plight_info_class;
struct dKyd_Schedule;
class dScnKy_env_light_c {
diff --git a/include/d/d_kankyo_demo.h b/include/d/d_kankyo_demo.h
index 58b449e8..66209963 100644
--- a/include/d/d_kankyo_demo.h
+++ b/include/d/d_kankyo_demo.h
@@ -3,7 +3,7 @@
#include "d/d_kankyo.h"
-struct cXyz;
+class cXyz;
struct DEMO_PLIGHT {
/* 0x00 */ int field_0x00;
diff --git a/include/d/d_kankyo_wether.h b/include/d/d_kankyo_wether.h
index 196b0749..81ddd402 100644
--- a/include/d/d_kankyo_wether.h
+++ b/include/d/d_kankyo_wether.h
@@ -8,7 +8,7 @@
class JUTTexture;
class JPABaseEmitter;
-class WIND_INFLUENCE;
+struct WIND_INFLUENCE;
class dKankyo_sun_Packet : public J3DPacket {
public:
diff --git a/include/d/d_map.h b/include/d/d_map.h
index 21ca9712..6ee765ad 100644
--- a/include/d/d_map.h
+++ b/include/d/d_map.h
@@ -8,7 +8,7 @@ struct ResTIMG;
struct dmap_dmap_tlut_s;
class fopAc_ac_c;
struct map_dt_c;
-class stage_map_info_class;
+struct stage_map_info_class;
class dMap_2DMtMapSpcl_tex_c {
public:
diff --git a/include/d/d_menu_collect.h b/include/d/d_menu_collect.h
index 66a505ea..a556326b 100644
--- a/include/d/d_menu_collect.h
+++ b/include/d/d_menu_collect.h
@@ -3,7 +3,7 @@
#include "dolphin/types.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class JKRArchive;
class JUTFont;
diff --git a/include/d/d_menu_dmap.h b/include/d/d_menu_dmap.h
index 3c8e2834..54d8679d 100644
--- a/include/d/d_menu_dmap.h
+++ b/include/d/d_menu_dmap.h
@@ -4,7 +4,7 @@
#include "dolphin/types.h"
class J2DPane;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class JKRArchive;
class JUTFont;
diff --git a/include/d/d_menu_fmap.h b/include/d/d_menu_fmap.h
index cea276f3..b1acbbcf 100644
--- a/include/d/d_menu_fmap.h
+++ b/include/d/d_menu_fmap.h
@@ -6,7 +6,7 @@
class JUTFont;
class J2DScreen;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class dMenu_FmapSv_c;
struct cursorTable_t;
struct aramCmapDatPat_t;
diff --git a/include/d/d_menu_fmap2.h b/include/d/d_menu_fmap2.h
index 1c0e4658..96f6a0bc 100644
--- a/include/d/d_menu_fmap2.h
+++ b/include/d/d_menu_fmap2.h
@@ -3,9 +3,9 @@
#include "dolphin/types.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class J2DScreen;
-class ResTIMG;
+struct ResTIMG;
class aramCmapDat_c;
class dMenu_FmapSv_c;
diff --git a/include/d/d_menu_item.h b/include/d/d_menu_item.h
index e44263f2..2c4a028e 100644
--- a/include/d/d_menu_item.h
+++ b/include/d/d_menu_item.h
@@ -3,7 +3,7 @@
#include "dolphin/types.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class JKRArchive;
class JUTFont;
class J2DPane;
diff --git a/include/d/d_menu_option.h b/include/d/d_menu_option.h
index 353177b2..c3529d8b 100644
--- a/include/d/d_menu_option.h
+++ b/include/d/d_menu_option.h
@@ -7,7 +7,7 @@
#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_hostIO.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class JKRArchive;
class JUTFont;
diff --git a/include/d/d_menu_save.h b/include/d/d_menu_save.h
index 2cc0edbc..9d4733cb 100644
--- a/include/d/d_menu_save.h
+++ b/include/d/d_menu_save.h
@@ -4,7 +4,7 @@
#include "d/d_drawlist.h"
#include "dolphin/types.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class dDlst_MenuSave_c : public dDlst_base_c {
public:
diff --git a/include/d/d_meter.h b/include/d/d_meter.h
index 3cebe860..f6769286 100644
--- a/include/d/d_meter.h
+++ b/include/d/d_meter.h
@@ -8,7 +8,7 @@
class J2DPane;
class JPABaseEmitter;
class fopAc_ac_c;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class msg_class;
class sub_meter_class;
diff --git a/include/d/d_minigame_starter.h b/include/d/d_minigame_starter.h
index 071910c3..0dcf993b 100644
--- a/include/d/d_minigame_starter.h
+++ b/include/d/d_minigame_starter.h
@@ -4,7 +4,7 @@
#include "dolphin/types.h"
class JKRArchive;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class dDlst_StarterScrnDraw_c {
public:
diff --git a/include/d/d_minigame_terminater.h b/include/d/d_minigame_terminater.h
index 6dc38e5d..bc3420eb 100644
--- a/include/d/d_minigame_terminater.h
+++ b/include/d/d_minigame_terminater.h
@@ -5,7 +5,7 @@
class JKRArchive;
class J2DPane;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class dDlst_TerminaterScrnDraw_c {
public:
diff --git a/include/d/d_operate_wind.h b/include/d/d_operate_wind.h
index 69169e2b..94edb695 100644
--- a/include/d/d_operate_wind.h
+++ b/include/d/d_operate_wind.h
@@ -7,7 +7,7 @@
#include "m_Do/m_Do_hostIO.h"
#include "JSystem/JUtility/TColor.h"
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
class JKRExpHeap;
class J2DScreen;
class STControl;
diff --git a/include/d/d_particle.h b/include/d/d_particle.h
index 4e47625b..48246d3d 100644
--- a/include/d/d_particle.h
+++ b/include/d/d_particle.h
@@ -20,7 +20,7 @@ class JKRHeap;
class JPABaseEmitter;
class JPAEmitterManager;
class J3DModelData;
-struct csXyz;
+class csXyz;
class dPa_simpleData_c {
public:
diff --git a/include/d/d_picture_box.h b/include/d/d_picture_box.h
index 3d8a9020..5d8ac449 100644
--- a/include/d/d_picture_box.h
+++ b/include/d/d_picture_box.h
@@ -4,8 +4,8 @@
#include "dolphin/types.h"
class JKRExpHeap;
-class fopMsgM_pane_class;
-class fopMsgM_pane_alpha_class;
+struct fopMsgM_pane_class;
+struct fopMsgM_pane_alpha_class;
class sub_pb_class;
diff --git a/include/dolphin/os/OSAlarm.h b/include/dolphin/os/OSAlarm.h
index 658e988e..9bdb4f2f 100644
--- a/include/dolphin/os/OSAlarm.h
+++ b/include/dolphin/os/OSAlarm.h
@@ -13,7 +13,7 @@ typedef struct OSAlarmLink {
/* 0x4 */ struct OSAlarm* next;
} OSAlarmLink;
-typedef struct OSAlarm;
+typedef struct OSAlarm OSAlarm;
typedef void (*OSAlarmHandler)(struct OSAlarm* alarm, OSContext* context);
typedef struct OSAlarm {
diff --git a/src/JSystem/J2DGraph/J2DTextBox.cpp b/src/JSystem/J2DGraph/J2DTextBox.cpp
index 8cd798a8..6897ff65 100644
--- a/src/JSystem/J2DGraph/J2DTextBox.cpp
+++ b/src/JSystem/J2DGraph/J2DTextBox.cpp
@@ -9,7 +9,7 @@
#include "JSystem/JUtility/JUTResource.h"
#include "JSystem/J2DGraph/J2DPrint.h"
#include "dolphin/gx/GXTransform.h"
-#include "__va_arg.h"
+#include "stdarg.h"
/* 802D51D8-802D5268 .text __ct__10J2DTextBoxFPCcPCc */
J2DTextBox::J2DTextBox(const char* font, const char* str) : mpFont(NULL), mStringPtr(NULL) {
diff --git a/src/JSystem/JAudio/dspproc.c b/src/JSystem/JAudio/dspproc.c
index ddddb8fd..71f0d6d8 100644
--- a/src/JSystem/JAudio/dspproc.c
+++ b/src/JSystem/JAudio/dspproc.c
@@ -4,9 +4,10 @@
//
#include "JSystem/JAudio/dspproc.h"
-#include "JSystem/JAudio/JASDSPInterface.h"
#include "JSystem/JAudio/dsptask.h"
+u16 DSP_CreateMap2(u32 param_1);
+
/* 8028E600-8028E648 .text DSPReleaseHalt2__FUl */
void DSPReleaseHalt2(u32 msg) {
u32 msgs[2];
@@ -26,7 +27,7 @@ void DSPReleaseHalt() {
static volatile BOOL flag;
/* 8028E6A0-8028E6AC .text setup_callback__FUs */
-void setup_callback(u16) {
+void setup_callback(u16 param_1) {
flag = 0;
}
@@ -40,7 +41,7 @@ void DsetupTable(u32 param_1, u32 param_2, u32 param_3, u32 param_4, u32 param_5
table[4] = param_5;
flag = 1;
DSPSendCommands2(table,5,setup_callback);
- while (true) {
+ while (TRUE) {
if (flag == 0) {
return;
}
@@ -66,7 +67,7 @@ void DsyncFrame(u32 param_1, u32 param_2, u32 param_3) {
static volatile BOOL d_waitflag;
/* 8028E7E0-8028E7EC .text dummy_callback__FUs */
-void dummy_callback(u16) {
+void dummy_callback(u16 param_1) {
d_waitflag = 0;
}
diff --git a/src/JSystem/JAudio/dsptask.c b/src/JSystem/JAudio/dsptask.c
index ef0b1849..015e0a76 100644
--- a/src/JSystem/JAudio/dsptask.c
+++ b/src/JSystem/JAudio/dsptask.c
@@ -10,7 +10,7 @@
#include "global.h"
/* 8028E860-8028E898 .text DspHandShake__FPv */
-void DspHandShake(void*) {
+void DspHandShake(void* param_1) {
while (DSPCheckMailFromDSP() == 0) {}
DSPReadMailFromDSP();
DSPCheckMailFromDSP();
diff --git a/src/JSystem/JMessage/processor.cpp b/src/JSystem/JMessage/processor.cpp
index 036a2efa..5f30258a 100644
--- a/src/JSystem/JMessage/processor.cpp
+++ b/src/JSystem/JMessage/processor.cpp
@@ -54,7 +54,7 @@ void TProcessor::pushCurrent(const char* v) {
}
/* 8029EEA4-8029EEC8 .text popCurrent__Q28JMessage10TProcessorFv */
-const char* TProcessor::popCurrent() {
+void TProcessor::popCurrent() {
setCurrent_(mStack.top());
mStack.pop();
}
diff --git a/src/JSystem/JStudio/JStudio/functionvalue.cpp b/src/JSystem/JStudio/JStudio/functionvalue.cpp
index 3ed957c9..ff75c00f 100644
--- a/src/JSystem/JStudio/JStudio/functionvalue.cpp
+++ b/src/JSystem/JStudio/JStudio/functionvalue.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JGadget/linklist.h"
#include "dolphin/types.h"
#include "math.h"
-#include "arith.h"
+#include "stdlib.h"
namespace JStudio {
diff --git a/src/d/actor/d_a_player_boomerang.inc b/src/d/actor/d_a_player_boomerang.inc
index 5ee1a591..386f081e 100644
--- a/src/d/actor/d_a_player_boomerang.inc
+++ b/src/d/actor/d_a_player_boomerang.inc
@@ -91,10 +91,10 @@ BOOL daPy_lk_c::checkNextActionBoomerangReady() {
/* 8014984C-801498D8 .text checkNextActionBoomerangFly__9daPy_lk_cFv */
BOOL daPy_lk_c::checkNextActionBoomerangFly() {
if (checkBoomerangReadyAnime()) {
- checkNextActionBoomerangReady();
+ return checkNextActionBoomerangReady();
} else {
if (itemTrigger() && mEquipItem == getReadyItem()) {
- setActAnimeUpper(
+ return setActAnimeUpper(
LKANM_BCK_BOOMWAIT,
UPPER_MOVE2_e,
daPy_HIO_boom_c0::m.field_0x18,
@@ -112,9 +112,9 @@ BOOL daPy_lk_c::checkNextBoomerangMode() {
seStartOnlyReverb(JA_SE_LK_ITEM_TAKEOUT);
}
if (mpAttention->Lockon()) {
- procBoomerangMove_init();
+ return procBoomerangMove_init();
} else {
- procBoomerangSubject_init();
+ return procBoomerangSubject_init();
}
}
diff --git a/src/d/actor/d_a_player_bottle.inc b/src/d/actor/d_a_player_bottle.inc
index b325df91..3415d11f 100644
--- a/src/d/actor/d_a_player_bottle.inc
+++ b/src/d/actor/d_a_player_bottle.inc
@@ -87,7 +87,7 @@ void daPy_lk_c::setBottleModel(u16 param_0) {
fopAc_ac_c* daPy_lk_c::makeFairy(cXyz* param_0, u32 param_1) {
onResetFlg0(daPyRFlg0_FAIRY_USE);
resetCurse();
- fopAcM_fastCreate(PROC_NPC_FA1, param_1, param_0, fopAcM_GetRoomNo(this), &shape_angle);
+ return (fopAc_ac_c*)fopAcM_fastCreate(PROC_NPC_FA1, param_1, param_0, fopAcM_GetRoomNo(this), &shape_angle);
}
/* 801521A0-80152300 .text procBottleDrink_init__9daPy_lk_cFUs */
diff --git a/src/d/actor/d_a_player_hook.inc b/src/d/actor/d_a_player_hook.inc
index ebca8d15..fb27d5c6 100644
--- a/src/d/actor/d_a_player_hook.inc
+++ b/src/d/actor/d_a_player_hook.inc
@@ -187,9 +187,9 @@ BOOL daPy_lk_c::checkNextHookshotMode() {
seStartOnlyReverb(JA_SE_LK_ITEM_TAKEOUT);
}
if (mpAttention->Lockon()) {
- procHookshotMove_init();
+ return procHookshotMove_init();
} else {
- procHookshotSubject_init();
+ return procHookshotSubject_init();
}
}
diff --git a/src/d/actor/d_a_player_rope.inc b/src/d/actor/d_a_player_rope.inc
index 671643e5..8d79689a 100644
--- a/src/d/actor/d_a_player_rope.inc
+++ b/src/d/actor/d_a_player_rope.inc
@@ -50,7 +50,7 @@ f32 daPy_lk_c::checkRopeRoofHit(s16 param_0) {
local_c.set(current.pos.x - 15.0f * cM_ssin(param_0), current.pos.y, current.pos.z - 15.0f * cM_scos(param_0));
mRoofChk.SetPos(local_c);
- dComIfG_Bgsp()->RoofChk(&mRoofChk);
+ return dComIfG_Bgsp()->RoofChk(&mRoofChk);
}
/* 80142E98-80142FC8 .text changeRopeSwingProc__9daPy_lk_cFv */
@@ -317,9 +317,9 @@ BOOL daPy_lk_c::checkNextRopeMode() {
seStartOnlyReverb(JA_SE_LK_ITEM_TAKEOUT);
}
if (mpAttention->Lockon()) {
- procRopeMove_init();
+ return procRopeMove_init();
} else {
- procRopeSubject_init();
+ return procRopeSubject_init();
}
}
diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp
index 167d1afb..60d6e8a7 100644
--- a/src/d/d_camera.cpp
+++ b/src/d/d_camera.cpp
@@ -2276,7 +2276,7 @@ void dCamera_c::checkGroundInfo() {
/* 8016A0F0-8016A110 .text followCamera2__9dCamera_cFl */
bool dCamera_c::followCamera2(s32 param_0) {
- followCamera(param_0);
+ return followCamera(param_0);
}
/* 8016A110-8016C4F8 .text followCamera__9dCamera_cFl */
diff --git a/src/d/d_mesg.cpp b/src/d/d_mesg.cpp
index a92cf701..61edbd79 100644
--- a/src/d/d_mesg.cpp
+++ b/src/d/d_mesg.cpp
@@ -624,7 +624,7 @@ bool dMesg_tSequenceProcessor::do_tag(u32 param_1, const void* param_2, u32 para
}
}
break;
- case 0x10000:
+ case 0x10000: {
u16 r24 = param_1 & 0xFFFF;
s8 tmp = dComIfGp_getReverb(dComIfGp_roomControl_getStayNo());
if (r24 == 8) {
@@ -634,6 +634,7 @@ bool dMesg_tSequenceProcessor::do_tag(u32 param_1, const void* param_2, u32 para
}
r29 = true;
break;
+ }
case 0x20000:
dComIfGp_setMesgCameraTagInfo(u16(param_1));
r29 = true;
@@ -1552,7 +1553,8 @@ void dMesg_screenDataItem_c::createScreen() {
J2DPane* pane = field_0x1b4.pane;
f32 y = (field_0x1b4.mSize.y * 0.5f + pane->mScreenBounds.i.y - 240.0f) - 10.0f;
f32 x = (field_0x1b4.mSize.x * 0.5f + pane->mScreenBounds.i.x - 320.0f) + 10.0f;
- field_0x3e4 = dComIfGp_particle_set2Dfore(0x2e1, &cXyz(x, y, 0.0f));
+ cXyz pos(x, y, 0.0f);
+ field_0x3e4 = dComIfGp_particle_set2Dfore(0x2e1, &pos);
}
}
diff --git a/src/d/d_msg.cpp b/src/d/d_msg.cpp
index 1e6ef4a1..7beeeabb 100644
--- a/src/d/d_msg.cpp
+++ b/src/d/d_msg.cpp
@@ -7,7 +7,7 @@
#include "dolphin/types.h"
class J2DTextBox;
-class fopMsgM_pane_class;
+struct fopMsgM_pane_class;
J2DPicture* button_icon[8];
J2DPicture* button_kage[8];
diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp
index b6b1b429..fbfb1695 100644
--- a/src/f_op/f_op_msg_mng.cpp
+++ b/src/f_op/f_op_msg_mng.cpp
@@ -144,8 +144,7 @@ static struct {
/* 0x3B */ {PRESIDENT_STATUE, "beast_12.bti"},
};
-class mesg_header;
-class fopMsgM_pane_alpha_class;
+struct fopMsgM_pane_alpha_class;
/* 8002ABB4-8002AC1C .text drawSelf__9MyPictureFff */
@@ -647,6 +646,7 @@ char* fopMsgM_messageGet(char* dst, u32 msgNo) {
}
dst[numRead] = '\0';
+ return dst;
}
/* 8002BE04-8002C02C .text fopMsgM_passwordGet__FPcUl */
diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp
index 9a2ace43..4555ae16 100644
--- a/src/m_Do/m_Do_MemCardRWmng.cpp
+++ b/src/m_Do/m_Do_MemCardRWmng.cpp
@@ -13,7 +13,7 @@
#include "dolphin/os/OS.h"
#include <string.h>
-#include <printf.h>
+#include <stdio.h>
static u8 sTmpBuf[0x2000] ALIGN_DECL(32);
static u8 sTmpBuf2[0x2000] ALIGN_DECL(32);