summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkipcode66 <kipcode66@gmail.com>2026-01-12 17:48:25 -0500
committerGitHub <noreply@github.com>2026-01-13 00:48:25 +0200
commitdd03bf861fdc92109c57d58cc7436066a8a02430 (patch)
treecd4044941bb8f661d3b5c018ed94cb18ff650cc6
parent53aaed17c0a635c8f5542c2b2aeaa65f63c734c4 (diff)
standard compiler compatibility changes (#3040)
* move math to cmath * replace stdarg to cstdarg * change stdint to stdint.h * minor fixes * change stdio to cstdio * change stdlib to stdlib * renamed ctype to cctype * fix missing argument for UNSET_FLAG
-rw-r--r--include/JSystem/J2DGraph/J2DPrint.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DMaterial.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DPacket.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DTexture.h2
-rw-r--r--include/JSystem/JAudio2/JAISeqDataMgr.h2
-rw-r--r--include/JSystem/JAudio2/JAUStreamAramMgr.h2
-rw-r--r--include/JSystem/JGadget/std-vector.h2
-rw-r--r--include/JSystem/JHostIO/JORMContext.h2
-rw-r--r--include/JSystem/JKernel/JKRExpHeap.h2
-rw-r--r--include/JSystem/JMath/JMATrigonometric.h2
-rw-r--r--include/JSystem/JMath/JMath.h2
-rw-r--r--include/JSystem/JParticle/JPAEmitter.h2
-rw-r--r--include/JSystem/JStudio/JStudio/functionvalue.h2
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-math.h2
-rw-r--r--include/JSystem/JStudio/JStudio/jstudio-object.h2
-rw-r--r--include/JSystem/JSupport/JSupport.h2
-rw-r--r--include/JSystem/JUtility/JUTConsole.h2
-rw-r--r--include/JSystem/JUtility/JUTDirectPrint.h2
-rw-r--r--include/JSystem/JUtility/JUTException.h2
-rw-r--r--include/JSystem/JUtility/JUTTexture.h2
-rw-r--r--include/SSystem/SComponent/c_m3d.h2
-rw-r--r--include/SSystem/SComponent/c_xyz.h2
-rw-r--r--include/d/actor/d_a_obj_dust.h2
-rw-r--r--include/d/d_menu_dmap_map.h2
-rw-r--r--include/d/dolzel_base.pch2
-rw-r--r--include/revolution/dvd.h3
-rw-r--r--include/revolution/wpad/bte.h2
-rw-r--r--src/CaptureScreen.cpp1
-rw-r--r--src/DynamicLink.cpp2
-rw-r--r--src/JSystem/J2DGraph/J2DPrint.cpp4
-rw-r--r--src/JSystem/J2DGraph/J2DTevs.cpp2
-rw-r--r--src/JSystem/J3DGraphBase/J3DShapeDraw.cpp2
-rw-r--r--src/JSystem/J3DU/J3DUClipper.cpp2
-rw-r--r--src/JSystem/JAHostIO/JAHioUtil.cpp2
-rw-r--r--src/JSystem/JAudio2/JASAiCtrl.cpp2
-rw-r--r--src/JSystem/JAudio2/JASAudioThread.cpp2
-rw-r--r--src/JSystem/JAudio2/JASBasicWaveBank.cpp2
-rw-r--r--src/JSystem/JAudio2/JASCalc.cpp2
-rw-r--r--src/JSystem/JAudio2/JASReport.cpp2
-rw-r--r--src/JSystem/JAudio2/JASSimpleWaveBank.cpp2
-rw-r--r--src/JSystem/JAudio2/JASWaveArcLoader.cpp2
-rw-r--r--src/JSystem/JFramework/JFWDisplay.cpp2
-rw-r--r--src/JSystem/JGadget/binary.cpp2
-rw-r--r--src/JSystem/JGadget/define.cpp2
-rw-r--r--src/JSystem/JGadget/std-stream.cpp2
-rw-r--r--src/JSystem/JKernel/JKRAramArchive.cpp2
-rw-r--r--src/JSystem/JKernel/JKRAramStream.cpp2
-rw-r--r--src/JSystem/JKernel/JKRArchivePri.cpp2
-rw-r--r--src/JSystem/JKernel/JKRCompArchive.cpp4
-rw-r--r--src/JSystem/JKernel/JKRDvdArchive.cpp4
-rw-r--r--src/JSystem/JKernel/JKRDvdFile.cpp2
-rw-r--r--src/JSystem/JKernel/JKRDvdRipper.cpp2
-rw-r--r--src/JSystem/JKernel/JKRExpHeap.cpp2
-rw-r--r--src/JSystem/JKernel/JKRFileCache.cpp2
-rw-r--r--src/JSystem/JKernel/JKRFileLoader.cpp2
-rw-r--r--src/JSystem/JKernel/JKRHeap.cpp2
-rw-r--r--src/JSystem/JKernel/JKRMemArchive.cpp2
-rw-r--r--src/JSystem/JKernel/JKRSolidHeap.cpp4
-rw-r--r--src/JSystem/JKernel/JKRThread.cpp4
-rw-r--r--src/JSystem/JMath/JMATrigonometric.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/functionvalue.cpp18
-rw-r--r--src/JSystem/JStudio/JStudio/jstudio-math.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/stb-data-parse.cpp2
-rw-r--r--src/JSystem/JUtility/JUTAssert.cpp2
-rw-r--r--src/JSystem/JUtility/JUTCacheFont.cpp2
-rw-r--r--src/JSystem/JUtility/JUTConsole.cpp2
-rw-r--r--src/JSystem/JUtility/JUTDbPrint.cpp2
-rw-r--r--src/JSystem/JUtility/JUTDirectFile.cpp2
-rw-r--r--src/JSystem/JUtility/JUTDirectPrint.cpp2
-rw-r--r--src/JSystem/JUtility/JUTException.cpp8
-rw-r--r--src/JSystem/JUtility/JUTGamePad.cpp2
-rw-r--r--src/JSystem/JUtility/JUTGraphFifo.cpp2
-rw-r--r--src/JSystem/JUtility/JUTProcBar.cpp2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h (renamed from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint)0
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype (renamed from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype)0
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath56
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio20
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib14
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math62
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c2
-rw-r--r--src/SSystem/SComponent/c_m3d.cpp5
-rw-r--r--src/SSystem/SComponent/c_math.cpp2
-rw-r--r--src/SSystem/SComponent/c_xyz.cpp5
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c2
-rw-r--r--src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c2
-rw-r--r--src/Z2AudioLib/Z2Calc.cpp2
-rw-r--r--src/Z2AudioLib/Z2SoundObject.cpp5
-rw-r--r--src/d/actor/d_a_b_bq.cpp2
-rw-r--r--src/d/actor/d_a_b_tn.cpp2
-rw-r--r--src/d/actor/d_a_b_zant.cpp2
-rw-r--r--src/d/actor/d_a_b_zant_magic.cpp2
-rw-r--r--src/d/actor/d_a_b_zant_mobile.cpp2
-rw-r--r--src/d/actor/d_a_bg_obj.cpp2
-rw-r--r--src/d/actor/d_a_cow.cpp22
-rw-r--r--src/d/actor/d_a_e_dk.cpp2
-rw-r--r--src/d/actor/d_a_e_sw.cpp2
-rw-r--r--src/d/actor/d_a_e_vt.cpp2
-rw-r--r--src/d/actor/d_a_e_ws.cpp2
-rw-r--r--src/d/actor/d_a_e_ymb.cpp2
-rw-r--r--src/d/actor/d_a_horse.cpp2
-rw-r--r--src/d/actor/d_a_kago.cpp2
-rw-r--r--src/d/actor/d_a_mg_rod.cpp5
-rw-r--r--src/d/actor/d_a_npc_henna.cpp2
-rw-r--r--src/d/actor/d_a_obj_bhbridge.cpp2
-rw-r--r--src/d/actor/d_a_obj_carry.cpp2
-rw-r--r--src/d/actor/d_a_obj_cwall.cpp2
-rw-r--r--src/d/actor/d_a_obj_digsnow.cpp2
-rw-r--r--src/d/actor/d_a_obj_drop.cpp2
-rw-r--r--src/d/actor/d_a_obj_gra2_soldier.inc2
-rw-r--r--src/d/actor/d_a_obj_ice_l.cpp2
-rw-r--r--src/d/actor/d_a_obj_ice_s.cpp2
-rw-r--r--src/d/actor/d_a_obj_kanban2.cpp2
-rw-r--r--src/d/actor/d_a_obj_lv4digsand.cpp2
-rw-r--r--src/d/actor/d_a_obj_pdoor.cpp2
-rw-r--r--src/d/actor/d_a_obj_shield.cpp2
-rw-r--r--src/d/actor/d_a_obj_stone.cpp2
-rw-r--r--src/d/actor/d_a_obj_swturn.cpp2
-rw-r--r--src/d/actor/d_a_obj_wdStick.cpp2
-rw-r--r--src/d/actor/d_a_set_bgobj.cpp2
-rw-r--r--src/d/actor/d_a_tag_camera.cpp2
-rw-r--r--src/d/actor/d_a_tag_chkpoint.cpp2
-rw-r--r--src/d/actor/d_a_tag_firewall.cpp2
-rw-r--r--src/d/actor/d_a_tag_sppath.cpp2
-rw-r--r--src/d/actor/d_a_tbox.cpp2
-rw-r--r--src/d/d_bg_w_kcol.cpp2
-rw-r--r--src/d/d_camera.cpp2
-rw-r--r--src/d/d_com_inf_game.cpp2
-rw-r--r--src/d/d_com_static.cpp2
-rw-r--r--src/d/d_file_sel_info.cpp2
-rw-r--r--src/d/d_kankyo.cpp2
-rw-r--r--src/d/d_menu_dmap_map.cpp2
-rw-r--r--src/d/d_menu_fmap.cpp2
-rw-r--r--src/d/d_menu_insect.cpp2
-rw-r--r--src/d/d_menu_item_explain.cpp2
-rw-r--r--src/d/d_menu_letter.cpp2
-rw-r--r--src/d/d_menu_ring.cpp2
-rw-r--r--src/d/d_menu_save.cpp2
-rw-r--r--src/d/d_msg_class.cpp2
-rw-r--r--src/d/d_msg_object.cpp2
-rw-r--r--src/d/d_msg_scrn_explain.cpp2
-rw-r--r--src/d/d_msg_unit.cpp2
-rw-r--r--src/d/d_name.cpp2
-rw-r--r--src/d/d_particle.cpp2
-rw-r--r--src/d/d_resorce.cpp2
-rw-r--r--src/d/d_s_menu.cpp2
-rw-r--r--src/d/d_s_room.cpp2
-rw-r--r--src/d/d_save.cpp2
-rw-r--r--src/d/d_stage.cpp2
-rw-r--r--src/m_Do/m_Do_MemCardRWmng.cpp2
-rw-r--r--src/m_Do/m_Do_ext.cpp2
-rw-r--r--src/m_Do/m_Do_printf.cpp2
-rw-r--r--src/revolution/homebuttonLib/nw4hbm/db/assert.h2
-rw-r--r--src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h4
-rw-r--r--src/revolution/homebuttonLib/nw4hbm/math/triangular.h4
-rw-r--r--src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h2
-rw-r--r--src/revolution/homebuttonLib/sound/synenv.cpp2
164 files changed, 296 insertions, 240 deletions
diff --git a/include/JSystem/J2DGraph/J2DPrint.h b/include/JSystem/J2DGraph/J2DPrint.h
index be06e01c26..aa0ffbdcf1 100644
--- a/include/JSystem/J2DGraph/J2DPrint.h
+++ b/include/JSystem/J2DGraph/J2DPrint.h
@@ -2,7 +2,7 @@
#define J2DPRINT_H
#include "JSystem/J2DGraph/J2DTextBox.h"
-#include <stdarg>
+#include <cstdarg>
class JUTFont;
class J2DPrint;
diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h
index 462849c843..dcb74c1f46 100644
--- a/include/JSystem/J3DGraphBase/J3DMaterial.h
+++ b/include/JSystem/J3DGraphBase/J3DMaterial.h
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
#include "JSystem/J3DGraphBase/J3DPacket.h"
#include "JSystem/J3DGraphBase/J3DShape.h"
-#include <stdint>
+#include <stdint.h>
class J3DJoint;
class J3DMaterialAnm;
diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h
index 95ab7f18a3..374c41ebda 100644
--- a/include/JSystem/J3DGraphBase/J3DPacket.h
+++ b/include/JSystem/J3DGraphBase/J3DPacket.h
@@ -6,7 +6,7 @@
#include "JSystem/J3DGraphBase/J3DEnum.h"
#include "dolphin/gd/GDBase.h"
#include "dolphin/mtx.h"
-#include <stdint>
+#include <stdint.h>
class J3DMatPacket;
diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h
index 152f552b4d..177df65a38 100644
--- a/include/JSystem/J3DGraphBase/J3DTexture.h
+++ b/include/JSystem/J3DGraphBase/J3DTexture.h
@@ -5,7 +5,7 @@
#include "JSystem/J3DAssert.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "global.h"
-#include <stdint>
+#include <stdint.h>
/**
* @ingroup jsystem-j3d
diff --git a/include/JSystem/JAudio2/JAISeqDataMgr.h b/include/JSystem/JAudio2/JAISeqDataMgr.h
index c207f0878c..510f1f4905 100644
--- a/include/JSystem/JAudio2/JAISeqDataMgr.h
+++ b/include/JSystem/JAudio2/JAISeqDataMgr.h
@@ -2,7 +2,7 @@
#define JAISEQDATAMGR_H
#include "JSystem/JAudio2/JAISound.h"
-#include <stdint>
+#include <stdint.h>
/**
* @ingroup jsystem-jaudio
diff --git a/include/JSystem/JAudio2/JAUStreamAramMgr.h b/include/JSystem/JAudio2/JAUStreamAramMgr.h
index d33306d323..bf861b495d 100644
--- a/include/JSystem/JAudio2/JAUStreamAramMgr.h
+++ b/include/JSystem/JAudio2/JAUStreamAramMgr.h
@@ -6,7 +6,7 @@
#include "JSystem/JAudio2/JASHeapCtrl.h"
#include "JSystem/JUtility/JUTAssert.h"
#include <bitset>
-#include <stdint>
+#include <stdint.h>
/**
* @ingroup jsystem-jaudio
diff --git a/include/JSystem/JGadget/std-vector.h b/include/JSystem/JGadget/std-vector.h
index 33cea8a0a5..74553888c9 100644
--- a/include/JSystem/JGadget/std-vector.h
+++ b/include/JSystem/JGadget/std-vector.h
@@ -5,7 +5,7 @@
#include "JSystem/JGadget/std-memory.h"
#include <algorithm>
#include <memory>
-#include <stdint>
+#include <stdint.h>
namespace JGadget {
namespace vector {
diff --git a/include/JSystem/JHostIO/JORMContext.h b/include/JSystem/JHostIO/JORMContext.h
index f16ffdd57d..0db8cf22a6 100644
--- a/include/JSystem/JHostIO/JORMContext.h
+++ b/include/JSystem/JHostIO/JORMContext.h
@@ -2,7 +2,7 @@
#define JORMCONTEXT_H
#include <dolphin/dolphin.h>
-#include <stdint>
+#include <stdint.h>
#include "JSystem/JHostIO/JORReflexible.h"
#include "JSystem/JSupport/JSUMemoryStream.h"
diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h
index f7739ada1d..1535ba757b 100644
--- a/include/JSystem/JKernel/JKRExpHeap.h
+++ b/include/JSystem/JKernel/JKRExpHeap.h
@@ -2,7 +2,7 @@
#define JKREXPHEAP_H
#include "JSystem/JKernel/JKRHeap.h"
-#include <stdint>
+#include <stdint.h>
/**
* @ingroup jsystem-jkernel
diff --git a/include/JSystem/JMath/JMATrigonometric.h b/include/JSystem/JMath/JMATrigonometric.h
index 5337891e33..9e12850a76 100644
--- a/include/JSystem/JMath/JMATrigonometric.h
+++ b/include/JSystem/JMath/JMATrigonometric.h
@@ -2,7 +2,7 @@
#define JMATRIGONOMETRIC_H
#include "dolphin/types.h"
-#include <math>
+#include <cmath>
#include <utility>
#ifdef __cplusplus
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index a4a463acb6..df02301499 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -2,7 +2,7 @@
#define JMATH_H
#include "dolphin/mtx.h"
-#include <math>
+#include <cmath>
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h
index 1531bd183d..b79e6f9022 100644
--- a/include/JSystem/JParticle/JPAEmitter.h
+++ b/include/JSystem/JParticle/JPAEmitter.h
@@ -2,7 +2,7 @@
#define JPAEMITTER_H
#include <dolphin/gx.h>
-#include <stdint>
+#include <stdint.h>
#include "JSystem/JParticle/JPAResource.h"
#include "JSystem/JParticle/JPAList.h"
#include "JSystem/JParticle/JPARandom.h"
diff --git a/include/JSystem/JStudio/JStudio/functionvalue.h b/include/JSystem/JStudio/JStudio/functionvalue.h
index f2f51ae923..3684a66da2 100644
--- a/include/JSystem/JStudio/JStudio/functionvalue.h
+++ b/include/JSystem/JStudio/JStudio/functionvalue.h
@@ -1,7 +1,7 @@
#ifndef FUNCTIONVALUE_H
#define FUNCTIONVALUE_H
-#include <math>
+#include <cmath>
#include "JSystem/JGadget/std-vector.h"
#include "JSystem/JGadget/define.h"
#include "JSystem/JGadget/search.h"
diff --git a/include/JSystem/JStudio/JStudio/jstudio-math.h b/include/JSystem/JStudio/JStudio/jstudio-math.h
index f5a41031f5..27df37a634 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-math.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-math.h
@@ -2,7 +2,7 @@
#define JSTUDIO_MATH_H
#include "dolphin/mtx.h"
-#include <math>
+#include <cmath>
#define m_PI_D 3.141592653589793
diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/include/JSystem/JStudio/JStudio/jstudio-object.h
index 653ffc9474..10315471b4 100644
--- a/include/JSystem/JStudio/JStudio/jstudio-object.h
+++ b/include/JSystem/JStudio/JStudio/jstudio-object.h
@@ -4,7 +4,7 @@
#include "JSystem/JStudio/JStudio/jstudio-control.h"
#include "global.h"
#include <limits>
-#include <math>
+#include <cmath>
typedef struct _GXColor GXColor;
diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h
index bdd2960543..717fd9b7b0 100644
--- a/include/JSystem/JSupport/JSupport.h
+++ b/include/JSystem/JSupport/JSupport.h
@@ -2,7 +2,7 @@
#define JSUPPORT_H
#include <dolphin/dolphin.h>
-#include <stdint>
+#include <stdint.h>
/**
* @ingroup jsystem-jsupport
diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h
index e1708adab9..f8d26f8f3c 100644
--- a/include/JSystem/JUtility/JUTConsole.h
+++ b/include/JSystem/JUtility/JUTConsole.h
@@ -4,7 +4,7 @@
#include "JSystem/JGadget/linklist.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JUtility/JUTFont.h"
-#include <stdarg>
+#include <cstdarg>
/**
* @ingroup jsystem-jutility
diff --git a/include/JSystem/JUtility/JUTDirectPrint.h b/include/JSystem/JUtility/JUTDirectPrint.h
index aeff790f55..14ed2c28b8 100644
--- a/include/JSystem/JUtility/JUTDirectPrint.h
+++ b/include/JSystem/JUtility/JUTDirectPrint.h
@@ -2,7 +2,7 @@
#define JUTDIRECTPRINT_H
#include "JSystem/JUtility/TColor.h"
-#include <stdarg>
+#include <cstdarg>
/**
* @ingroup jsystem-jutility
diff --git a/include/JSystem/JUtility/JUTException.h b/include/JSystem/JUtility/JUTException.h
index 4830ed4f74..522551dd63 100644
--- a/include/JSystem/JUtility/JUTException.h
+++ b/include/JSystem/JUtility/JUTException.h
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTGamePad.h"
-#include <stdarg>
+#include <cstdarg>
#include <dolphin/gx.h>
#include <dolphin/os.h>
#include "global.h"
diff --git a/include/JSystem/JUtility/JUTTexture.h b/include/JSystem/JUtility/JUTTexture.h
index 8294cb994a..b5965eb185 100644
--- a/include/JSystem/JUtility/JUTTexture.h
+++ b/include/JSystem/JUtility/JUTTexture.h
@@ -2,7 +2,7 @@
#define JUTTEXTURE_H
#include <dolphin/gx.h>
-#include <stdint>
+#include <stdint.h>
class JUTPalette;
diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h
index a8045c74a7..1db37b44a8 100644
--- a/include/SSystem/SComponent/c_m3d.h
+++ b/include/SSystem/SComponent/c_m3d.h
@@ -1,7 +1,7 @@
#ifndef C_M3D_H_
#define C_M3D_H_
-#include <math>
+#include <cmath>
#include "dolphin/mtx.h"
class cM3dGAab;
diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h
index 838949cb13..23b059be98 100644
--- a/include/SSystem/SComponent/c_xyz.h
+++ b/include/SSystem/SComponent/c_xyz.h
@@ -2,7 +2,7 @@
#define C_XYZ_H
#include "dolphin/mtx.h"
-#include <math>
+#include <cmath>
struct cXyz : Vec {
static const cXyz Zero;
diff --git a/include/d/actor/d_a_obj_dust.h b/include/d/actor/d_a_obj_dust.h
index 8f00781e8c..4ce26227b3 100644
--- a/include/d/actor/d_a_obj_dust.h
+++ b/include/d/actor/d_a_obj_dust.h
@@ -11,7 +11,7 @@
#include "d/d_resorce.h"
#include "d/d_s_play.h"
-#include <math>
+#include <cmath>
/**
* @ingroup actors-objects
diff --git a/include/d/d_menu_dmap_map.h b/include/d/d_menu_dmap_map.h
index 311448c72b..f1a5432391 100644
--- a/include/d/d_menu_dmap_map.h
+++ b/include/d/d_menu_dmap_map.h
@@ -2,7 +2,7 @@
#define D_MENU_D_MENU_DMAP_MAP_H
#include "d/d_menu_dmap.h"
-#include <math>
+#include <cmath>
class dMenu_DmapMap_c {
public:
diff --git a/include/d/dolzel_base.pch b/include/d/dolzel_base.pch
index eb6533d44e..ac3dbb96d3 100644
--- a/include/d/dolzel_base.pch
+++ b/include/d/dolzel_base.pch
@@ -10,7 +10,7 @@
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
// Fixes weak function/RTTI ordering
-#include <math> // IWYU pragma: export
+#include <cmath> // IWYU pragma: export
#include <cstring> // IWYU pragma: export
#include "Z2AudioLib/Z2AudioArcLoader.h" // IWYU pragma: export
#include "JSystem/JAudio2/JAUStreamAramMgr.h" // IWYU pragma: export
diff --git a/include/revolution/dvd.h b/include/revolution/dvd.h
index 31f6c1badf..967390d498 100644
--- a/include/revolution/dvd.h
+++ b/include/revolution/dvd.h
@@ -3,6 +3,7 @@
#include <revolution/types.h>
#include <revolution/esp.h>
+#include "global.h"
#ifdef __cplusplus
extern "C" {
@@ -185,8 +186,6 @@ typedef struct DVDGameTOC {
DVDPartitionInfo* partitionInfos;
} DVDGameTOC;
-#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
-
typedef struct DVDPartitionParams DVDPartitionParams;
struct DVDPartitionParams {
diff --git a/include/revolution/wpad/bte.h b/include/revolution/wpad/bte.h
index c816fa8baf..1751d8998b 100644
--- a/include/revolution/wpad/bte.h
+++ b/include/revolution/wpad/bte.h
@@ -1,7 +1,7 @@
#ifndef CONTEXT_BTE_H
#define CONTEXT_BTE_H
-#include <stdint>
+#include <stdint.h>
// taken from https://github.com/doldecomp/sdk_2009-12-11/blob/main/include/context_bte.h
diff --git a/src/CaptureScreen.cpp b/src/CaptureScreen.cpp
index f6b24e63bc..7c8d55a841 100644
--- a/src/CaptureScreen.cpp
+++ b/src/CaptureScreen.cpp
@@ -1,4 +1,5 @@
#include "CaptureScreen.h"
+#include "global.h"
CaptureScreen::CaptureScreen(const JFWDisplay* pDisplay) {
mpDisplay = pDisplay;
diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp
index 278a997fe8..52cf257970 100644
--- a/src/DynamicLink.cpp
+++ b/src/DynamicLink.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRFileCache.h"
#include "JSystem/JUtility/JUTConsole.h"
-#include <stdio>
+#include <cstdio>
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
diff --git a/src/JSystem/J2DGraph/J2DPrint.cpp b/src/JSystem/J2DGraph/J2DPrint.cpp
index a155a2e62f..b6c8876aee 100644
--- a/src/JSystem/J2DGraph/J2DPrint.cpp
+++ b/src/JSystem/J2DGraph/J2DPrint.cpp
@@ -3,8 +3,8 @@
#include "JSystem/J2DGraph/J2DPrint.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTFont.h"
-#include <stdio>
-#include <stdlib>
+#include <cstdio>
+#include <cstdlib>
char* J2DPrint::mStrBuff;
diff --git a/src/JSystem/J2DGraph/J2DTevs.cpp b/src/JSystem/J2DGraph/J2DTevs.cpp
index 68469cc0fa..88d1c1c69b 100644
--- a/src/JSystem/J2DGraph/J2DTevs.cpp
+++ b/src/JSystem/J2DGraph/J2DTevs.cpp
@@ -6,7 +6,7 @@
#include "JSystem/J2DGraph/J2DTevs.h"
#include "JSystem/J2DGraph/J2DMaterial.h"
-#include <math>
+#include <cmath>
#include "dolphin/gx.h"
void J2DTexMtx::load(u32 mtxIdx) {
diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
index 50bd2ac793..e001a8a8b9 100644
--- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
+++ b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
@@ -3,7 +3,7 @@
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
#include "JSystem/JKernel/JKRHeap.h"
#include <string>
-#include <stdint>
+#include <stdint.h>
#include <dolphin/gx.h>
u32 J3DShapeDraw::countVertex(u32 stride) {
diff --git a/src/JSystem/J3DU/J3DUClipper.cpp b/src/JSystem/J3DU/J3DUClipper.cpp
index 350d67e36a..38a27dd8ff 100644
--- a/src/JSystem/J3DU/J3DUClipper.cpp
+++ b/src/JSystem/J3DU/J3DUClipper.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/J3DU/J3DUClipper.h"
-#include <math>
+#include <cmath>
void J3DUClipper::init() {
mNear = 1.0f;
diff --git a/src/JSystem/JAHostIO/JAHioUtil.cpp b/src/JSystem/JAHostIO/JAHioUtil.cpp
index 8bc18b763d..11c5fd4b52 100644
--- a/src/JSystem/JAHostIO/JAHioUtil.cpp
+++ b/src/JSystem/JAHostIO/JAHioUtil.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAHostIO/JAHioUtil.h"
-#include <stdio>
+#include <cstdio>
char JAHioUtil::mStringBuffer[256];
diff --git a/src/JSystem/JAudio2/JASAiCtrl.cpp b/src/JSystem/JAudio2/JASAiCtrl.cpp
index 9beb08f0bd..662e5e6df4 100644
--- a/src/JSystem/JAudio2/JASAiCtrl.cpp
+++ b/src/JSystem/JAudio2/JASAiCtrl.cpp
@@ -16,7 +16,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/ai.h"
#include <dolphin/os.h>
-#include <stdint>
+#include <stdint.h>
s16* JASDriver::sDmaDacBuffer[3];
diff --git a/src/JSystem/JAudio2/JASAudioThread.cpp b/src/JSystem/JAudio2/JASAudioThread.cpp
index e74ba52e9a..4cf66d5abf 100644
--- a/src/JSystem/JAudio2/JASAudioThread.cpp
+++ b/src/JSystem/JAudio2/JASAudioThread.cpp
@@ -10,7 +10,7 @@
#include "JSystem/JAudio2/JASReport.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
#include "dolphin/dsp.h"
-#include <stdint>
+#include <stdint.h>
JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority)
:
diff --git a/src/JSystem/JAudio2/JASBasicWaveBank.cpp b/src/JSystem/JAudio2/JASBasicWaveBank.cpp
index ad11ba25d2..a6134046be 100644
--- a/src/JSystem/JAudio2/JASBasicWaveBank.cpp
+++ b/src/JSystem/JAudio2/JASBasicWaveBank.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JAudio2/JASMutex.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
-#include <stdint>
+#include <stdint.h>
JASBasicWaveBank::JASBasicWaveBank() {
mWaveTable = NULL;
diff --git a/src/JSystem/JAudio2/JASCalc.cpp b/src/JSystem/JAudio2/JASCalc.cpp
index b4ef0d66be..9c3d7f1412 100644
--- a/src/JSystem/JAudio2/JASCalc.cpp
+++ b/src/JSystem/JAudio2/JASCalc.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/JASCalc.h"
-#include <math>
+#include <cmath>
#include <limits>
void JASCalc::imixcopy(const s16* s1, const s16* s2, s16* dst, u32 n) {
diff --git a/src/JSystem/JAudio2/JASReport.cpp b/src/JSystem/JAudio2/JASReport.cpp
index 941338ba3a..be97131868 100644
--- a/src/JSystem/JAudio2/JASReport.cpp
+++ b/src/JSystem/JAudio2/JASReport.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JAudio2/JASCalc.h"
#include "JSystem/JAudio2/JASMutex.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <stdio>
+#include <cstdio>
static OSMutex sMutex;
diff --git a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp b/src/JSystem/JAudio2/JASSimpleWaveBank.cpp
index a105fe7c37..9bc0bbf31d 100644
--- a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp
+++ b/src/JSystem/JAudio2/JASSimpleWaveBank.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/JASSimpleWaveBank.h"
-#include <stdint>
+#include <stdint.h>
JASSimpleWaveBank::JASSimpleWaveBank() {
mWaveTable = NULL;
diff --git a/src/JSystem/JAudio2/JASWaveArcLoader.cpp b/src/JSystem/JAudio2/JASWaveArcLoader.cpp
index 9672a087ae..37086c0d4e 100644
--- a/src/JSystem/JAudio2/JASWaveArcLoader.cpp
+++ b/src/JSystem/JAudio2/JASWaveArcLoader.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JKernel/JKRDvdAramRipper.h"
#include <string>
#include "dolphin/os.h"
-#include <stdint>
+#include <stdint.h>
JASHeap* JASWaveArcLoader::sAramHeap;
diff --git a/src/JSystem/JFramework/JFWDisplay.cpp b/src/JSystem/JFramework/JFWDisplay.cpp
index e3785d6782..0392ffdb0b 100644
--- a/src/JSystem/JFramework/JFWDisplay.cpp
+++ b/src/JSystem/JFramework/JFWDisplay.cpp
@@ -9,7 +9,7 @@
#include "dolphin/gx.h"
#include <dolphin/vi.h>
#include "global.h"
-#include <stdint>
+#include <stdint.h>
void JFWDisplay::ctor_subroutine(bool enableAlpha) {
mEnableAlpha = enableAlpha;
diff --git a/src/JSystem/JGadget/binary.cpp b/src/JSystem/JGadget/binary.cpp
index af49191265..cde00093f2 100644
--- a/src/JSystem/JGadget/binary.cpp
+++ b/src/JSystem/JGadget/binary.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JGadget/binary.h"
#include "JSystem/JGadget/define.h"
-#include <stdint>
+#include <stdint.h>
#if DEBUG
static void dummyString() {
diff --git a/src/JSystem/JGadget/define.cpp b/src/JSystem/JGadget/define.cpp
index 84b1914f17..a613126499 100644
--- a/src/JSystem/JGadget/define.cpp
+++ b/src/JSystem/JGadget/define.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JGadget/define.h"
#define MSL_USE_INLINES 1
-#include <ctype>
+#include <cctype>
JGadget_outMessage::JGadget_outMessage(MessageFunc fn, const char* file, int line) {
mMsgFunc = fn;
diff --git a/src/JSystem/JGadget/std-stream.cpp b/src/JSystem/JGadget/std-stream.cpp
index 3ce2def24d..4fe582f8f6 100644
--- a/src/JSystem/JGadget/std-stream.cpp
+++ b/src/JSystem/JGadget/std-stream.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JGadget/std-stream.h"
#include "JSystem/JGadget/define.h"
-#include <ctype>
+#include <cctype>
#include <float.h>
namespace JGadget {
diff --git a/src/JSystem/JKernel/JKRAramArchive.cpp b/src/JSystem/JKernel/JKRAramArchive.cpp
index 35817fe158..811978caa0 100644
--- a/src/JSystem/JKernel/JKRAramArchive.cpp
+++ b/src/JSystem/JKernel/JKRAramArchive.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JKernel/JKRDvdFile.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <math>
+#include <cmath>
#include <string>
JKRAramArchive::JKRAramArchive() {}
diff --git a/src/JSystem/JKernel/JKRAramStream.cpp b/src/JSystem/JKernel/JKRAramStream.cpp
index d126b08b5d..94b9ca91fc 100644
--- a/src/JSystem/JKernel/JKRAramStream.cpp
+++ b/src/JSystem/JKernel/JKRAramStream.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JKernel/JKRAramPiece.h"
#include "JSystem/JSupport/JSUFileStream.h"
#include "JSystem/JUtility/JUTException.h"
-#include <stdint>
+#include <stdint.h>
#if PLATFORM_GCN
const u32 stack_size = 0xc00;
diff --git a/src/JSystem/JKernel/JKRArchivePri.cpp b/src/JSystem/JKernel/JKRArchivePri.cpp
index 5dff53f00b..375e297c37 100644
--- a/src/JSystem/JKernel/JKRArchivePri.cpp
+++ b/src/JSystem/JKernel/JKRArchivePri.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <ctype>
+#include <cctype>
#include <string>
u32 JKRArchive::sCurrentDirID;
diff --git a/src/JSystem/JKernel/JKRCompArchive.cpp b/src/JSystem/JKernel/JKRCompArchive.cpp
index 5e9eb638e6..8a1577f592 100644
--- a/src/JSystem/JKernel/JKRCompArchive.cpp
+++ b/src/JSystem/JKernel/JKRCompArchive.cpp
@@ -10,9 +10,9 @@
#include "JSystem/JKernel/JKRMemArchive.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <math>
+#include <cmath>
#include <string>
-#include <stdint>
+#include <stdint.h>
JKRCompArchive::JKRCompArchive(s32 entryNum, JKRArchive::EMountDirection eMountDirection)
: JKRArchive(entryNum, MOUNT_COMP) {
diff --git a/src/JSystem/JKernel/JKRDvdArchive.cpp b/src/JSystem/JKernel/JKRDvdArchive.cpp
index 0a74ca8c01..ed88d791e7 100644
--- a/src/JSystem/JKernel/JKRDvdArchive.cpp
+++ b/src/JSystem/JKernel/JKRDvdArchive.cpp
@@ -6,10 +6,10 @@
#include "JSystem/JKernel/JKRDvdRipper.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <math>
+#include <cmath>
#include <string>
#include "global.h"
-#include <stdint>
+#include <stdint.h>
JKRDvdArchive::JKRDvdArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection)
: JKRArchive(entryNum, MOUNT_DVD) {
diff --git a/src/JSystem/JKernel/JKRDvdFile.cpp b/src/JSystem/JKernel/JKRDvdFile.cpp
index 172827e520..07bd9505a5 100644
--- a/src/JSystem/JKernel/JKRDvdFile.cpp
+++ b/src/JSystem/JKernel/JKRDvdFile.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRDvdFile.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <stdint>
+#include <stdint.h>
JSUList<JKRDvdFile> JKRDvdFile::sDvdList;
diff --git a/src/JSystem/JKernel/JKRDvdRipper.cpp b/src/JSystem/JKernel/JKRDvdRipper.cpp
index 877d10d740..fc792c50cd 100644
--- a/src/JSystem/JKernel/JKRDvdRipper.cpp
+++ b/src/JSystem/JKernel/JKRDvdRipper.cpp
@@ -11,7 +11,7 @@
#include <string>
#include <dolphin/os.h>
#include "dolphin/vi.h"
-#include <stdint>
+#include <stdint.h>
static int JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*);
static int decompSZS_subroutine(u8*, u8*);
diff --git a/src/JSystem/JKernel/JKRExpHeap.cpp b/src/JSystem/JKernel/JKRExpHeap.cpp
index 9f1109d12a..1c6d16c1a9 100644
--- a/src/JSystem/JKernel/JKRExpHeap.cpp
+++ b/src/JSystem/JKernel/JKRExpHeap.cpp
@@ -9,7 +9,7 @@
#include "JSystem/JSupport/JSupport.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTException.h"
-#include <stdlib>
+#include <cstdlib>
JKRExpHeap* JKRExpHeap::createRoot(int maxHeaps, bool errorFlag) {
JKRExpHeap* heap = NULL;
diff --git a/src/JSystem/JKernel/JKRFileCache.cpp b/src/JSystem/JKernel/JKRFileCache.cpp
index 2c764a7024..1dc3a719ef 100644
--- a/src/JSystem/JKernel/JKRFileCache.cpp
+++ b/src/JSystem/JKernel/JKRFileCache.cpp
@@ -6,7 +6,7 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
-#include <ctype>
+#include <cctype>
#include <string>
#include "global.h"
diff --git a/src/JSystem/JKernel/JKRFileLoader.cpp b/src/JSystem/JKernel/JKRFileLoader.cpp
index cf756ee279..26790f87b6 100644
--- a/src/JSystem/JKernel/JKRFileLoader.cpp
+++ b/src/JSystem/JKernel/JKRFileLoader.cpp
@@ -5,7 +5,7 @@
#define MSL_USE_INLINES 1 // needed to inline tolower call. not inlined elsewhere in the repo
#include <string>
-#include <ctype>
+#include <cctype>
#include "global.h"
JKRFileLoader* JKRFileLoader::sCurrentVolume;
diff --git a/src/JSystem/JKernel/JKRHeap.cpp b/src/JSystem/JKernel/JKRHeap.cpp
index b805901b78..e4337db174 100644
--- a/src/JSystem/JKernel/JKRHeap.cpp
+++ b/src/JSystem/JKernel/JKRHeap.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <stdint>
+#include <stdint.h>
#include <string>
#if DEBUG
diff --git a/src/JSystem/JKernel/JKRMemArchive.cpp b/src/JSystem/JKernel/JKRMemArchive.cpp
index 505329847c..0c0ef4887c 100644
--- a/src/JSystem/JKernel/JKRMemArchive.cpp
+++ b/src/JSystem/JKernel/JKRMemArchive.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JUtility/JUTException.h"
#include <string>
#include "global.h"
-#include <stdint>
+#include <stdint.h>
JKRMemArchive::JKRMemArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection)
: JKRArchive(entryNum, MOUNT_MEM) {
diff --git a/src/JSystem/JKernel/JKRSolidHeap.cpp b/src/JSystem/JKernel/JKRSolidHeap.cpp
index 593f4b78ac..01ead7728b 100644
--- a/src/JSystem/JKernel/JKRSolidHeap.cpp
+++ b/src/JSystem/JKernel/JKRSolidHeap.cpp
@@ -5,8 +5,8 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "global.h"
-#include <stdint>
-#include <stdlib>
+#include <stdint.h>
+#include <cstdlib>
JKRSolidHeap* JKRSolidHeap::create(u32 size, JKRHeap* heap, bool useErrorHandler) {
if (!heap) {
diff --git a/src/JSystem/JKernel/JKRThread.cpp b/src/JSystem/JKernel/JKRThread.cpp
index 0392beef0f..fa38270a2d 100644
--- a/src/JSystem/JKernel/JKRThread.cpp
+++ b/src/JSystem/JKernel/JKRThread.cpp
@@ -3,9 +3,9 @@
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTConsole.h"
-#include <stdio>
+#include <cstdio>
#include "global.h"
-#include <stdint>
+#include <stdint.h>
JSUList<JKRThread> JKRThread::sThreadList(0);
diff --git a/src/JSystem/JMath/JMATrigonometric.cpp b/src/JSystem/JMath/JMATrigonometric.cpp
index 2fc14cb13e..5d394ac9c2 100644
--- a/src/JSystem/JMath/JMATrigonometric.cpp
+++ b/src/JSystem/JMath/JMATrigonometric.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JMath/JMATrigonometric.h"
-#include <math>
+#include <cmath>
#include "global.h"
static f32 dummy() {
diff --git a/src/JSystem/JStudio/JStudio/functionvalue.cpp b/src/JSystem/JStudio/JStudio/functionvalue.cpp
index 7d891a47d6..174a459b62 100644
--- a/src/JSystem/JStudio/JStudio/functionvalue.cpp
+++ b/src/JSystem/JStudio/JStudio/functionvalue.cpp
@@ -5,8 +5,8 @@
#include "JSystem/JUtility/JUTException.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JGadget/linklist.h"
-#include <math>
-#include <stdlib>
+#include <cmath>
+#include <cstdlib>
#include <limits>
namespace JStudio {
@@ -291,7 +291,11 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
}
break;
case 1: {
+#ifdef __MWERKS__
div_t dt = div(index, size - 1);
+#else
+ div_t dt = div((int)index, (int)size - 1);
+#endif
index = dt.rem;
if (index < 0) {
index = size + index;
@@ -304,7 +308,11 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
index = 0;
} else {
u32 uVar3 = (u32)(size - 2) * 2;
+#ifdef __MWERKS__
div_t dt2 = div(index, uVar3);
+#else
+ div_t dt2 = div((int)index, (int)uVar3);
+#endif
index = dt2.rem;
if (index < 0) {
index += uVar3;
@@ -315,8 +323,12 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
}
break;
}
-
+
+#ifdef __MWERKS__
std::advance_pointer(local_148, index + 1);
+#else
+ std::advance(local_148, index + 1);
+#endif
pFront = *local_148;
return pFront->getValue(param_3);
}
diff --git a/src/JSystem/JStudio/JStudio/jstudio-math.cpp b/src/JSystem/JStudio/JStudio/jstudio-math.cpp
index d6e31f7a9c..119cd4c554 100644
--- a/src/JSystem/JStudio/JStudio/jstudio-math.cpp
+++ b/src/JSystem/JStudio/JStudio/jstudio-math.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JStudio/JStudio/jstudio-math.h"
#include "JSystem/JGeometry.h"
#include "JSystem/TPosition3.h"
-#include <math>
+#include <cmath>
void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
f32 cosx = cosf(DEG_TO_RAD(x));
diff --git a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp b/src/JSystem/JStudio/JStudio/stb-data-parse.cpp
index a5d0136d2b..e9ab233d33 100644
--- a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp
+++ b/src/JSystem/JStudio/JStudio/stb-data-parse.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JStudio/JStudio/stb-data-parse.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/os.h"
-#include <stdint>
+#include <stdint.h>
namespace JStudio {
namespace stb {
diff --git a/src/JSystem/JUtility/JUTAssert.cpp b/src/JSystem/JUtility/JUTAssert.cpp
index 9916b8e4c8..bf26d0ae99 100644
--- a/src/JSystem/JUtility/JUTAssert.cpp
+++ b/src/JSystem/JUtility/JUTAssert.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTDbPrint.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
-#include <stdio>
+#include <cstdio>
#include <dolphin/vi.h>
namespace JUTAssertion {
diff --git a/src/JSystem/JUtility/JUTCacheFont.cpp b/src/JSystem/JUtility/JUTCacheFont.cpp
index 9054c6ec77..3292adc78b 100644
--- a/src/JSystem/JUtility/JUTCacheFont.cpp
+++ b/src/JSystem/JUtility/JUTCacheFont.cpp
@@ -6,7 +6,7 @@
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JKernel/JKRAram.h"
#include "dolphin/gx.h"
-#include <stdint>
+#include <stdint.h>
JUTCacheFont::JUTCacheFont(ResFONT const* p_fontRes, u32 cacheSize, JKRHeap* p_heap) {
initialize_state();
diff --git a/src/JSystem/JUtility/JUTConsole.cpp b/src/JSystem/JUtility/JUTConsole.cpp
index 98f8404211..c3389cb95e 100644
--- a/src/JSystem/JUtility/JUTConsole.cpp
+++ b/src/JSystem/JUtility/JUTConsole.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "JSystem/JUtility/JUTVideo.h"
#include <dolphin/vi.h>
-#include <stdio>
+#include <cstdio>
#include "global.h"
JUTConsoleManager* JUTConsoleManager::sManager;
diff --git a/src/JSystem/JUtility/JUTDbPrint.cpp b/src/JSystem/JUtility/JUTDbPrint.cpp
index f137c13dd5..9adab8141b 100644
--- a/src/JSystem/JUtility/JUTDbPrint.cpp
+++ b/src/JSystem/JUtility/JUTDbPrint.cpp
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTVideo.h"
-#include <stdio>
+#include <cstdio>
JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) {
mFont = pFont;
diff --git a/src/JSystem/JUtility/JUTDirectFile.cpp b/src/JSystem/JUtility/JUTDirectFile.cpp
index a60a90c5ec..ce2c4354d5 100644
--- a/src/JSystem/JUtility/JUTDirectFile.cpp
+++ b/src/JSystem/JUtility/JUTDirectFile.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JUtility/JUTDirectFile.h"
#include <dolphin/os.h>
#include "global.h"
-#include <stdint>
+#include <stdint.h>
int JUTDirectFile::fetch32byte() {
mToRead = mLength - ALIGN_PREV(mPos, DVD_MIN_TRANSFER_SIZE);
diff --git a/src/JSystem/JUtility/JUTDirectPrint.cpp b/src/JSystem/JUtility/JUTDirectPrint.cpp
index 6a9fa75d1e..b317f18efe 100644
--- a/src/JSystem/JUtility/JUTDirectPrint.cpp
+++ b/src/JSystem/JUtility/JUTDirectPrint.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JUtility/JUTDirectPrint.h"
-#include <stdio>
+#include <cstdio>
#include <dolphin/os.h>
#include "global.h"
diff --git a/src/JSystem/JUtility/JUTException.cpp b/src/JSystem/JUtility/JUTException.cpp
index 5a2c6289a5..19c3fafe0e 100644
--- a/src/JSystem/JUtility/JUTException.cpp
+++ b/src/JSystem/JUtility/JUTException.cpp
@@ -4,11 +4,11 @@
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "JSystem/JUtility/JUTDirectFile.h"
-#include <math>
-#include <stdio>
-#include <stdlib>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
#include <dolphin/dolphin.h>
-#include <stdint>
+#include <stdint.h>
OSMessageQueue JUTException::sMessageQueue = {0};
diff --git a/src/JSystem/JUtility/JUTGamePad.cpp b/src/JSystem/JUtility/JUTGamePad.cpp
index 2330d538f2..1918268afc 100644
--- a/src/JSystem/JUtility/JUTGamePad.cpp
+++ b/src/JSystem/JUtility/JUTGamePad.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JUtility/JUTGamePad.h"
-#include <math>
+#include <cmath>
u32 JUTGamePad::CRumble::sChannelMask[4] = {
PAD_CHAN0_BIT,
diff --git a/src/JSystem/JUtility/JUTGraphFifo.cpp b/src/JSystem/JUtility/JUTGraphFifo.cpp
index 06d47d6a11..a30a0aeace 100644
--- a/src/JSystem/JUtility/JUTGraphFifo.cpp
+++ b/src/JSystem/JUtility/JUTGraphFifo.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JUtility/JUTGraphFifo.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <stdint>
+#include <stdint.h>
static bool data_804514B8;
diff --git a/src/JSystem/JUtility/JUTProcBar.cpp b/src/JSystem/JUtility/JUTProcBar.cpp
index 6de3753989..20fb99c827 100644
--- a/src/JSystem/JUtility/JUTProcBar.cpp
+++ b/src/JSystem/JUtility/JUTProcBar.cpp
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTVideo.h"
-#include <stdint>
+#include <stdint.h>
JUTProcBar::JUTProcBar() {
mVisible = true;
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h
index caf108094b..caf108094b 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype
index 5def2776ff..5def2776ff 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath
index 78fd149109..3040fbfe62 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath
@@ -151,6 +151,62 @@ MSL_INLINE float tanf(float x) {
#ifdef __cplusplus
};
+
+namespace std {
+template<typename T>
+inline double fabs(T x) {
+ return ::fabs(x);
+}
+
+inline float fabs(float num) {
+ return ::fabsf(num);
+}
+
+inline float fabsf(float num) {
+ return ::fabsf(num);
+}
+
+inline float sqrt(float x) {
+ return ::sqrtf(x);
+}
+
+inline float abs(float x) {
+ return ::fabsf(x);
+}
+
+inline float fmod(float x, float y) {
+ return ::fmod(x, y);
+}
+
+inline float ceil(float num) {
+ return ::ceilf(num);
+}
+
+inline float floor(float num) {
+ return ::floorf(num);
+}
+
+inline float tan(float num) {
+ return ::tanf(num);
+}
+
+inline float tanf(float num) {
+ return ::tanf(num);
+}
+
+inline float acos(float num) {
+ return ::acosf(num);
+}
+
+inline float pow(float x, float y) {
+ return ::pow(x, y);
+}
+
+inline float pow(float x, int y) {
+ // FIXME: Needs to use powf
+ return ::pow(x, y);
+}
+} // namespace std
#endif
#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio
index 739a62f641..efe9c253ba 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio
@@ -13,4 +13,24 @@
#define stdout (&__files._stdout)
#define stderr (&__files._stderr)
+#ifdef __cplusplus
+#include <stdarg>
+
+extern "C" {
+namespace std {
+ using ::fputs;
+ using ::fflush;
+ using ::fclose;
+ using ::fprintf;
+ using ::printf;
+ using ::sprintf;
+ using ::snprintf;
+ using ::vsnprintf;
+ using ::vprintf;
+ using ::vswprintf;
+ using ::sscanf;
+}
+};
+#endif
+
#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib
index ae12232293..a98bcf8b61 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib
@@ -5,4 +5,18 @@
#include <arith.h>
#include <strtoul.h>
+#ifdef __cplusplus
+extern "C" {
+namespace std {
+ using ::strtol;
+ using ::strtoul;
+ using ::div;
+ using ::exit;
+ using ::abort;
+ using ::atoi;
+ using ::atof;
+}
+};
+#endif
+
#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math
deleted file mode 100644
index de9c0a6bc2..0000000000
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef MSL_MATH_H_
-#define MSL_MATH_H_
-
-#include <cmath>
-
-namespace std {
-template<typename T>
-inline double fabs(T x) {
- return ::fabs(x);
-}
-
-inline float fabs(float num) {
- return ::fabsf(num);
-}
-
-inline float fabsf(float num) {
- return ::fabsf(num);
-}
-
-inline float sqrt(float x) {
- return ::sqrtf(x);
-}
-
-inline float abs(float x) {
- return ::fabsf(x);
-}
-
-inline float fmod(float x, float y) {
- return ::fmod(x, y);
-}
-
-inline float ceil(float num) {
- return ::ceilf(num);
-}
-
-inline float floor(float num) {
- return ::floorf(num);
-}
-
-inline float tan(float num) {
- return ::tanf(num);
-}
-
-inline float tanf(float num) {
- return ::tanf(num);
-}
-
-inline float acos(float num) {
- return ::acosf(num);
-}
-
-inline float pow(float x, float y) {
- return ::pow(x, y);
-}
-
-inline float pow(float x, int y) {
- // FIXME: Needs to use powf
- return ::pow(x, y);
-}
-} // namespace std
-
-#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c
index 967879ace0..b206e9ab4d 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c
@@ -7,7 +7,7 @@
#undef MSL_INLINE
#define MSL_INLINE __declspec(weak)
-#include <ctype>
+#include <cctype>
#if PLATFORM_GCN
#define ctrl __control_char
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c
index 9d68210dc2..1b184d60e6 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c
@@ -1,5 +1,5 @@
#include "extras.h"
-#include <ctype>
+#include <cctype>
int stricmp(const char* str1, const char* str2) {
char a_var;
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c
index 203419d524..32246fbe85 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c
@@ -2,7 +2,7 @@
#include "buffer_io.h"
#include "file_io.h"
#include "FILE_POS.h"
-#include <ctype>
+#include <cctype>
int fclose(FILE* file) {
int flush_result, close_result;
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c
index 1917c23b63..565ed380af 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c
@@ -1,5 +1,5 @@
#include <locale>
-#include <ctype>
+#include <cctype>
#include <wctype_api.h>
#include <mbstring.h>
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
index f6a587d94a..b542d792e8 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
@@ -5,7 +5,7 @@
#include "mbstring.h"
#include "scanf.h"
#include "wchar_io.h"
-#include <ctype>
+#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c
index b60a21131c..67e392b0a4 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c
@@ -1,5 +1,5 @@
#include "scanf.h"
-#include <ctype>
+#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdint>
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c
index 444ceed800..0f7a2b0f48 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c
@@ -2,7 +2,7 @@
#include <cstdio>
#include "ansi_fp.h"
#include <locale>
-#include <ctype>
+#include <cctype>
#include "float.h"
#include <cmath>
#include <climits>
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c
index cb65203382..2a93968f67 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c
@@ -1,5 +1,5 @@
#include "strtoul.h"
-#include <ctype>
+#include <cctype>
#include "errno.h"
#include <climits>
#include "scanf.h"
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c
index 7faf351f1c..13356b95e5 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c
@@ -1,4 +1,4 @@
-#include <ctype>
+#include <cctype>
const unsigned short __wctype_mapC[256] = {
ctype_cntrl,
diff --git a/src/SSystem/SComponent/c_m3d.cpp b/src/SSystem/SComponent/c_m3d.cpp
index 1af53e81e3..8487468223 100644
--- a/src/SSystem/SComponent/c_m3d.cpp
+++ b/src/SSystem/SComponent/c_m3d.cpp
@@ -12,6 +12,11 @@
#include "SSystem/SComponent/c_math.h"
#include "SSystem/SComponent/c_sxyz.h"
+#ifndef __MWERKS__
+#include <limits>
+#define FLT_EPSILON std::numeric_limits<float>::epsilon()
+#endif
+
const f32 G_CM3D_F_ABS_MIN = 32 * FLT_EPSILON;
void cM3d_InDivPos1(const Vec* pVecA, const Vec* pVecB, f32 pF, Vec* pOut) {
diff --git a/src/SSystem/SComponent/c_math.cpp b/src/SSystem/SComponent/c_math.cpp
index f590bc9bba..ba7a63c61a 100644
--- a/src/SSystem/SComponent/c_math.cpp
+++ b/src/SSystem/SComponent/c_math.cpp
@@ -5,7 +5,7 @@
#include "SSystem/SComponent/c_math.h"
#include "SSystem/SComponent/c_m3d.h"
-#include <math>
+#include <cmath>
s16 cM_rad2s(f32 rad) {
s32 s = (std::fmod(rad, 2 * M_PI) * (0x8000 / M_PI));
diff --git a/src/SSystem/SComponent/c_xyz.cpp b/src/SSystem/SComponent/c_xyz.cpp
index 41ff834864..9f05b9e61c 100644
--- a/src/SSystem/SComponent/c_xyz.cpp
+++ b/src/SSystem/SComponent/c_xyz.cpp
@@ -7,6 +7,11 @@
#include "SSystem/SComponent/c_math.h"
#include "JSystem/JUtility/JUTAssert.h"
+#ifndef __MWERKS__
+#include <limits>
+#define FLT_EPSILON std::numeric_limits<float>::epsilon()
+#endif
+
cXyz cXyz::operator+(const Vec& vec) const {
Vec ret;
PSVECAdd(this, &vec, &ret);
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
index 36473080f0..a30ab8c7a8 100644
--- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c
@@ -4,7 +4,7 @@
*/
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h"
-#include <stdint>
+#include <stdint.h>
#pragma dont_inline on
void TRK_fill_mem(void* dst, int val, u32 n) {
diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c
index becb062ca8..b570022d2b 100644
--- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c
+++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c
@@ -1,6 +1,6 @@
#include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h"
#include "TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h"
-#include <stdint>
+#include <stdint.h>
#include <cstring>
typedef struct memRange {
diff --git a/src/Z2AudioLib/Z2Calc.cpp b/src/Z2AudioLib/Z2Calc.cpp
index a55a14c753..0082ca0e9b 100644
--- a/src/Z2AudioLib/Z2Calc.cpp
+++ b/src/Z2AudioLib/Z2Calc.cpp
@@ -1,6 +1,6 @@
#include "Z2AudioLib/Z2Calc.h"
#include "JSystem/JMath/random.h"
-#include <math>
+#include <cmath>
f32 Z2Calc::linearTransform(f32 inValue, f32 inMin, f32 inMax, f32 outMin, f32 outMax, bool noClamp) {
f32 transformed = outMin + ((inValue - inMin) * ((outMax - outMin) / (inMax - inMin)));
diff --git a/src/Z2AudioLib/Z2SoundObject.cpp b/src/Z2AudioLib/Z2SoundObject.cpp
index bc92476846..d34d0dea19 100644
--- a/src/Z2AudioLib/Z2SoundObject.cpp
+++ b/src/Z2AudioLib/Z2SoundObject.cpp
@@ -9,6 +9,11 @@
#include "Z2AudioLib/Z2Audience.h"
#include "JSystem/JAudio2/JAUSoundAnimator.h"
+#ifndef __MWERKS__
+#include <limits>
+#define FLT_MAX std::numeric_limits<float>::max()
+#endif
+
#if PLATFORM_WII || PLATFORM_SHIELD
#include "Z2AudioLib/Z2AudioCS.h"
#endif
diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp
index a99c2ea721..eb2d9f0247 100644
--- a/src/d/actor/d_a_b_bq.cpp
+++ b/src/d/actor/d_a_b_bq.cpp
@@ -16,7 +16,7 @@
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "SSystem/SComponent/c_math.h"
#include "c/c_damagereaction.h"
-#include <math>
+#include <cmath>
enum B_bq_RES_File_ID {
/* BCK */
diff --git a/src/d/actor/d_a_b_tn.cpp b/src/d/actor/d_a_b_tn.cpp
index 4600e64c7f..6febefa837 100644
--- a/src/d/actor/d_a_b_tn.cpp
+++ b/src/d/actor/d_a_b_tn.cpp
@@ -6,7 +6,7 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_b_tn.h"
-#include <math>
+#include <cmath>
#include "Z2AudioLib/Z2Instances.h"
#include "d/actor/d_a_boomerang.h"
#include "d/actor/d_a_nbomb.h"
diff --git a/src/d/actor/d_a_b_zant.cpp b/src/d/actor/d_a_b_zant.cpp
index ed9383a6e9..b38aa09b98 100644
--- a/src/d/actor/d_a_b_zant.cpp
+++ b/src/d/actor/d_a_b_zant.cpp
@@ -17,7 +17,7 @@
#include "SSystem/SComponent/c_math.h"
#include "Z2AudioLib/Z2Instances.h"
#include "JSystem/JAudio2/JAUSectionHeap.h"
-#include <math>
+#include <cmath>
enum Joint {
/* 0x00 */ JNT_CENTER,
diff --git a/src/d/actor/d_a_b_zant_magic.cpp b/src/d/actor/d_a_b_zant_magic.cpp
index 83482ffd36..f107187429 100644
--- a/src/d/actor/d_a_b_zant_magic.cpp
+++ b/src/d/actor/d_a_b_zant_magic.cpp
@@ -10,7 +10,7 @@
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
int daB_ZANTM_c::draw() {
g_env_light.settingTevStruct(0, &current.pos, &tevStr);
diff --git a/src/d/actor/d_a_b_zant_mobile.cpp b/src/d/actor/d_a_b_zant_mobile.cpp
index 282bec5900..7778dadf81 100644
--- a/src/d/actor/d_a_b_zant_mobile.cpp
+++ b/src/d/actor/d_a_b_zant_mobile.cpp
@@ -11,7 +11,7 @@
#include "d/d_cc_uty.h"
#include "d/actor/d_a_player.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
namespace {
dCcD_SrcSph cc_zant_src = {
diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp
index cc3b88375b..e8c934afab 100644
--- a/src/d/actor/d_a_bg_obj.cpp
+++ b/src/d/actor/d_a_bg_obj.cpp
@@ -7,7 +7,7 @@
#include "d/actor/d_a_bg_obj.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
-#include <stdio>
+#include <cstdio>
#include "dolphin/os.h"
#include "d/actor/d_a_set_bgobj.h"
#include "d/d_s_play.h"
diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp
index f74b0b1033..f6d7e88ada 100644
--- a/src/d/actor/d_a_cow.cpp
+++ b/src/d/actor/d_a_cow.cpp
@@ -213,7 +213,7 @@ void daCow_c::setActetcStatus() {
bool daCow_c::checkNadeNadeFinish() {
if (GET_FLAG(daCow_c::Flag_NaderuFinish)) {
- UNSET_FLAG(mFlags, daCow_c::Flag_NaderuFinish);
+ UNSET_FLAG(mFlags, daCow_c::Flag_NaderuFinish, u16);
mNadeNade = false;
return true;
}
@@ -222,7 +222,7 @@ bool daCow_c::checkNadeNadeFinish() {
bool daCow_c::checkNadeNade() {
if (GET_FLAG(daCow_c::Flag_Naderu)) {
- UNSET_FLAG(mFlags, daCow_c::Flag_Naderu);
+ UNSET_FLAG(mFlags, daCow_c::Flag_Naderu, u16);
mNadeNade = true;
return 1;
}
@@ -246,13 +246,13 @@ bool daCow_c::checkThrow() {
if (GET_FLAG(daCow_c::Flag_CrazyBeforeCatch)) {
setProcess(&daCow_c::action_thrown, false);
initCrazyBeforeCatch(0);
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyBeforeCatch);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyBeforeCatch, u16);
return true;
}
if (GET_FLAG(daCow_c::Flag_CrazyCatch)) {
setProcess(&daCow_c::action_thrown, false);
initCrazyCatch(0);
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch, u16);
return true;
}
}
@@ -1877,11 +1877,11 @@ void daCow_c::calcCatchPos(f32 distance, BOOL someBool) {
void daCow_c::executeCrazyWait() {
if (GET_FLAG(daCow_c::Flag_CrazyReady)) {
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyReady);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyReady, u16);
}
if (GET_FLAG(daCow_c::Flag_CrazyReadyDrawOn)) {
mDrawOff = false;
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyReadyDrawOn);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyReadyDrawOn, u16);
}
if (GET_FLAG(daCow_c::Flag_CrazyGo)) {
mCrazy = daCow_c::Crazy_Dash;
@@ -1914,16 +1914,16 @@ void daCow_c::executeCrazyDash() {
if (GET_FLAG(daCow_c::Flag_CrazyBeforeCatch)) {
initCrazyBeforeCatch(0);
mPointIndex = 6;
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyBeforeCatch);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyBeforeCatch, u16);
} else if (GET_FLAG(daCow_c::Flag_CrazyCatch)) {
initCrazyCatch(0);
mPointIndex = 6;
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch, u16);
dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1f, cXyz(0.0f, 1.0f, 0.0f));
} else if (GET_FLAG(daCow_c::Flag_CrazyDash)) {
initCrazyAttack(0);
mPointIndex = 6;
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyDash);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyDash, u16);
}
} else {
if (mPointIndex == 4) {
@@ -1993,7 +1993,7 @@ void daCow_c::executeCrazyBeforeCatch() {
calcCatchPos(-220.0f, 1);
if (GET_FLAG(daCow_c::Flag_CrazyCatch)) {
initCrazyCatch(0);
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyCatch, u16);
dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1f, cXyz(0.0f, 1.0f, 0.0f));
} else if (GET_FLAG(daCow_c::Flag_CrazyDash)) {
if (!daPy_getPlayerActorClass()->speedF) {
@@ -2001,7 +2001,7 @@ void daCow_c::executeCrazyBeforeCatch() {
} else {
initCrazyAttack(1);
}
- UNSET_FLAG(mFlags, daCow_c::Flag_CrazyDash);
+ UNSET_FLAG(mFlags, daCow_c::Flag_CrazyDash, u16);
}
}
diff --git a/src/d/actor/d_a_e_dk.cpp b/src/d/actor/d_a_e_dk.cpp
index b8f5114d6d..e97bc0672a 100644
--- a/src/d/actor/d_a_e_dk.cpp
+++ b/src/d/actor/d_a_e_dk.cpp
@@ -9,7 +9,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"
-#include <math>
+#include <cmath>
#define ACTION_MODE_WAIT 0
#define ACTION_MODE_CHASE 1
diff --git a/src/d/actor/d_a_e_sw.cpp b/src/d/actor/d_a_e_sw.cpp
index 1a8a58b611..82014649c9 100644
--- a/src/d/actor/d_a_e_sw.cpp
+++ b/src/d/actor/d_a_e_sw.cpp
@@ -9,7 +9,7 @@
#include "f_op/f_op_actor_enemy.h"
#include "f_op/f_op_camera_mng.h"
#include "d/d_bomb.h"
-#include <math>
+#include <cmath>
#include "Z2AudioLib/Z2Instances.h"
class daE_SW_HIO_c {
diff --git a/src/d/actor/d_a_e_vt.cpp b/src/d/actor/d_a_e_vt.cpp
index c43e04cb25..ed0c071dec 100644
--- a/src/d/actor/d_a_e_vt.cpp
+++ b/src/d/actor/d_a_e_vt.cpp
@@ -9,7 +9,7 @@
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "SSystem/SComponent/c_math.h"
#include "c/c_damagereaction.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"
diff --git a/src/d/actor/d_a_e_ws.cpp b/src/d/actor/d_a_e_ws.cpp
index fefe58fd45..4c4d80c248 100644
--- a/src/d/actor/d_a_e_ws.cpp
+++ b/src/d/actor/d_a_e_ws.cpp
@@ -7,7 +7,7 @@
#include "d/actor/d_a_e_ws.h"
#include "d/actor/d_a_obj_carry.h"
-#include <math>
+#include <cmath>
#include "f_op/f_op_actor_enemy.h"
class daE_WS_HIO_c : public JORReflexible {
diff --git a/src/d/actor/d_a_e_ymb.cpp b/src/d/actor/d_a_e_ymb.cpp
index 956a31bc88..6ec159ca31 100644
--- a/src/d/actor/d_a_e_ymb.cpp
+++ b/src/d/actor/d_a_e_ymb.cpp
@@ -11,7 +11,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "f_op/f_op_camera_mng.h"
-#include <math>
+#include <cmath>
#include "Z2AudioLib/Z2Instances.h"
struct daE_YMB_HIO_c {
diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp
index f77b11be6c..301245e996 100644
--- a/src/d/actor/d_a_horse.cpp
+++ b/src/d/actor/d_a_horse.cpp
@@ -17,7 +17,7 @@
#include "SSystem/SComponent/c_math.h"
#include "Z2AudioLib/Z2Instances.h"
#include "JSystem/JAudio2/JAUSectionHeap.h"
-#include <math>
+#include <cmath>
#define ANM_HS_BACK_WALK 6
#define ANM_HS_WALK_START 7
diff --git a/src/d/actor/d_a_kago.cpp b/src/d/actor/d_a_kago.cpp
index b9909276b2..ed46b10ddd 100644
--- a/src/d/actor/d_a_kago.cpp
+++ b/src/d/actor/d_a_kago.cpp
@@ -10,7 +10,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_msg_object.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_balloon_2D.h"
#include "d/actor/d_a_e_ym.h"
diff --git a/src/d/actor/d_a_mg_rod.cpp b/src/d/actor/d_a_mg_rod.cpp
index f46f0c237e..3016f58aaa 100644
--- a/src/d/actor/d_a_mg_rod.cpp
+++ b/src/d/actor/d_a_mg_rod.cpp
@@ -22,7 +22,7 @@
#include "c/c_damagereaction.h"
#include "SSystem/SComponent/c_counter.h"
#include "Z2AudioLib/Z2Instances.h"
-#include <math>
+#include <cmath>
class dmg_rod_HIO_c : public JORReflexible {
public:
@@ -5493,7 +5493,7 @@ static void play_camera_u(dmg_rod_class* i_this) {
break;
}
case 20:
- case 21:
+ case 21: {
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
@@ -5647,6 +5647,7 @@ static void play_camera_u(dmg_rod_class* i_this) {
daAlink_getAlinkActorClass()->changeFishGetFace(0);
}
break;
+ }
case 90:
sp18 = 1;
break;
diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp
index e81a8a2b8c..cf2ce2f665 100644
--- a/src/d/actor/d_a_npc_henna.cpp
+++ b/src/d/actor/d_a_npc_henna.cpp
@@ -11,7 +11,7 @@
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "Z2AudioLib/Z2Instances.h"
#include "c/c_damagereaction.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_alink.h"
#include "d/actor/d_a_canoe.h"
#include "d/actor/d_a_mg_fshop.h"
diff --git a/src/d/actor/d_a_obj_bhbridge.cpp b/src/d/actor/d_a_obj_bhbridge.cpp
index 59e2ed6fd5..9ada8dfdc7 100644
--- a/src/d/actor/d_a_obj_bhbridge.cpp
+++ b/src/d/actor/d_a_obj_bhbridge.cpp
@@ -11,7 +11,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_s_play.h"
#include "d/actor/d_a_player.h"
-#include <math>
+#include <cmath>
void daObjBhbridge_c::RideOn_Angle(s16& param_1, f32 param_2, s16 param_3, f32 param_4) {
cLib_addCalcAngleS(&param_1, param_3 * (param_2 / param_4), 1, 0x100, 1);
diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp
index e3960aebce..bea4671174 100644
--- a/src/d/actor/d_a_obj_carry.cpp
+++ b/src/d/actor/d_a_obj_carry.cpp
@@ -7,7 +7,7 @@
#include "d/actor/d_a_obj_carry.h"
#include "d/actor/d_a_player.h"
-#include <math>
+#include <cmath>
#include "d/d_com_inf_game.h"
#include "SSystem/SComponent/c_math.h"
#include "d/actor/d_a_obj_swBallA.h"
diff --git a/src/d/actor/d_a_obj_cwall.cpp b/src/d/actor/d_a_obj_cwall.cpp
index 7a54788e6b..b7805ef4ac 100644
--- a/src/d/actor/d_a_obj_cwall.cpp
+++ b/src/d/actor/d_a_obj_cwall.cpp
@@ -12,7 +12,7 @@
#include "Z2AudioLib/Z2Instances.h"
#include "d/d_cc_d.h"
#include "d/d_com_inf_game.h"
-#include <math>
+#include <cmath>
void daObjCwall_c::initBaseMtx() {
mWallModel->setBaseScale(scale);
diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp
index 62f3922ee6..f474cd4719 100644
--- a/src/d/actor/d_a_obj_digsnow.cpp
+++ b/src/d/actor/d_a_obj_digsnow.cpp
@@ -8,7 +8,7 @@
#include "d/actor/d_a_obj_digsnow.h"
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
-#include <math>
+#include <cmath>
void daObjDigSnow_c::initBaseMtx() {
mpModel->setBaseScale(scale);
diff --git a/src/d/actor/d_a_obj_drop.cpp b/src/d/actor/d_a_obj_drop.cpp
index 1ee2d25856..eff54e3af1 100644
--- a/src/d/actor/d_a_obj_drop.cpp
+++ b/src/d/actor/d_a_obj_drop.cpp
@@ -7,7 +7,7 @@
#include "d/actor/d_a_obj_drop.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_camera.h"
diff --git a/src/d/actor/d_a_obj_gra2_soldier.inc b/src/d/actor/d_a_obj_gra2_soldier.inc
index 879062983f..f31da3b0fe 100644
--- a/src/d/actor/d_a_obj_gra2_soldier.inc
+++ b/src/d/actor/d_a_obj_gra2_soldier.inc
@@ -1,7 +1,7 @@
#include "d/actor/d_a_obj_gra2.h"
#include "d/d_camera.h"
#include "d/actor/d_a_tag_gra.h"
-#include <math>
+#include <cmath>
f32 daObj_GrA_c::getSrchCircleR() {
f32 srchCircleR;
diff --git a/src/d/actor/d_a_obj_ice_l.cpp b/src/d/actor/d_a_obj_ice_l.cpp
index 396e79fcf9..34d489308c 100644
--- a/src/d/actor/d_a_obj_ice_l.cpp
+++ b/src/d/actor/d_a_obj_ice_l.cpp
@@ -12,7 +12,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_procname.h"
#include "d/d_s_play.h"
-#include <math>
+#include <cmath>
f32 dummyLiteral() {
return 0.0f;
diff --git a/src/d/actor/d_a_obj_ice_s.cpp b/src/d/actor/d_a_obj_ice_s.cpp
index ba8ad44d1f..c829b2c55a 100644
--- a/src/d/actor/d_a_obj_ice_s.cpp
+++ b/src/d/actor/d_a_obj_ice_s.cpp
@@ -12,7 +12,7 @@
#include "d/d_s_play.h"
#include "SSystem/SComponent/c_lib.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
class daOBJ_ICE_S_HIO_c : public JORReflexible {
public:
diff --git a/src/d/actor/d_a_obj_kanban2.cpp b/src/d/actor/d_a_obj_kanban2.cpp
index 9bab3f6ea2..b59d130f83 100644
--- a/src/d/actor/d_a_obj_kanban2.cpp
+++ b/src/d/actor/d_a_obj_kanban2.cpp
@@ -11,7 +11,7 @@
#include "d/actor/d_a_npc_tk.h"
#include "d/d_s_play.h"
#include "Z2AudioLib/Z2Instances.h"
-#include <math>
+#include <cmath>
#define PARTS_ALL 0x3FFFF
#define PART_TOP_LEFT_UNDER (1 << 0)
diff --git a/src/d/actor/d_a_obj_lv4digsand.cpp b/src/d/actor/d_a_obj_lv4digsand.cpp
index 9aab3a1190..2cda594ce7 100644
--- a/src/d/actor/d_a_obj_lv4digsand.cpp
+++ b/src/d/actor/d_a_obj_lv4digsand.cpp
@@ -9,7 +9,7 @@
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h"
#include "d/d_item.h"
-#include <math>
+#include <cmath>
void daObjL4DigSand_c::initBaseMtx() {
mpModel->setBaseScale(scale);
diff --git a/src/d/actor/d_a_obj_pdoor.cpp b/src/d/actor/d_a_obj_pdoor.cpp
index 91c6f80b4a..ba07ba88dc 100644
--- a/src/d/actor/d_a_obj_pdoor.cpp
+++ b/src/d/actor/d_a_obj_pdoor.cpp
@@ -9,7 +9,7 @@
#include "d/actor/d_a_player.h"
#include "SSystem/SComponent/c_lib.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
#include "d/d_com_inf_game.h"
#include "d/d_bg_w.h"
diff --git a/src/d/actor/d_a_obj_shield.cpp b/src/d/actor/d_a_obj_shield.cpp
index c10e53e2be..b7ce69ed51 100644
--- a/src/d/actor/d_a_obj_shield.cpp
+++ b/src/d/actor/d_a_obj_shield.cpp
@@ -11,7 +11,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_cc_d.h"
#include "d/d_item_data.h"
-#include <math>
+#include <cmath>
const static dCcD_SrcCyl l_cyl_src = {
{
diff --git a/src/d/actor/d_a_obj_stone.cpp b/src/d/actor/d_a_obj_stone.cpp
index 852361498a..c5ddc061b9 100644
--- a/src/d/actor/d_a_obj_stone.cpp
+++ b/src/d/actor/d_a_obj_stone.cpp
@@ -14,7 +14,7 @@
#include "f_op/f_op_kankyo_mng.h"
#include "global.h"
#include "SSystem/SComponent/c_math.h"
-#include <math>
+#include <cmath>
const static int l_bmdIdx[2] = {3, 3};
diff --git a/src/d/actor/d_a_obj_swturn.cpp b/src/d/actor/d_a_obj_swturn.cpp
index 909b94da11..4acb54bf03 100644
--- a/src/d/actor/d_a_obj_swturn.cpp
+++ b/src/d/actor/d_a_obj_swturn.cpp
@@ -11,7 +11,7 @@
#include "SSystem/SComponent/c_lib.h"
#include "d/d_com_inf_game.h"
#include "d/d_bg_w.h"
-#include <math>
+#include <cmath>
static u32 const l_bmd[2] = {
4, 4,
diff --git a/src/d/actor/d_a_obj_wdStick.cpp b/src/d/actor/d_a_obj_wdStick.cpp
index 0e4abd5d4c..af9a3d9dc3 100644
--- a/src/d/actor/d_a_obj_wdStick.cpp
+++ b/src/d/actor/d_a_obj_wdStick.cpp
@@ -10,7 +10,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "f_op/f_op_kankyo_mng.h"
-#include <math>
+#include <cmath>
static daWdStick_HIO_c l_HIO;
diff --git a/src/d/actor/d_a_set_bgobj.cpp b/src/d/actor/d_a_set_bgobj.cpp
index f072a3f6a9..6beae751cd 100644
--- a/src/d/actor/d_a_set_bgobj.cpp
+++ b/src/d/actor/d_a_set_bgobj.cpp
@@ -6,7 +6,7 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_set_bgobj.h"
-#include <stdio>
+#include <cstdio>
#include "f_op/f_op_actor_mng.h"
static const char l_specName[] = "spec.dat";
diff --git a/src/d/actor/d_a_tag_camera.cpp b/src/d/actor/d_a_tag_camera.cpp
index ee95c98107..f1b34e8084 100644
--- a/src/d/actor/d_a_tag_camera.cpp
+++ b/src/d/actor/d_a_tag_camera.cpp
@@ -1,7 +1,7 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_tag_camera.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_alink.h"
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_horse.h"
diff --git a/src/d/actor/d_a_tag_chkpoint.cpp b/src/d/actor/d_a_tag_chkpoint.cpp
index 06f2a51779..04ca0a80ab 100644
--- a/src/d/actor/d_a_tag_chkpoint.cpp
+++ b/src/d/actor/d_a_tag_chkpoint.cpp
@@ -6,7 +6,7 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_tag_chkpoint.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_player.h"
int daTag_Chk_c::execute() {
diff --git a/src/d/actor/d_a_tag_firewall.cpp b/src/d/actor/d_a_tag_firewall.cpp
index fa6470cdda..c9917cc79f 100644
--- a/src/d/actor/d_a_tag_firewall.cpp
+++ b/src/d/actor/d_a_tag_firewall.cpp
@@ -6,7 +6,7 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_tag_firewall.h"
-#include <math>
+#include <cmath>
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_bomb.h"
diff --git a/src/d/actor/d_a_tag_sppath.cpp b/src/d/actor/d_a_tag_sppath.cpp
index e736d8d82e..c703b5ce68 100644
--- a/src/d/actor/d_a_tag_sppath.cpp
+++ b/src/d/actor/d_a_tag_sppath.cpp
@@ -7,7 +7,7 @@
#include "d/actor/d_a_tag_sppath.h"
#include "d/actor/d_a_player.h"
-#include <math>
+#include <cmath>
static dCcD_SrcCyl l_cylSrc = {
{
diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp
index 0112acac9c..47e5803a3b 100644
--- a/src/d/actor/d_a_tbox.cpp
+++ b/src/d/actor/d_a_tbox.cpp
@@ -9,7 +9,7 @@
#include "f_op/f_op_camera_mng.h"
#include "SSystem/SComponent/c_math.h"
#include "Z2AudioLib/Z2Instances.h"
-#include <math>
+#include <cmath>
static const f32 l_cull_size_box[6] = { -150.0f, -10.0f, -150.0f, 150.0f, 300.0f, 100.0f };
diff --git a/src/d/d_bg_w_kcol.cpp b/src/d/d_bg_w_kcol.cpp
index 8c39fa39aa..76d7c81511 100644
--- a/src/d/d_bg_w_kcol.cpp
+++ b/src/d/d_bg_w_kcol.cpp
@@ -6,7 +6,7 @@
#include "d/d_bg_s_cap_poly.h"
#include <algorithm>
-#include <math>
+#include <cmath>
#include "SSystem/SComponent/c_bg_s_shdw_draw.h"
#include "SSystem/SComponent/c_m2d.h"
diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp
index 838192f95b..61774641f8 100644
--- a/src/d/d_camera.cpp
+++ b/src/d/d_camera.cpp
@@ -20,7 +20,7 @@
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include "m_Do/m_Do_lib.h"
-#include <math>
+#include <cmath>
#if DEBUG
#include "d/d_debug_pad.h"
diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp
index 87708c6dca..50099a9a91 100644
--- a/src/d/d_com_inf_game.cpp
+++ b/src/d/d_com_inf_game.cpp
@@ -22,7 +22,7 @@
#include "m_Do/m_Do_Reset.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
-#include <stdio>
+#include <cstdio>
void dComIfG_play_c::ct() {
mWindowNum = 0;
diff --git a/src/d/d_com_static.cpp b/src/d/d_com_static.cpp
index f3bace3685..05ec34453c 100644
--- a/src/d/d_com_static.cpp
+++ b/src/d/d_com_static.cpp
@@ -12,7 +12,7 @@
#include "d/actor/d_a_tag_magne.h"
#include "d/actor/d_a_tag_mist.h"
#include "d/actor/d_a_tag_stream.h"
-#include <stdio>
+#include <cstdio>
void daSus_c::data_c::set(s8 i_roomNo, cXyz const& param_1, cXyz const& param_2, u8 param_3,
u8 param_4, u8 i_type) {
diff --git a/src/d/d_file_sel_info.cpp b/src/d/d_file_sel_info.cpp
index 642ccc6764..df0bee5aa9 100644
--- a/src/d/d_file_sel_info.cpp
+++ b/src/d/d_file_sel_info.cpp
@@ -11,7 +11,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_meter2_info.h"
#include "d/d_pane_class_alpha.h"
-#include <stdio>
+#include <cstdio>
dFile_info_c::dFile_info_c(JKRArchive* i_archive, u8 param_1) {
mArchive = i_archive;
diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp
index 209de4cd58..54752a1bbf 100644
--- a/src/d/d_kankyo.cpp
+++ b/src/d/d_kankyo.cpp
@@ -24,7 +24,7 @@
#include "f_op/f_op_kankyo.h"
#include "m_Do/m_Do_graphic.h"
#include "m_Do/m_Do_lib.h"
-#include <stdlib>
+#include <cstdlib>
static void GxXFog_set();
diff --git a/src/d/d_menu_dmap_map.cpp b/src/d/d_menu_dmap_map.cpp
index 468b2c2f17..e2f157ff88 100644
--- a/src/d/d_menu_dmap_map.cpp
+++ b/src/d/d_menu_dmap_map.cpp
@@ -4,7 +4,7 @@
#include "d/dolzel.h" // IWYU pragma: keep
-#include <math>
+#include <cmath>
#include "d/d_com_inf_game.h"
#include "d/d_map_path_dmap.h"
#include "d/d_menu_dmap.h"
diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp
index b9b22f841b..7e847452cd 100644
--- a/src/d/d_menu_fmap.cpp
+++ b/src/d/d_menu_fmap.cpp
@@ -5,7 +5,7 @@
#include "JSystem/JKernel/JKRAramArchive.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRMemArchive.h"
-#include <stdio>
+#include <cstdio>
#include "f_op/f_op_msg_mng.h"
#include "d/d_com_inf_game.h"
#include "d/d_lib.h"
diff --git a/src/d/d_menu_insect.cpp b/src/d/d_menu_insect.cpp
index 953cd73589..c8f8cc6d51 100644
--- a/src/d/d_menu_insect.cpp
+++ b/src/d/d_menu_insect.cpp
@@ -19,7 +19,7 @@
#include "d/d_msg_string.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
-#include <stdio>
+#include <cstdio>
typedef void (dMenu_Insect_c::*initFunc)();
static initFunc map_init_process[] = {
diff --git a/src/d/d_menu_item_explain.cpp b/src/d/d_menu_item_explain.cpp
index cc901b9a72..5f3dd5c2d4 100644
--- a/src/d/d_menu_item_explain.cpp
+++ b/src/d/d_menu_item_explain.cpp
@@ -9,7 +9,7 @@
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JUtility/JUTTexture.h"
-#include <stdio>
+#include <cstdio>
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_item.h"
diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp
index 57a20807f4..95c2d0ae65 100644
--- a/src/d/d_menu_letter.cpp
+++ b/src/d/d_menu_letter.cpp
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JKernel/JKRMemArchive.h"
-#include <stdio>
+#include <cstdio>
#include "d/d_com_inf_game.h"
#include "d/d_select_cursor.h"
#include "d/d_meter2_info.h"
diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp
index 4785e46bf0..49c3e4000b 100644
--- a/src/d/d_menu_ring.cpp
+++ b/src/d/d_menu_ring.cpp
@@ -27,7 +27,7 @@
#include "m_Do/m_Do_graphic.h"
#include <string>
-#include <stdio>
+#include <cstdio>
typedef void (dMenu_Ring_c::*initFunc)();
static initFunc stick_init[] = {
diff --git a/src/d/d_menu_save.cpp b/src/d/d_menu_save.cpp
index b9737e3a4b..823ea577fc 100644
--- a/src/d/d_menu_save.cpp
+++ b/src/d/d_menu_save.cpp
@@ -3,7 +3,7 @@
#include "d/d_menu_save.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRMemArchive.h"
-#include <stdio>
+#include <cstdio>
#include "d/d_com_inf_game.h"
#include "d/d_lib.h"
#include "d/d_select_cursor.h"
diff --git a/src/d/d_msg_class.cpp b/src/d/d_msg_class.cpp
index 683b192bb6..64ed967111 100644
--- a/src/d/d_msg_class.cpp
+++ b/src/d/d_msg_class.cpp
@@ -1,7 +1,7 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_class.h"
-#include <stdio>
+#include <cstdio>
#include "d/d_meter2_info.h"
#include "d/d_msg_object.h"
#include "d/d_msg_unit.h"
diff --git a/src/d/d_msg_object.cpp b/src/d/d_msg_object.cpp
index f1a9c6945c..534346aa92 100644
--- a/src/d/d_msg_object.cpp
+++ b/src/d/d_msg_object.cpp
@@ -22,7 +22,7 @@
#include "d/d_meter2.h"
#include "d/actor/d_a_midna.h"
#include "f_op/f_op_msg_mng.h"
-#include <stdio>
+#include <cstdio>
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_lib.h"
#include "JSystem/JKernel/JKRExpHeap.h"
diff --git a/src/d/d_msg_scrn_explain.cpp b/src/d/d_msg_scrn_explain.cpp
index a6618cf265..3df29b4e11 100644
--- a/src/d/d_msg_scrn_explain.cpp
+++ b/src/d/d_msg_scrn_explain.cpp
@@ -11,7 +11,7 @@
#include "d/d_msg_string.h"
#include "d/d_pane_class.h"
#include "m_Do/m_Do_controller_pad.h"
-#include <stdio>
+#include <cstdio>
#if VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
diff --git a/src/d/d_msg_unit.cpp b/src/d/d_msg_unit.cpp
index 0e2447b4b0..4619977315 100644
--- a/src/d/d_msg_unit.cpp
+++ b/src/d/d_msg_unit.cpp
@@ -2,7 +2,7 @@
#include "d/d_msg_unit.h"
#include "d/d_com_inf_game.h"
-#include <stdio>
+#include <cstdio>
#include "d/d_kankyo.h"
#include "d/d_meter2_info.h"
diff --git a/src/d/d_name.cpp b/src/d/d_name.cpp
index bd2515ecc3..e45a9ee0d1 100644
--- a/src/d/d_name.cpp
+++ b/src/d/d_name.cpp
@@ -6,7 +6,7 @@
#include "d/d_lib.h"
#include "m_Do/m_Do_audio.h"
#include "m_Do/m_Do_controller_pad.h"
-#include <stdio>
+#include <cstdio>
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "f_op/f_op_msg_mng.h"
diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp
index fec0de589c..b0597577b6 100644
--- a/src/d/d_particle.cpp
+++ b/src/d/d_particle.cpp
@@ -17,7 +17,7 @@
#include "JSystem/JParticle/JPAResourceManager.h"
#include "JSystem/JMath/JMATrigonometric.h"
#include "d/d_s_play.h"
-#include <stdio>
+#include <cstdio>
#include "d/d_com_inf_game.h"
#include "m_Do/m_Do_lib.h"
#include "m_Do/m_Do_graphic.h"
diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp
index be4e71b9f3..f47814388a 100644
--- a/src/d/d_resorce.cpp
+++ b/src/d/d_resorce.cpp
@@ -14,7 +14,7 @@
#include "d/d_com_inf_game.h"
#include "f_op/f_op_camera_mng.h"
#include "m_Do/m_Do_graphic.h"
-#include <stdio>
+#include <cstdio>
dRes_info_c::dRes_info_c() {
mCount = 0;
diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp
index e86cc5f062..bc7414f8e4 100644
--- a/src/d/d_s_menu.cpp
+++ b/src/d/d_s_menu.cpp
@@ -19,7 +19,7 @@
#include "JSystem/JUtility/JUTDbPrint.h"
#include "JSystem/JUtility/JUTReport.h"
-#include <stdlib>
+#include <cstdlib>
#if DEBUG
void dScnMenu_setItem(int i_slotNo, u8 i_itemNo);
diff --git a/src/d/d_s_room.cpp b/src/d/d_s_room.cpp
index b0b6ad1e19..836a9a1a18 100644
--- a/src/d/d_s_room.cpp
+++ b/src/d/d_s_room.cpp
@@ -10,7 +10,7 @@
#include "d/d_s_play.h"
#include "d/d_s_room.h"
#include "m_Do/m_Do_Reset.h"
-#include <stdio>
+#include <cstdio>
static int dScnRoom_Draw(room_of_scene_class* i_this) {
return 1;
diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp
index 99bcced05a..fed8634d8b 100644
--- a/src/d/d_save.cpp
+++ b/src/d/d_save.cpp
@@ -13,7 +13,7 @@
#include "d/d_save.h"
#include "d/d_save_init.h"
#include "f_op/f_op_scene_mng.h"
-#include <stdio>
+#include <cstdio>
#if PLATFORM_WII || PLATFORM_SHIELD
#include <revolution/sc.h>
diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp
index 7c6a9dc2c0..809afb65fc 100644
--- a/src/d/d_stage.cpp
+++ b/src/d/d_stage.cpp
@@ -17,7 +17,7 @@
#include "f_op/f_op_scene_mng.h"
#include "global.h"
#include "m_Do/m_Do_Reset.h"
-#include <stdio>
+#include <cstdio>
void dStage_nextStage_c::set(const char* i_stage, s8 i_roomId, s16 i_point, s8 i_layer, s8 i_wipe,
u8 i_speed) {
diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp
index 25c4bc529f..dacaba3bee 100644
--- a/src/m_Do/m_Do_MemCardRWmng.cpp
+++ b/src/m_Do/m_Do_MemCardRWmng.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JUtility/JUTTexture.h"
#include "d/d_com_inf_game.h"
#include "d/d_save.h"
-#include <stdio>
+#include <cstdio>
#if VERSION == VERSION_GCN_JPN
#define HEADER_TITLE "ゼルダの伝説 トワイライトプリンセス"
diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp
index c1adb5a8ec..07ad32028e 100644
--- a/src/m_Do/m_Do_ext.cpp
+++ b/src/m_Do/m_Do_ext.cpp
@@ -22,7 +22,7 @@
#include "m_Do/m_Do_ext.h"
#include "m_Do/m_Do_main.h"
#include "m_Do/m_Do_mtx.h"
-#include <stdio>
+#include <cstdio>
namespace m_Do_ext {
u8 CurrentHeapAdjustVerbose;
diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp
index fe55ea10c9..1cca26b3a1 100644
--- a/src/m_Do/m_Do_printf.cpp
+++ b/src/m_Do/m_Do_printf.cpp
@@ -4,7 +4,7 @@
*/
#include "m_Do/m_Do_printf.h"
-#include <stdio>
+#include <cstdio>
#include <dolphin/base/PPCArch.h>
#include "m_Do/m_Do_ext.h"
diff --git a/src/revolution/homebuttonLib/nw4hbm/db/assert.h b/src/revolution/homebuttonLib/nw4hbm/db/assert.h
index 8a7097e4f5..fed9be6025 100644
--- a/src/revolution/homebuttonLib/nw4hbm/db/assert.h
+++ b/src/revolution/homebuttonLib/nw4hbm/db/assert.h
@@ -3,7 +3,7 @@
#include <revolution/types.h>
-#include <stdio>
+#include <cstdio>
namespace nw4hbm {
namespace db {
diff --git a/src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h b/src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h
index e0ccf2445c..80582db70c 100644
--- a/src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h
+++ b/src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h
@@ -1,8 +1,8 @@
#ifndef NW4HBM_MATH_ARITHMETIC_H
#define NW4HBM_MATH_ARITHMETIC_H
-#include <math>
-#include <math>
+#include <cmath>
+#include <cmath>
#include <revolution/os.h>
#include <revolution/types.h>
diff --git a/src/revolution/homebuttonLib/nw4hbm/math/triangular.h b/src/revolution/homebuttonLib/nw4hbm/math/triangular.h
index 9f175a00cc..27be799ff6 100644
--- a/src/revolution/homebuttonLib/nw4hbm/math/triangular.h
+++ b/src/revolution/homebuttonLib/nw4hbm/math/triangular.h
@@ -1,8 +1,8 @@
#ifndef NW4HBM_MATH_TRIANGULAR_H
#define NW4HBM_MATH_TRIANGULAR_H
-#include <math>
-#include <math>
+#include <cmath>
+#include <cmath>
#include <revolution/types.h>
diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h b/src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h
index e19778295c..4470fad3c6 100644
--- a/src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h
+++ b/src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h
@@ -7,7 +7,7 @@
#include "Rect.h"
#include <string>
-#include <stdio>
+#include <cstdio>
#include "TagProcessorBase.h"
diff --git a/src/revolution/homebuttonLib/sound/synenv.cpp b/src/revolution/homebuttonLib/sound/synenv.cpp
index c9057b158e..894a744004 100644
--- a/src/revolution/homebuttonLib/sound/synenv.cpp
+++ b/src/revolution/homebuttonLib/sound/synenv.cpp
@@ -2,7 +2,7 @@
#include <climits>
-#include <math>
+#include <cmath>
#include <revolution/types.h>