summaryrefslogtreecommitdiff
path: root/include/rvl
diff options
context:
space:
mode:
authorElijah Thomas <42302100+elijah-thomas774@users.noreply.github.com>2024-10-16 15:36:02 -0400
committerGitHub <noreply@github.com>2024-10-16 15:36:02 -0400
commit26af4db82da23364961ebb440efba88846240731 (patch)
tree9cfe6a427cfe59c13c64928ccef6ba3c5ccfec21 /include/rvl
parent4543ec129ec02649b24ae0e20d8325a5f066c9b1 (diff)
update from dtk-template - clangd :) (#66)
* update from dtk-template and start work towards using clangd * include <a> -> "a" * Update build.yml * remove/add non-trivial class in union warning
Diffstat (limited to 'include/rvl')
-rw-r--r--include/rvl/AI/ai.h2
-rw-r--r--include/rvl/AI/ai_hardware.h2
-rw-r--r--include/rvl/ARC/arc.h7
-rw-r--r--include/rvl/AX.h22
-rw-r--r--include/rvl/AX/AX.h2
-rw-r--r--include/rvl/AX/AXAlloc.h4
-rw-r--r--include/rvl/AX/AXAux.h2
-rw-r--r--include/rvl/AX/AXCL.h8
-rw-r--r--include/rvl/AX/AXComp.h2
-rw-r--r--include/rvl/AX/AXOut.h2
-rw-r--r--include/rvl/AX/AXPB.h12
-rw-r--r--include/rvl/AX/AXProf.h2
-rw-r--r--include/rvl/AX/AXSPB.h6
-rw-r--r--include/rvl/AX/AXVPB.h7
-rw-r--r--include/rvl/AX/DSPCode.h2
-rw-r--r--include/rvl/AXFX.h22
-rw-r--r--include/rvl/AXFX/AXFXChorus.h4
-rw-r--r--include/rvl/AXFX/AXFXChorusExp.h2
-rw-r--r--include/rvl/AXFX/AXFXCommon.h2
-rw-r--r--include/rvl/AXFX/AXFXDelay.h2
-rw-r--r--include/rvl/AXFX/AXFXHooks.h2
-rw-r--r--include/rvl/AXFX/AXFXLfoTable.h2
-rw-r--r--include/rvl/AXFX/AXFXReverbHi.h4
-rw-r--r--include/rvl/AXFX/AXFXReverbHiDpl2.h5
-rw-r--r--include/rvl/AXFX/AXFXReverbHiExp.h2
-rw-r--r--include/rvl/AXFX/AXFXReverbHiExpDpl2.h2
-rw-r--r--include/rvl/AXFX/AXFXSrcCoef.h2
-rw-r--r--include/rvl/BASE/PPCArch.h2
-rw-r--r--include/rvl/CARD/CARD.h2
-rw-r--r--include/rvl/CNT/cnt.h5
-rw-r--r--include/rvl/CX/cx.h2
-rw-r--r--include/rvl/DB/db.h2
-rw-r--r--include/rvl/DSP/dsp.h2
-rw-r--r--include/rvl/DSP/dsp_debug.h2
-rw-r--r--include/rvl/DSP/dsp_hardware.h2
-rw-r--r--include/rvl/DSP/dsp_task.h2
-rw-r--r--include/rvl/DVD.h1
-rw-r--r--include/rvl/DVD/dvd.h7
-rw-r--r--include/rvl/DVD/dvd_broadway.h8
-rw-r--r--include/rvl/DVD/dvderror.h2
-rw-r--r--include/rvl/DVD/dvdfatal.h2
-rw-r--r--include/rvl/DVD/dvdfs.h7
-rw-r--r--include/rvl/DVD/dvdidutils.h4
-rw-r--r--include/rvl/DVD/dvdqueue.h6
-rw-r--r--include/rvl/ESP/esp.h8
-rw-r--r--include/rvl/EXI/EXIBios.h4
-rw-r--r--include/rvl/EXI/EXICommon.h16
-rw-r--r--include/rvl/EXI/EXIHardware.h6
-rw-r--r--include/rvl/EXI/EXIUart.h6
-rw-r--r--include/rvl/FS/fs.h30
-rw-r--r--include/rvl/GX/GXAttr.h8
-rw-r--r--include/rvl/GX/GXBump.h11
-rw-r--r--include/rvl/GX/GXDisplayList.h4
-rw-r--r--include/rvl/GX/GXDraw.h2
-rw-r--r--include/rvl/GX/GXFifo.h3
-rw-r--r--include/rvl/GX/GXFrameBuf.h2
-rw-r--r--include/rvl/GX/GXGeometry.h3
-rw-r--r--include/rvl/GX/GXHardware.h52
-rw-r--r--include/rvl/GX/GXHardwareBP.h3
-rw-r--r--include/rvl/GX/GXHardwareCP.h3
-rw-r--r--include/rvl/GX/GXHardwareXF.h3
-rw-r--r--include/rvl/GX/GXInit.h5
-rw-r--r--include/rvl/GX/GXInternal.h9
-rw-r--r--include/rvl/GX/GXLight.h9
-rw-r--r--include/rvl/GX/GXMisc.h2
-rw-r--r--include/rvl/GX/GXPixel.h6
-rw-r--r--include/rvl/GX/GXTev.h3
-rw-r--r--include/rvl/GX/GXTexture.h29
-rw-r--r--include/rvl/GX/GXTransform.h3
-rw-r--r--include/rvl/GX/GXTypes.h63
-rw-r--r--include/rvl/GX/GXVert.h3
-rw-r--r--include/rvl/IPC/ipcMain.h5
-rw-r--r--include/rvl/IPC/ipcProfile.h3
-rw-r--r--include/rvl/IPC/ipcclt.h16
-rw-r--r--include/rvl/IPC/memory.h2
-rw-r--r--include/rvl/KPAD.h2
-rw-r--r--include/rvl/KPAD/KPAD.h2
-rw-r--r--include/rvl/MEM.h10
-rw-r--r--include/rvl/MEM/mem_allocator.h2
-rw-r--r--include/rvl/MEM/mem_expHeap.h8
-rw-r--r--include/rvl/MEM/mem_frameHeap.h6
-rw-r--r--include/rvl/MEM/mem_heapCommon.h13
-rw-r--r--include/rvl/MEM/mem_list.h2
-rw-r--r--include/rvl/MTX/mtx.h2
-rw-r--r--include/rvl/MTX/mtx44.h4
-rw-r--r--include/rvl/MTX/mtxvec.h3
-rw-r--r--include/rvl/MTX/quat.h3
-rw-r--r--include/rvl/MTX/vec.h3
-rw-r--r--include/rvl/NAND/NANDCheck.h3
-rw-r--r--include/rvl/NAND/NANDCore.h3
-rw-r--r--include/rvl/NAND/NANDOpenClose.h18
-rw-r--r--include/rvl/NAND/nand.h30
-rw-r--r--include/rvl/NWC24/NWC24Schedule.h2
-rw-r--r--include/rvl/NWC24/NWC24System.h2
-rw-r--r--include/rvl/NWC24/NWC24Time.h2
-rw-r--r--include/rvl/NdevExi2AD/DebuggerDriver.h6
-rw-r--r--include/rvl/NdevExi2AD/ODEMU.h2
-rw-r--r--include/rvl/NdevExi2AD/exi2.h2
-rw-r--r--include/rvl/OS.h4
-rw-r--r--include/rvl/OS/OS.h4
-rw-r--r--include/rvl/OS/OSAddress.h5
-rw-r--r--include/rvl/OS/OSAlarm.h2
-rw-r--r--include/rvl/OS/OSAlloc.h2
-rw-r--r--include/rvl/OS/OSArena.h2
-rw-r--r--include/rvl/OS/OSAudioSystem.h2
-rw-r--r--include/rvl/OS/OSCache.h2
-rw-r--r--include/rvl/OS/OSContext.h2
-rw-r--r--include/rvl/OS/OSCrc.h2
-rw-r--r--include/rvl/OS/OSError.h15
-rw-r--r--include/rvl/OS/OSExec.h2
-rw-r--r--include/rvl/OS/OSFastCast.h2
-rw-r--r--include/rvl/OS/OSFatal.h3
-rw-r--r--include/rvl/OS/OSFont.h2
-rw-r--r--include/rvl/OS/OSHardware.h45
-rw-r--r--include/rvl/OS/OSInterrupt.h2
-rw-r--r--include/rvl/OS/OSIpc.h2
-rw-r--r--include/rvl/OS/OSLink.h74
-rw-r--r--include/rvl/OS/OSMemory.h2
-rw-r--r--include/rvl/OS/OSMessage.h8
-rw-r--r--include/rvl/OS/OSMutex.h4
-rw-r--r--include/rvl/OS/OSNet.h2
-rw-r--r--include/rvl/OS/OSPlayRecord.h2
-rw-r--r--include/rvl/OS/OSReset.h7
-rw-r--r--include/rvl/OS/OSRtc.h2
-rw-r--r--include/rvl/OS/OSStateFlags.h2
-rw-r--r--include/rvl/OS/OSStateTM.h2
-rw-r--r--include/rvl/OS/OSSync.h2
-rw-r--r--include/rvl/OS/OSThread.h16
-rw-r--r--include/rvl/OS/OSTime.h6
-rw-r--r--include/rvl/OS/OSUtf.h2
-rw-r--r--include/rvl/OS/__ppc_eabi_init.h12
-rw-r--r--include/rvl/PAD/Pad.h2
-rw-r--r--include/rvl/SC/scapi.h23
-rw-r--r--include/rvl/SC/scapi_prdinfo.h2
-rw-r--r--include/rvl/SC/scsystem.h10
-rw-r--r--include/rvl/SI/SIBios.h2
-rw-r--r--include/rvl/TPL/TPL.h6
-rw-r--r--include/rvl/USB/usb.h20
-rw-r--r--include/rvl/VF/pf.h2
-rw-r--r--include/rvl/VF/pf_clib.h2
-rw-r--r--include/rvl/VF/pf_code.h2
-rw-r--r--include/rvl/VF/pf_service.h2
-rw-r--r--include/rvl/VF/pf_str.h4
-rw-r--r--include/rvl/VF/pf_volume.h3
-rw-r--r--include/rvl/VF/pf_w_clib.h2
-rw-r--r--include/rvl/VI/vi.h6
-rw-r--r--include/rvl/VI/vi3in1.h2
-rw-r--r--include/rvl/VI/vihardware.h6
-rw-r--r--include/rvl/WENC.h2
-rw-r--r--include/rvl/WENC/wenc.h5
-rw-r--r--include/rvl/WPAD.h4
-rw-r--r--include/rvl/WPAD/WPAD.h7
-rw-r--r--include/rvl/WPAD/WPADMem.h6
-rw-r--r--include/rvl/WPAD/WUD.h2
154 files changed, 602 insertions, 406 deletions
diff --git a/include/rvl/AI/ai.h b/include/rvl/AI/ai.h
index 4ddf3854..3fe542be 100644
--- a/include/rvl/AI/ai.h
+++ b/include/rvl/AI/ai.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AI_H
#define RVL_SDK_AI_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AI/ai_hardware.h b/include/rvl/AI/ai_hardware.h
index c9630d43..e7bce5f2 100644
--- a/include/rvl/AI/ai_hardware.h
+++ b/include/rvl/AI/ai_hardware.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AI_HARDWARE_H
#define RVL_SDK_AI_HARDWARE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/ARC/arc.h b/include/rvl/ARC/arc.h
index 11c2eb16..9a735361 100644
--- a/include/rvl/ARC/arc.h
+++ b/include/rvl/ARC/arc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_ARC_H
#define RVL_SDK_ARC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -10,7 +10,10 @@ extern "C" {
* https://github.com/riidefi/WiiCore/tree/master/source/rx
*/
-typedef enum { ARC_ENTRY_FILE, ARC_ENTRY_FOLDER } ARCEntryType;
+typedef enum {
+ ARC_ENTRY_FILE,
+ ARC_ENTRY_FOLDER
+} ARCEntryType;
typedef struct ARCNode {
union {
diff --git a/include/rvl/AX.h b/include/rvl/AX.h
index ba62c550..8992a168 100644
--- a/include/rvl/AX.h
+++ b/include/rvl/AX.h
@@ -8,17 +8,17 @@
extern "C" {
#endif
-#include <rvl/AX/AX.h>
-#include <rvl/AX/AXAlloc.h>
-#include <rvl/AX/AXAux.h>
-#include <rvl/AX/AXCL.h>
-#include <rvl/AX/AXComp.h>
-#include <rvl/AX/AXOut.h>
-#include <rvl/AX/AXPB.h>
-#include <rvl/AX/AXProf.h>
-#include <rvl/AX/AXSPB.h>
-#include <rvl/AX/AXVPB.h>
-#include <rvl/AX/DSPCode.h>
+#include "rvl/AX/AX.h"
+#include "rvl/AX/AXAlloc.h"
+#include "rvl/AX/AXAux.h"
+#include "rvl/AX/AXCL.h"
+#include "rvl/AX/AXComp.h"
+#include "rvl/AX/AXOut.h"
+#include "rvl/AX/AXPB.h"
+#include "rvl/AX/AXProf.h"
+#include "rvl/AX/AXSPB.h"
+#include "rvl/AX/AXVPB.h"
+#include "rvl/AX/DSPCode.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/AX/AX.h b/include/rvl/AX/AX.h
index 0f4458e6..79cf14ee 100644
--- a/include/rvl/AX/AX.h
+++ b/include/rvl/AX/AX.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_H
#define RVL_SDK_AX_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AX/AXAlloc.h b/include/rvl/AX/AXAlloc.h
index 7622de28..2a48698b 100644
--- a/include/rvl/AX/AXAlloc.h
+++ b/include/rvl/AX/AXAlloc.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_AX_ALLOC_H
#define RVL_SDK_AX_ALLOC_H
-#include <common.h>
-#include <rvl/AX/AXVPB.h>
+#include "common.h"
+#include "rvl/AX/AXVPB.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/AX/AXAux.h b/include/rvl/AX/AXAux.h
index 8c718ab4..2830f23a 100644
--- a/include/rvl/AX/AXAux.h
+++ b/include/rvl/AX/AXAux.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_AUX_H
#define RVL_SDK_AX_AUX_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AX/AXCL.h b/include/rvl/AX/AXCL.h
index d69e0f2c..4a68a090 100644
--- a/include/rvl/AX/AXCL.h
+++ b/include/rvl/AX/AXCL.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_CL_H
#define RVL_SDK_AX_CL_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -11,7 +11,11 @@ extern "C" {
// Each command takes up two bytes
#define AX_CL_SIZE (AX_CL_MAX_CMD * sizeof(u16))
-typedef enum { AX_OUTPUT_STEREO, AX_OUTPUT_SURROUND, AX_OUTPUT_DPL2 } AXOutputMode;
+typedef enum {
+ AX_OUTPUT_STEREO,
+ AX_OUTPUT_SURROUND,
+ AX_OUTPUT_DPL2
+} AXOutputMode;
extern u32 __AXClMode;
diff --git a/include/rvl/AX/AXComp.h b/include/rvl/AX/AXComp.h
index 3fffde81..b389fde8 100644
--- a/include/rvl/AX/AXComp.h
+++ b/include/rvl/AX/AXComp.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_COMP_H
#define RVL_SDK_AX_COMP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AX/AXOut.h b/include/rvl/AX/AXOut.h
index 7dbb6e81..47c84070 100644
--- a/include/rvl/AX/AXOut.h
+++ b/include/rvl/AX/AXOut.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_OUT_H
#define RVL_SDK_AX_OUT_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AX/AXPB.h b/include/rvl/AX/AXPB.h
index e3c133f0..b6de4b99 100644
--- a/include/rvl/AX/AXPB.h
+++ b/include/rvl/AX/AXPB.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_PB_H
#define RVL_SDK_AX_PB_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -22,9 +22,15 @@ extern "C" {
// Amount of nibbles in a frame
#define AX_ADPCM_NIBBLES_PER_FRAME (AX_ADPCM_FRAME_SIZE * 2)
-typedef enum { AX_VOICE_NORMAL, AX_VOICE_STREAM } AXVOICETYPE;
+typedef enum {
+ AX_VOICE_NORMAL,
+ AX_VOICE_STREAM
+} AXVOICETYPE;
-typedef enum { AX_VOICE_STOP, AX_VOICE_RUN } AXVOICESTATE;
+typedef enum {
+ AX_VOICE_STOP,
+ AX_VOICE_RUN
+} AXVOICESTATE;
typedef enum {
AX_SAMPLE_FORMAT_DSP_ADPCM = 0,
diff --git a/include/rvl/AX/AXProf.h b/include/rvl/AX/AXProf.h
index c0dc8f9f..14c1614d 100644
--- a/include/rvl/AX/AXProf.h
+++ b/include/rvl/AX/AXProf.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_PROF_H
#define RVL_SDK_AX_PROF_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AX/AXSPB.h b/include/rvl/AX/AXSPB.h
index 4e562cc3..e149dfba 100644
--- a/include/rvl/AX/AXSPB.h
+++ b/include/rvl/AX/AXSPB.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_SPB_H
#define RVL_SDK_AX_SPB_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -70,8 +70,8 @@ typedef struct _AXSTUDIO {
#pragma pack(pop)
AXSTUDIO *__AXGetStudio(void);
-void __AXDepopFadeMain(s32 *all, s32 *value, s16 *depop) DECOMP_DONT_INLINE;
-void __AXDepopFadeRmt(s32 *all, s32 *value, s16 *depop) DECOMP_DONT_INLINE;
+void __AXDepopFadeMain(s32 *all, s32 *value, s16 *depop) DONT_INLINE;
+void __AXDepopFadeRmt(s32 *all, s32 *value, s16 *depop) DONT_INLINE;
void __AXPrintStudio(void);
void __AXSPBInit(void);
void __AXDepopVoice(AXPB *pb);
diff --git a/include/rvl/AX/AXVPB.h b/include/rvl/AX/AXVPB.h
index 4e39e7de..f9593261 100644
--- a/include/rvl/AX/AXVPB.h
+++ b/include/rvl/AX/AXVPB.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_AX_VPB_H
#define RVL_SDK_AX_VPB_H
-#include <common.h>
-#include <rvl/AX/AXPB.h>
+#include "common.h"
+#include "rvl/AX/AXPB.h"
+
#ifdef __cplusplus
extern "C" {
@@ -10,7 +11,7 @@ extern "C" {
#define AX_SAMPLE_RATE 32000
#define AX_VOICE_MAX 96
-typedef enum {
+enum {
AX_PBSYNC_SELECT = (1 << 0),
AX_PBSYNC_MIXER_CTRL = (1 << 1),
AX_PBSYNC_STATE = (1 << 2),
diff --git a/include/rvl/AX/DSPCode.h b/include/rvl/AX/DSPCode.h
index b7b5a1ac..0e4ed841 100644
--- a/include/rvl/AX/DSPCode.h
+++ b/include/rvl/AX/DSPCode.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AX_DSP_CODE_H
#define RVL_SDK_AX_DSP_CODE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX.h b/include/rvl/AXFX.h
index 8c6b192a..fbfaaa60 100644
--- a/include/rvl/AXFX.h
+++ b/include/rvl/AXFX.h
@@ -4,17 +4,17 @@
extern "C" {
#endif
-#include <rvl/AXFX/AXFXChorus.h>
-#include <rvl/AXFX/AXFXChorusExp.h>
-#include <rvl/AXFX/AXFXCommon.h>
-#include <rvl/AXFX/AXFXDelay.h>
-#include <rvl/AXFX/AXFXHooks.h>
-#include <rvl/AXFX/AXFXLfoTable.h>
-#include <rvl/AXFX/AXFXReverbHi.h>
-#include <rvl/AXFX/AXFXReverbHiDpl2.h>
-#include <rvl/AXFX/AXFXReverbHiExp.h>
-#include <rvl/AXFX/AXFXReverbHiExpDpl2.h>
-#include <rvl/AXFX/AXFXSrcCoef.h>
+#include "rvl/AXFX/AXFXChorus.h"
+#include "rvl/AXFX/AXFXChorusExp.h"
+#include "rvl/AXFX/AXFXCommon.h"
+#include "rvl/AXFX/AXFXDelay.h"
+#include "rvl/AXFX/AXFXHooks.h"
+#include "rvl/AXFX/AXFXLfoTable.h"
+#include "rvl/AXFX/AXFXReverbHi.h"
+#include "rvl/AXFX/AXFXReverbHiDpl2.h"
+#include "rvl/AXFX/AXFXReverbHiExp.h"
+#include "rvl/AXFX/AXFXReverbHiExpDpl2.h"
+#include "rvl/AXFX/AXFXSrcCoef.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/AXFX/AXFXChorus.h b/include/rvl/AXFX/AXFXChorus.h
index fc515746..a6c518f2 100644
--- a/include/rvl/AXFX/AXFXChorus.h
+++ b/include/rvl/AXFX/AXFXChorus.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_AXFX_CHORUS_H
#define RVL_SDK_AXFX_CHORUS_H
-#include <common.h>
-#include <rvl/AXFX/AXFXChorusExp.h>
+#include "common.h"
+#include "rvl/AXFX/AXFXChorusExp.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/AXFX/AXFXChorusExp.h b/include/rvl/AXFX/AXFXChorusExp.h
index 3892eda6..7a432cf0 100644
--- a/include/rvl/AXFX/AXFXChorusExp.h
+++ b/include/rvl/AXFX/AXFXChorusExp.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_CHORUS_EXP_H
#define RVL_SDK_AXFX_CHORUS_EXP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXCommon.h b/include/rvl/AXFX/AXFXCommon.h
index ac72acb3..c01037a6 100644
--- a/include/rvl/AXFX/AXFXCommon.h
+++ b/include/rvl/AXFX/AXFXCommon.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_COMMON_H
#define RVL_SDK_AXFX_COMMON_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXDelay.h b/include/rvl/AXFX/AXFXDelay.h
index 54d35e13..0443308e 100644
--- a/include/rvl/AXFX/AXFXDelay.h
+++ b/include/rvl/AXFX/AXFXDelay.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_DELAY_H
#define RVL_SDK_AXFX_DELAY_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXHooks.h b/include/rvl/AXFX/AXFXHooks.h
index cb210591..b870c8a4 100644
--- a/include/rvl/AXFX/AXFXHooks.h
+++ b/include/rvl/AXFX/AXFXHooks.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_HOOKS_H
#define RVL_SDK_AXFX_HOOKS_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXLfoTable.h b/include/rvl/AXFX/AXFXLfoTable.h
index f2bbd753..3b58b1fe 100644
--- a/include/rvl/AXFX/AXFXLfoTable.h
+++ b/include/rvl/AXFX/AXFXLfoTable.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_LFO_TABLE_H
#define RVL_SDK_AXFX_LFO_TABLE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXReverbHi.h b/include/rvl/AXFX/AXFXReverbHi.h
index dcc8a379..0302babd 100644
--- a/include/rvl/AXFX/AXFXReverbHi.h
+++ b/include/rvl/AXFX/AXFXReverbHi.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_AXFX_REVERB_HI_H
#define RVL_SDK_AXFX_REVERB_HI_H
-#include <common.h>
-#include <rvl/AXFX/AXFXReverbHiExp.h>
+#include "common.h"
+#include "rvl/AXFX/AXFXReverbHiExp.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/AXFX/AXFXReverbHiDpl2.h b/include/rvl/AXFX/AXFXReverbHiDpl2.h
index e7fdbfd4..d46acad6 100644
--- a/include/rvl/AXFX/AXFXReverbHiDpl2.h
+++ b/include/rvl/AXFX/AXFXReverbHiDpl2.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_AXFX_REVERB_HI_DPL2_H
#define RVL_SDK_AXFX_REVERB_HI_DPL2_H
-#include <common.h>
-#include <rvl/AXFX/AXFXReverbHiExpDpl2.h>
+#include "common.h"
+#include "rvl/AXFX/AXFXReverbHiExpDpl2.h"
+
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/AXFX/AXFXReverbHiExp.h b/include/rvl/AXFX/AXFXReverbHiExp.h
index d0089190..c7a75cbb 100644
--- a/include/rvl/AXFX/AXFXReverbHiExp.h
+++ b/include/rvl/AXFX/AXFXReverbHiExp.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_REVERB_HI_EXP_H
#define RVL_SDK_AXFX_REVERB_HI_EXP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXReverbHiExpDpl2.h b/include/rvl/AXFX/AXFXReverbHiExpDpl2.h
index 0fb21ae3..10232e0c 100644
--- a/include/rvl/AXFX/AXFXReverbHiExpDpl2.h
+++ b/include/rvl/AXFX/AXFXReverbHiExpDpl2.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_REVERB_HI_EXP_DPL2_H
#define RVL_SDK_AXFX_REVERB_HI_EXP_DPL2_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/AXFX/AXFXSrcCoef.h b/include/rvl/AXFX/AXFXSrcCoef.h
index aa0aaeef..a16eae65 100644
--- a/include/rvl/AXFX/AXFXSrcCoef.h
+++ b/include/rvl/AXFX/AXFXSrcCoef.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_AXFX_SRC_COEF_H
#define RVL_SDK_AXFX_SRC_COEF_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/BASE/PPCArch.h b/include/rvl/BASE/PPCArch.h
index 27cd1c6d..aa4b25f4 100644
--- a/include/rvl/BASE/PPCArch.h
+++ b/include/rvl/BASE/PPCArch.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_PPC_ARCH_H
#define RVL_SDK_PPC_ARCH_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/CARD/CARD.h b/include/rvl/CARD/CARD.h
index f07e8b9f..d443e724 100644
--- a/include/rvl/CARD/CARD.h
+++ b/include/rvl/CARD/CARD.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_CARD_H
#define RVL_SDK_CARD_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/CNT/cnt.h b/include/rvl/CNT/cnt.h
index 23c6ca98..4c22e704 100644
--- a/include/rvl/CNT/cnt.h
+++ b/include/rvl/CNT/cnt.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_CNT_H
#define RVL_SDK_CNT_H
-#include "rvl/ARC.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/ARC.h" // IWYU pragma: export
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/CX/cx.h b/include/rvl/CX/cx.h
index 1c4d0e3e..4b342c44 100644
--- a/include/rvl/CX/cx.h
+++ b/include/rvl/CX/cx.h
@@ -1,7 +1,7 @@
#ifndef RVL_CX_H
#define RVL_CX_H
-#include <common.h>
+#include "common.h"
// .text: [0x803cee90, 0x803d0b20]
diff --git a/include/rvl/DB/db.h b/include/rvl/DB/db.h
index 13259afd..b85ed419 100644
--- a/include/rvl/DB/db.h
+++ b/include/rvl/DB/db.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DB_H
#define RVL_SDK_DB_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DSP/dsp.h b/include/rvl/DSP/dsp.h
index c22f37c8..313ab167 100644
--- a/include/rvl/DSP/dsp.h
+++ b/include/rvl/DSP/dsp.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DSP_H
#define RVL_SDK_DSP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DSP/dsp_debug.h b/include/rvl/DSP/dsp_debug.h
index 1390d7c0..6f3efe89 100644
--- a/include/rvl/DSP/dsp_debug.h
+++ b/include/rvl/DSP/dsp_debug.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DSP_DEBUG_H
#define RVL_SDK_DSP_DEBUG_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DSP/dsp_hardware.h b/include/rvl/DSP/dsp_hardware.h
index 34797cca..40352c45 100644
--- a/include/rvl/DSP/dsp_hardware.h
+++ b/include/rvl/DSP/dsp_hardware.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DSP_HARDWARE_H
#define RVL_SDK_DSP_HARDWARE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DSP/dsp_task.h b/include/rvl/DSP/dsp_task.h
index 98444616..aa7e54a5 100644
--- a/include/rvl/DSP/dsp_task.h
+++ b/include/rvl/DSP/dsp_task.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DSP_TASK_H
#define RVL_SDK_DSP_TASK_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DVD.h b/include/rvl/DVD.h
index 35fc9f78..08eaaced 100644
--- a/include/rvl/DVD.h
+++ b/include/rvl/DVD.h
@@ -12,7 +12,6 @@ extern "C" {
#include "rvl/DVD/dvdidutils.h"
#include "rvl/DVD/dvdqueue.h"
-
#ifdef __cplusplus
}
#endif
diff --git a/include/rvl/DVD/dvd.h b/include/rvl/DVD/dvd.h
index a7b93240..aa63696a 100644
--- a/include/rvl/DVD/dvd.h
+++ b/include/rvl/DVD/dvd.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DVD_H
#define RVL_SDK_DVD_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -92,8 +92,9 @@ typedef struct DVDFileInfo {
extern volatile u32 __DVDLayoutFormat;
void DVDInit(void);
-BOOL DVDReadAbsAsyncPrio(DVDCommandBlock *block, void *dst, u32 size, u32 offset, DVDCommandCallback callback,
- s32 prio);
+BOOL DVDReadAbsAsyncPrio(
+ DVDCommandBlock *block, void *dst, u32 size, u32 offset, DVDCommandCallback callback, s32 prio
+);
BOOL DVDInquiryAsync(DVDCommandBlock *block, DVDDriveInfo *info, DVDCommandCallback callback);
s32 DVDGetCommandBlockStatus(const DVDCommandBlock *block);
s32 DVDGetDriveStatus(void);
diff --git a/include/rvl/DVD/dvd_broadway.h b/include/rvl/DVD/dvd_broadway.h
index 01016ade..505b595a 100644
--- a/include/rvl/DVD/dvd_broadway.h
+++ b/include/rvl/DVD/dvd_broadway.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DVD_BROADWAY_H
#define RVL_SDK_DVD_BROADWAY_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -35,8 +35,10 @@ typedef void (*DVDLowCallback)(u32 intType);
BOOL DVDLowInit(void);
BOOL DVDLowReadDiskID(struct DVDDiskID *out, DVDLowCallback callback);
-BOOL DVDLowOpenPartition(u32 offset, const struct ESPTicket *ticket, u32 certsSize, const void *certs,
- struct ESPTmd *tmd, DVDLowCallback callback);
+BOOL DVDLowOpenPartition(
+ u32 offset, const struct ESPTicket *ticket, u32 certsSize, const void *certs, struct ESPTmd *tmd,
+ DVDLowCallback callback
+);
BOOL DVDLowClosePartition(DVDLowCallback callback);
BOOL DVDLowUnencryptedRead(void *dst, u32 size, u32 offset, DVDLowCallback callback);
BOOL DVDLowStopMotor(BOOL eject, BOOL kill, DVDLowCallback callback);
diff --git a/include/rvl/DVD/dvderror.h b/include/rvl/DVD/dvderror.h
index 1b5fc4e1..30e048e3 100644
--- a/include/rvl/DVD/dvderror.h
+++ b/include/rvl/DVD/dvderror.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DVD_ERROR_H
#define RVL_SDK_DVD_ERROR_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DVD/dvdfatal.h b/include/rvl/DVD/dvdfatal.h
index c221c498..2bc14a5e 100644
--- a/include/rvl/DVD/dvdfatal.h
+++ b/include/rvl/DVD/dvdfatal.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_DVD_FATAL_H
#define RVL_SDK_DVD_FATAL_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/DVD/dvdfs.h b/include/rvl/DVD/dvdfs.h
index 1a0434ff..8426071d 100644
--- a/include/rvl/DVD/dvdfs.h
+++ b/include/rvl/DVD/dvdfs.h
@@ -1,8 +1,9 @@
#ifndef RVL_SDK_DVD_FS_H
#define RVL_SDK_DVD_FS_H
-#include <rvl/DVD/dvd.h>
-#include <rvl/OS.h>
-#include <common.h>
+#include "common.h"
+#include "rvl/DVD/dvd.h"
+#include "rvl/OS.h" // IWYU pragma: export
+
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/DVD/dvdidutils.h b/include/rvl/DVD/dvdidutils.h
index ce832689..d877fa38 100644
--- a/include/rvl/DVD/dvdidutils.h
+++ b/include/rvl/DVD/dvdidutils.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_DVD_ID_UTILS_H
#define RVL_SDK_DVD_ID_UTILS_H
-#include <rvl/DVD/dvd.h>
-#include <common.h>
+#include "common.h"
+#include "rvl/DVD/dvd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/rvl/DVD/dvdqueue.h b/include/rvl/DVD/dvdqueue.h
index 977d79aa..da713cfd 100644
--- a/include/rvl/DVD/dvdqueue.h
+++ b/include/rvl/DVD/dvdqueue.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_DVD_QUEUE_H
#define RVL_SDK_DVD_QUEUE_H
-#include <rvl/DVD/dvd.h>
-#include <common.h>
+#include "common.h"
+#include "rvl/DVD/dvd.h"
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/ESP/esp.h b/include/rvl/ESP/esp.h
index f28c7db7..d158e3c8 100644
--- a/include/rvl/ESP/esp.h
+++ b/include/rvl/ESP/esp.h
@@ -1,8 +1,10 @@
#ifndef RVL_SDK_ESP_H
#define RVL_SDK_ESP_H
-#include "rvl/ARC.h"
-#include "rvl/IPC.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/ARC.h" // IWYU pragma: export
+#include "rvl/IPC.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/EXI/EXIBios.h b/include/rvl/EXI/EXIBios.h
index 9438d77d..53d62211 100644
--- a/include/rvl/EXI/EXIBios.h
+++ b/include/rvl/EXI/EXIBios.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_EXI_BIOS_H
#define RVL_SDK_EXI_BIOS_H
+#include "common.h"
#include "rvl/EXI/EXICommon.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/EXI/EXICommon.h b/include/rvl/EXI/EXICommon.h
index 698964f9..663b8fa2 100644
--- a/include/rvl/EXI/EXICommon.h
+++ b/include/rvl/EXI/EXICommon.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_EXI_COMMON_H
#define RVL_SDK_EXI_COMMON_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -18,9 +18,19 @@ typedef enum {
EXI_STATE_BUSY = EXI_STATE_DMA_ACCESS | EXI_STATE_IMM_ACCESS
} EXIState;
-typedef enum { EXI_CHAN_0, EXI_CHAN_1, EXI_CHAN_2, EXI_MAX_CHAN } EXIChannel;
+typedef enum {
+ EXI_CHAN_0,
+ EXI_CHAN_1,
+ EXI_CHAN_2,
+ EXI_MAX_CHAN
+} EXIChannel;
-typedef enum { EXI_READ, EXI_WRITE, EXI_TYPE_2, EXI_MAX_TYPE } EXIType;
+typedef enum {
+ EXI_READ,
+ EXI_WRITE,
+ EXI_TYPE_2,
+ EXI_MAX_TYPE
+} EXIType;
typedef void (*EXICallback)(EXIChannel chan, struct OSContext *ctx);
diff --git a/include/rvl/EXI/EXIHardware.h b/include/rvl/EXI/EXIHardware.h
index 75f949d3..d8f14b62 100644
--- a/include/rvl/EXI/EXIHardware.h
+++ b/include/rvl/EXI/EXIHardware.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_EXI_HARDWARE_H
#define RVL_SDK_EXI_HARDWARE_H
+#include "common.h"
#include "rvl/EXI/EXICommon.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -18,7 +20,7 @@ typedef struct ExiChannelControl {
u32 imm; // at 0x10
} ExiChannelControl;
-volatile ExiChannelControl EXI_CHAN_CTRL[EXI_MAX_CHAN] : 0xCD006800;
+volatile ExiChannelControl EXI_CHAN_CTRL[EXI_MAX_CHAN] AT_ADDRESS(0xCD006800);
// CSR - Control Status Register
#define EXI_CSR_EXIINTMASK (1 << 0)
diff --git a/include/rvl/EXI/EXIUart.h b/include/rvl/EXI/EXIUart.h
index f1f8be6a..79da918c 100644
--- a/include/rvl/EXI/EXIUart.h
+++ b/include/rvl/EXI/EXIUart.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_EXI_UART_H
#define RVL_SDK_EXI_UART_H
-#include "rvl/EXI/EXIBios.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/EXI/EXIBios.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/FS/fs.h b/include/rvl/FS/fs.h
index bc15158c..64b80279 100644
--- a/include/rvl/FS/fs.h
+++ b/include/rvl/FS/fs.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_FS_H
#define RVL_SDK_FS_H
-#include "rvl/IPC.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/IPC.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -18,26 +20,32 @@ typedef struct FSStats {
typedef struct FSFileStats {
u32 length; // at 0x0
u32 position; // at 0x4
-} FSFileStats ALIGN(32);
+} FSFileStats ALIGN_DECL(32);
s32 ISFS_OpenLib(void);
s32 ISFS_CreateDir(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm);
-s32 ISFS_CreateDirAsync(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm,
- FSAsyncCallback callback, void *callbackArg);
+s32 ISFS_CreateDirAsync(
+ const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, FSAsyncCallback callback, void *callbackArg
+);
s32 ISFS_ReadDir(const char *path, char *filesOut, u32 *fileCountOut);
s32 ISFS_ReadDirAsync(const char *path, char *filesOut, u32 *fileCountOut, FSAsyncCallback callback, void *callbackArg);
-s32 ISFS_GetAttr(const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut,
- u32 *otherPermOut);
-s32 ISFS_GetAttrAsync(const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut,
- u32 *groupPermOut, u32 *otherPermOut, FSAsyncCallback callback, void *callbackArg);
+s32 ISFS_GetAttr(
+ const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut,
+ u32 *otherPermOut
+);
+s32 ISFS_GetAttrAsync(
+ const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut,
+ u32 *otherPermOut, FSAsyncCallback callback, void *callbackArg
+);
s32 ISFS_Delete(const char *path);
s32 ISFS_DeleteAsync(const char *path, FSAsyncCallback callback, void *callbackArg);
s32 ISFS_Rename(const char *from, const char *to);
s32 ISFS_RenameAsync(const char *from, const char *to, FSAsyncCallback callback, void *callbackArg);
s32 ISFS_GetUsage(const char *path, s32 *blockCountOut, s32 *fileCountOut);
s32 ISFS_CreateFile(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm);
-s32 ISFS_CreateFileAsync(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm,
- FSAsyncCallback callback, void *callbackArg);
+s32 ISFS_CreateFileAsync(
+ const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, FSAsyncCallback callback, void *callbackArg
+);
s32 ISFS_Open(const char *path, IPCOpenMode mode);
s32 ISFS_OpenAsync(const char *path, IPCOpenMode mode, FSAsyncCallback callback, void *callbackArg);
s32 ISFS_GetFileStats(s32 fd, FSFileStats *statsOut);
diff --git a/include/rvl/GX/GXAttr.h b/include/rvl/GX/GXAttr.h
index e7994b6c..2733c512 100644
--- a/include/rvl/GX/GXAttr.h
+++ b/include/rvl/GX/GXAttr.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_ATTR_H
#define RVL_SDK_GX_ATTR_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -36,8 +37,9 @@ void GXGetVtxAttrFmt(GXVtxFmt fmt, GXAttr attr, GXCompCnt *compCnt, GXCompType *
void GXGetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList *list);
void GXSetArray(GXAttr attr, u32 base, u8 stride);
void GXInvalidateVtxCache(void);
-void GXSetTexCoordGen2(GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx, GXBool normalize,
- u32 dualTexMtxIdx);
+void GXSetTexCoordGen2(
+ GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx, GXBool normalize, u32 dualTexMtxIdx
+);
void GXSetNumTexGens(u8 num);
void __GXSetVCD(void);
diff --git a/include/rvl/GX/GXBump.h b/include/rvl/GX/GXBump.h
index b5bc37b3..ff004b4c 100644
--- a/include/rvl/GX/GXBump.h
+++ b/include/rvl/GX/GXBump.h
@@ -1,14 +1,17 @@
#ifndef RVL_SDK_GX_BUMP_H
#define RVL_SDK_GX_BUMP_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-void GXSetTevIndirect(GXTevStageID tevStage, GXIndTexStageID texStage, GXIndTexFormat texFmt, GXIndTexBiasSel biasSel,
- GXIndTexMtxID mtxId, GXIndTexWrap wrapS, GXIndTexWrap wrapT, GXBool addPrev, GXBool utcLod,
- GXIndTexAlphaSel alphaSel);
+void GXSetTevIndirect(
+ GXTevStageID tevStage, GXIndTexStageID texStage, GXIndTexFormat texFmt, GXIndTexBiasSel biasSel,
+ GXIndTexMtxID mtxId, GXIndTexWrap wrapS, GXIndTexWrap wrapT, GXBool addPrev, GXBool utcLod,
+ GXIndTexAlphaSel alphaSel
+);
void GXSetIndTexMtx(GXIndTexMtxID id, const f32 offset[2][3], s8 scaleExp);
void GXSetIndTexCoordScale(GXIndTexStageID stage, GXIndTexScale scaleS, GXIndTexScale scaleT);
void GXSetIndTexOrder(GXIndTexStageID stage, GXTexCoordID coord, GXTexMapID map);
diff --git a/include/rvl/GX/GXDisplayList.h b/include/rvl/GX/GXDisplayList.h
index 67988977..662838f8 100644
--- a/include/rvl/GX/GXDisplayList.h
+++ b/include/rvl/GX/GXDisplayList.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_GX_DISPLAY_LIST_H
#define RVL_SDK_GX_DISPLAY_LIST_H
+#include "common.h"
#include "rvl/GX/GXHardware.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXDraw.h b/include/rvl/GX/GXDraw.h
index 0c4a62f9..4e0120bc 100644
--- a/include/rvl/GX/GXDraw.h
+++ b/include/rvl/GX/GXDraw.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_GX_DRAW_H
#define RVL_SDK_GX_DRAW_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXFifo.h b/include/rvl/GX/GXFifo.h
index c545fd7a..6dd6af76 100644
--- a/include/rvl/GX/GXFifo.h
+++ b/include/rvl/GX/GXFifo.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_FIFO_H
#define RVL_SDK_GX_FIFO_H
+#include "common.h"
#include "rvl/GX/GXInternal.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXFrameBuf.h b/include/rvl/GX/GXFrameBuf.h
index 4b5814ca..774e6fb8 100644
--- a/include/rvl/GX/GXFrameBuf.h
+++ b/include/rvl/GX/GXFrameBuf.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_GX_FRAMEBUF_H
#define RVL_SDK_GX_FRAMEBUF_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXGeometry.h b/include/rvl/GX/GXGeometry.h
index 289e662e..39894b26 100644
--- a/include/rvl/GX/GXGeometry.h
+++ b/include/rvl/GX/GXGeometry.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_GEOMETRY_H
#define RVL_SDK_GX_GEOMETRY_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXHardware.h b/include/rvl/GX/GXHardware.h
index be53d68b..b15d4b0e 100644
--- a/include/rvl/GX/GXHardware.h
+++ b/include/rvl/GX/GXHardware.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_GX_HARDWARE_H
#define RVL_SDK_GX_HARDWARE_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -42,7 +44,7 @@ extern volatile union {
unsigned int ui;
void *p;
float f;
-} WGPIPE : 0xCC008000;
+} WGPIPE AT_ADDRESS(0xCC008000);
/**
* FIFO commands
@@ -67,14 +69,14 @@ typedef enum {
#define __GX_FIFO_SET_LOAD_INDX_NELEM(reg, x) ((reg) = GX_BITSET(reg, 16, 4, x))
#define __GX_FIFO_SET_LOAD_INDX_INDEX(reg, x) ((reg) = GX_BITSET(reg, 0, 16, x))
-#define __GX_FIFO_LOAD_INDX(reg, dst, nelem, index) \
- { \
- u32 cmd = 0; \
- __GX_FIFO_SET_LOAD_INDX_DST(cmd, dst); \
- __GX_FIFO_SET_LOAD_INDX_NELEM(cmd, nelem); \
- __GX_FIFO_SET_LOAD_INDX_INDEX(cmd, index); \
- WGPIPE.c = reg; \
- WGPIPE.i = cmd; \
+#define __GX_FIFO_LOAD_INDX(reg, dst, nelem, index) \
+ { \
+ u32 cmd = 0; \
+ __GX_FIFO_SET_LOAD_INDX_DST(cmd, dst); \
+ __GX_FIFO_SET_LOAD_INDX_NELEM(cmd, nelem); \
+ __GX_FIFO_SET_LOAD_INDX_INDEX(cmd, index); \
+ WGPIPE.c = reg; \
+ WGPIPE.i = cmd; \
}
#define GX_FIFO_LOAD_INDX_A(dst, nelem, index) __GX_FIFO_LOAD_INDX(GX_FIFO_CMD_LOAD_INDX_A, dst, nelem, index)
@@ -96,8 +98,8 @@ typedef enum {
/**
* Load immediate value into BP register
*/
-#define GX_BP_LOAD_REG(data) \
- WGPIPE.c = GX_FIFO_CMD_LOAD_BP_REG; \
+#define GX_BP_LOAD_REG(data) \
+ WGPIPE.c = GX_FIFO_CMD_LOAD_BP_REG; \
WGPIPE.i = (data);
/**
@@ -116,9 +118,9 @@ typedef enum {
/**
* Load immediate value into CP register
*/
-#define GX_CP_LOAD_REG(addr, data) \
- WGPIPE.c = GX_FIFO_CMD_LOAD_CP_REG; \
- WGPIPE.c = (addr); \
+#define GX_CP_LOAD_REG(addr, data) \
+ WGPIPE.c = GX_FIFO_CMD_LOAD_CP_REG; \
+ WGPIPE.c = (addr); \
WGPIPE.i = (data);
/************************************************************
@@ -142,26 +144,26 @@ typedef enum {
/**
* Header for an XF register load
*/
-#define GX_XF_LOAD_REG_HDR(addr) \
- WGPIPE.c = GX_FIFO_CMD_LOAD_XF_REG; \
+#define GX_XF_LOAD_REG_HDR(addr) \
+ WGPIPE.c = GX_FIFO_CMD_LOAD_XF_REG; \
WGPIPE.i = (addr);
/**
* Load immediate value into XF register
*/
-#define GX_XF_LOAD_REG(addr, data) \
- GX_XF_LOAD_REG_HDR(addr); \
+#define GX_XF_LOAD_REG(addr, data) \
+ GX_XF_LOAD_REG_HDR(addr); \
WGPIPE.i = (data);
/**
* Load immediate values into multiple XF registers
*/
-#define GX_XF_LOAD_REGS(size, addr) \
- { \
- u32 cmd = 0; \
- cmd |= (addr); \
- cmd |= (size) << 16; \
- GX_XF_LOAD_REG_HDR(cmd); \
+#define GX_XF_LOAD_REGS(size, addr) \
+ { \
+ u32 cmd = 0; \
+ cmd |= (addr); \
+ cmd |= (size) << 16; \
+ GX_XF_LOAD_REG_HDR(cmd); \
}
/**
diff --git a/include/rvl/GX/GXHardwareBP.h b/include/rvl/GX/GXHardwareBP.h
index c25d1c3c..c11c5375 100644
--- a/include/rvl/GX/GXHardwareBP.h
+++ b/include/rvl/GX/GXHardwareBP.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_HARDWARE_BP_H
#define RVL_SDK_GX_HARDWARE_BP_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXHardwareCP.h b/include/rvl/GX/GXHardwareCP.h
index 6dcef101..362def52 100644
--- a/include/rvl/GX/GXHardwareCP.h
+++ b/include/rvl/GX/GXHardwareCP.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_HARDWARE_CP_H
#define RVL_SDK_GX_HARDWARE_CP_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXHardwareXF.h b/include/rvl/GX/GXHardwareXF.h
index a923fadb..232d6096 100644
--- a/include/rvl/GX/GXHardwareXF.h
+++ b/include/rvl/GX/GXHardwareXF.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_HARDWARE_XF_H
#define RVL_SDK_GX_HARDWARE_XF_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXInit.h b/include/rvl/GX/GXInit.h
index f883273d..3a32d32a 100644
--- a/include/rvl/GX/GXInit.h
+++ b/include/rvl/GX/GXInit.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_INIT_H
#define RVL_SDK_GX_INIT_H
-#include <rvl/GX/GXFifo.h>
-#include <common.h>
+#include "common.h"
+#include "rvl/GX/GXFifo.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXInternal.h b/include/rvl/GX/GXInternal.h
index 8d115a80..7d361174 100644
--- a/include/rvl/GX/GXInternal.h
+++ b/include/rvl/GX/GXInternal.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_INTERNAL_H
#define RVL_SDK_GX_INTERNAL_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -21,9 +22,9 @@ extern "C" {
* (Implementation size is included to require that such a structure already
* exists.)
*/
-#define GX_DECL_PUBLIC_STRUCT(name, size) \
- typedef struct _##name { \
- u8 dummy[(size) - sizeof(name##Impl) + sizeof(name##Impl)]; \
+#define GX_DECL_PUBLIC_STRUCT(name, size) \
+ typedef struct _##name { \
+ u8 dummy[(size) - sizeof(name##Impl) + sizeof(name##Impl)]; \
} name;
typedef struct _GXFifoObjImpl {
diff --git a/include/rvl/GX/GXLight.h b/include/rvl/GX/GXLight.h
index 2deb53e7..be0b8efb 100644
--- a/include/rvl/GX/GXLight.h
+++ b/include/rvl/GX/GXLight.h
@@ -1,8 +1,9 @@
#ifndef RVL_SDK_GX_LIGHT_H
#define RVL_SDK_GX_LIGHT_H
+#include "common.h"
#include "rvl/GX/GXInternal.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -25,8 +26,10 @@ void GXLoadLightObjIndx(u16 index, GXLightID id);
void GXSetChanAmbColor(GXChannelID chan, GXColor color);
void GXSetChanMatColor(GXChannelID chan, GXColor color);
void GXSetNumChans(u8 num);
-void GXSetChanCtrl(GXChannelID chan, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc, GXLightID lightMask,
- GXDiffuseFn diffFn, GXAttnFn attnFn);
+void GXSetChanCtrl(
+ GXChannelID chan, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc, GXLightID lightMask, GXDiffuseFn diffFn,
+ GXAttnFn attnFn
+);
#ifdef __cplusplus
}
diff --git a/include/rvl/GX/GXMisc.h b/include/rvl/GX/GXMisc.h
index 5ab126e9..d04b4d19 100644
--- a/include/rvl/GX/GXMisc.h
+++ b/include/rvl/GX/GXMisc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_GX_MISC_H
#define RVL_SDK_GX_MISC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXPixel.h b/include/rvl/GX/GXPixel.h
index cc110d67..905da97f 100644
--- a/include/rvl/GX/GXPixel.h
+++ b/include/rvl/GX/GXPixel.h
@@ -1,8 +1,10 @@
#ifndef RVL_SDK_GX_PIXEL_H
#define RVL_SDK_GX_PIXEL_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include "rvl/MTX.h"
-#include <common.h>
+#include "rvl/MTX.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXTev.h b/include/rvl/GX/GXTev.h
index cdd651f0..bae86ca2 100644
--- a/include/rvl/GX/GXTev.h
+++ b/include/rvl/GX/GXTev.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_TEV_H
#define RVL_SDK_GX_TEV_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXTexture.h b/include/rvl/GX/GXTexture.h
index 6b758649..5fdd28f7 100644
--- a/include/rvl/GX/GXTexture.h
+++ b/include/rvl/GX/GXTexture.h
@@ -1,7 +1,10 @@
#ifndef RVL_SDK_GX_TEXTURE_H
#define RVL_SDK_GX_TEXTURE_H
+#include "common.h"
+#include "rvl/GX/GXInternal.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -11,10 +14,14 @@ GX_DECL_PUBLIC_STRUCT(GXTlutObj, 12);
void __GXSetSUTexRegs(void);
-void GXInitTexObj(GXTexObj *pTexObj, void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS,
- GXTexWrapMode wrapT, u8 mipmap);
-void GXInitTexObjLOD(GXTexObj *pTexObj, GXTexFilter minFilter, GXTexFilter magFilter, f32 minLOD, f32 maxLOD,
- f32 LODBias, u8 biasClampEnable, u8 edgeLODEnable, GXAnisotropy anisotropy);
+void GXInitTexObj(
+ GXTexObj *pTexObj, void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS, GXTexWrapMode wrapT,
+ u8 mipmap
+);
+void GXInitTexObjLOD(
+ GXTexObj *pTexObj, GXTexFilter minFilter, GXTexFilter magFilter, f32 minLOD, f32 maxLOD, f32 LODBias,
+ u8 biasClampEnable, u8 edgeLODEnable, GXAnisotropy anisotropy
+);
void GXInitTexObjTlut(GXTexObj *, u32);
void GXInitTexObjCI(GXTexObj *, void *, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, u8, u32);
@@ -22,10 +29,14 @@ void GXInitTlutObj(GXTlutObj *, void *, GXTlutFmt, u16);
void GXLoadTlut(GXTlutObj *, u32);
void GXLoadTexObj(GXTexObj *, GXTexMapID);
-void GXGetTexObjAll(const GXTexObj *pTexObj, void **pImage, u16 *width, u16 *height, GXTexFmt *format,
- GXTexWrapMode *wrapS, GXTexWrapMode *wrapT, u8 *mipmap);
-void GXGetTexObjLODAll(const GXTexObj *pTexObj, GXTexFilter *minFilter, GXTexFilter *magFilter, f32 *minLOD,
- f32 *maxLOD, f32 *LODBias, u8 *biasClampEnable, u8 *edgeLODEnable, GXAnisotropy *anisotropy);
+void GXGetTexObjAll(
+ const GXTexObj *pTexObj, void **pImage, u16 *width, u16 *height, GXTexFmt *format, GXTexWrapMode *wrapS,
+ GXTexWrapMode *wrapT, u8 *mipmap
+);
+void GXGetTexObjLODAll(
+ const GXTexObj *pTexObj, GXTexFilter *minFilter, GXTexFilter *magFilter, f32 *minLOD, f32 *maxLOD, f32 *LODBias,
+ u8 *biasClampEnable, u8 *edgeLODEnable, GXAnisotropy *anisotropy
+);
u32 GXGetTexObjTlut(GXTexObj *);
u32 GXGetTexBufferSize(u16 width, u16 height, u32 format, GXBool arg3, u8 arg4);
void GXInvalidateTexAll();
diff --git a/include/rvl/GX/GXTransform.h b/include/rvl/GX/GXTransform.h
index 6a9ed39a..7911636a 100644
--- a/include/rvl/GX/GXTransform.h
+++ b/include/rvl/GX/GXTransform.h
@@ -1,8 +1,9 @@
#ifndef RVL_SDK_GX_TRANSFORM_H
#define RVL_SDK_GX_TRANSFORM_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
#include "rvl/MTX.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/GX/GXTypes.h b/include/rvl/GX/GXTypes.h
index 745cbda6..1fcdfb91 100644
--- a/include/rvl/GX/GXTypes.h
+++ b/include/rvl/GX/GXTypes.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_GX_TYPES_H
#define RVL_SDK_GX_TYPES_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -175,7 +175,10 @@ typedef enum _GXClipMode {
GX_CLIP_DISABLE,
} GXClipMode;
-typedef enum _GXColorSrc { GX_SRC_REG, GX_SRC_VTX } GXColorSrc;
+typedef enum _GXColorSrc {
+ GX_SRC_REG,
+ GX_SRC_VTX
+} GXColorSrc;
typedef enum _GXCompare {
GX_NEVER,
@@ -225,9 +228,18 @@ typedef enum _GXCopyClamp {
GX_CLAMP_ALL,
} GXCopyClamp;
-typedef enum _GXCullMode { GX_CULL_NONE, GX_CULL_FRONT, GX_CULL_BACK, GX_CULL_ALL } GXCullMode;
+typedef enum _GXCullMode {
+ GX_CULL_NONE,
+ GX_CULL_FRONT,
+ GX_CULL_BACK,
+ GX_CULL_ALL
+} GXCullMode;
-typedef enum _GXDiffuseFn { GX_DF_NONE, GX_DF_SIGN, GX_DF_CLAMP } GXDiffuseFn;
+typedef enum _GXDiffuseFn {
+ GX_DF_NONE,
+ GX_DF_SIGN,
+ GX_DF_CLAMP
+} GXDiffuseFn;
typedef enum _GXDirtyFlag {
GX_DIRTY_SU_TEX = (1 << 0),
@@ -260,13 +272,18 @@ typedef enum _GXDirtyFlag {
GX_AMB_MAT_MASK = GX_DIRTY_AMB_COLOR0 | GX_DIRTY_AMB_COLOR1 | GX_DIRTY_MAT_COLOR0 | GX_DIRTY_MAT_COLOR1,
- GX_LIGHT_CHAN_MASK = GX_DIRTY_CHAN_COLOR0 | GX_DIRTY_CHAN_COLOR1 | GX_DIRTY_CHAN_ALPHA0 | GX_DIRTY_CHAN_ALPHA1 |
- GX_DIRTY_NUM_COLORS,
+ GX_LIGHT_CHAN_MASK =
+ GX_DIRTY_CHAN_COLOR0 | GX_DIRTY_CHAN_COLOR1 | GX_DIRTY_CHAN_ALPHA0 | GX_DIRTY_CHAN_ALPHA1 | GX_DIRTY_NUM_COLORS,
GX_TEX_GEN_MASK = 0x2FF0000,
} GXDirtyFlag;
-typedef enum _GXDistAttnFn { GX_DA_OFF, GX_DA_GENTLE, GX_DA_MEDIUM, GX_DA_STEEP } GXDistAttnFn;
+typedef enum _GXDistAttnFn {
+ GX_DA_OFF,
+ GX_DA_GENTLE,
+ GX_DA_MEDIUM,
+ GX_DA_STEEP
+} GXDistAttnFn;
typedef enum _GXFogType {
GX_FOG_NONE,
@@ -448,9 +465,20 @@ typedef enum _GXPrimitive {
GX_QUADS = 0x80,
} GXPrimitive;
-typedef enum _GXProjectionType { GX_PERSPECTIVE, GX_ORTHOGRAPHIC } GXProjectionType;
-
-typedef enum _GXSpotFn { GX_SP_OFF, GX_SP_FLAT, GX_SP_COS, GX_SP_COS2, GX_SP_SHARP, GX_SP_RING1, GX_SP_RING2 } GXSpotFn;
+typedef enum _GXProjectionType {
+ GX_PERSPECTIVE,
+ GX_ORTHOGRAPHIC
+} GXProjectionType;
+
+typedef enum _GXSpotFn {
+ GX_SP_OFF,
+ GX_SP_FLAT,
+ GX_SP_COS,
+ GX_SP_COS2,
+ GX_SP_SHARP,
+ GX_SP_RING1,
+ GX_SP_RING2
+} GXSpotFn;
typedef enum _GXTevAlphaArg {
GX_CA_APREV,
@@ -496,7 +524,12 @@ typedef enum _GXTevColorArg {
GX_CC_QUARTER = GX_CC_KONST
} GXTevColorArg;
-typedef enum _GXTevColorChan { GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA } GXTevColorChan;
+typedef enum _GXTevColorChan {
+ GX_CH_RED,
+ GX_CH_GREEN,
+ GX_CH_BLUE,
+ GX_CH_ALPHA
+} GXTevColorChan;
typedef enum _GXTevOp {
GX_TEV_ADD,
@@ -642,7 +675,13 @@ typedef enum _GXTevKColorSel {
GX_TEV_KCSEL_K3_A
} GXTevKColorSel;
-typedef enum _GXTevMode { GX_MODULATE, GX_DECAL, GX_REPLACE, GX_PASSCLR, GX_BLEND } GXTevMode;
+typedef enum _GXTevMode {
+ GX_MODULATE,
+ GX_DECAL,
+ GX_REPLACE,
+ GX_PASSCLR,
+ GX_BLEND
+} GXTevMode;
typedef enum _GXTexCoordID {
GX_TEXCOORD0,
diff --git a/include/rvl/GX/GXVert.h b/include/rvl/GX/GXVert.h
index 7cb87a19..02edfe0d 100644
--- a/include/rvl/GX/GXVert.h
+++ b/include/rvl/GX/GXVert.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_GX_VERT_H
#define RVL_SDK_GX_VERT_H
+#include "common.h"
#include "rvl/GX/GXHardware.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/IPC/ipcMain.h b/include/rvl/IPC/ipcMain.h
index 4ab9787b..5b8c6daf 100644
--- a/include/rvl/IPC/ipcMain.h
+++ b/include/rvl/IPC/ipcMain.h
@@ -1,11 +1,12 @@
#ifndef RVL_SDK_IPC_MAIN_H
#define RVL_SDK_IPC_MAIN_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
-u32 IPC_HW_REGS[] : 0xCD000000;
+// Random number for arg typing
+u32 IPC_HW_REGS[10] AT_ADDRESS(0xCD000000);
static inline u32 ACRReadReg(u32 reg) {
return *(u32 *)((char *)IPC_HW_REGS + (reg & ~0x3));
diff --git a/include/rvl/IPC/ipcProfile.h b/include/rvl/IPC/ipcProfile.h
index 3dea2177..8358dbc3 100644
--- a/include/rvl/IPC/ipcProfile.h
+++ b/include/rvl/IPC/ipcProfile.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_IPC_PROFILE_H
#define RVL_SDK_IPC_PROFILE_H
+#include "common.h"
#include "rvl/IPC/ipcclt.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/IPC/ipcclt.h b/include/rvl/IPC/ipcclt.h
index 064759c2..ad931aea 100644
--- a/include/rvl/IPC/ipcclt.h
+++ b/include/rvl/IPC/ipcclt.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_IPC_CLT_H
#define RVL_SDK_IPC_CLT_H
-#include "rvl/OS.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/OS.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -134,11 +136,13 @@ s32 IOS_WriteAsync(s32 fd, const void *buf, s32 len, IPCAsyncCallback callback,
s32 IOS_Write(s32 fd, const void *buf, s32 len);
s32 IOS_SeekAsync(s32 fd, s32 offset, IPCSeekMode mode, IPCAsyncCallback callback, void *callbackArg);
s32 IOS_Seek(s32 fd, s32 offset, IPCSeekMode mode);
-s32 IOS_IoctlAsync(s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize, IPCAsyncCallback callback,
- void *callbackArg);
+s32 IOS_IoctlAsync(
+ s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize, IPCAsyncCallback callback, void *callbackArg
+);
s32 IOS_Ioctl(s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize);
-s32 IOS_IoctlvAsync(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors, IPCAsyncCallback callback,
- void *callbackArg);
+s32 IOS_IoctlvAsync(
+ s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors, IPCAsyncCallback callback, void *callbackArg
+);
s32 IOS_Ioctlv(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors);
s32 IOS_IoctlvReboot(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors);
diff --git a/include/rvl/IPC/memory.h b/include/rvl/IPC/memory.h
index b38f63bb..a755ce2f 100644
--- a/include/rvl/IPC/memory.h
+++ b/include/rvl/IPC/memory.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_IPC_MEMORY_H
#define RVL_SDK_IPC_MEMORY_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/KPAD.h b/include/rvl/KPAD.h
index 8286be8c..8caa7990 100644
--- a/include/rvl/KPAD.h
+++ b/include/rvl/KPAD.h
@@ -4,7 +4,7 @@
extern "C" {
#endif
-#include <rvl/KPAD/KPAD.h>
+#include "rvl/KPAD/KPAD.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/KPAD/KPAD.h b/include/rvl/KPAD/KPAD.h
index 87f47832..1efeeb3e 100644
--- a/include/rvl/KPAD/KPAD.h
+++ b/include/rvl/KPAD/KPAD.h
@@ -1,7 +1,7 @@
#ifndef REVOSDK_KPAD_H
#define REVOSDK_KPAD_H
#ifdef __cplusplus
-#include <common.h>
+#include "common.h"
extern "C" {
#endif
diff --git a/include/rvl/MEM.h b/include/rvl/MEM.h
index 18321f49..7573d4cd 100644
--- a/include/rvl/MEM.h
+++ b/include/rvl/MEM.h
@@ -4,11 +4,11 @@
extern "C" {
#endif
-#include <rvl/MEM/mem_allocator.h>
-#include <rvl/MEM/mem_expHeap.h>
-#include <rvl/MEM/mem_frameHeap.h>
-#include <rvl/MEM/mem_heapCommon.h>
-#include <rvl/MEM/mem_list.h>
+#include "rvl/MEM/mem_allocator.h"
+#include "rvl/MEM/mem_expHeap.h"
+#include "rvl/MEM/mem_frameHeap.h"
+#include "rvl/MEM/mem_heapCommon.h"
+#include "rvl/MEM/mem_list.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/MEM/mem_allocator.h b/include/rvl/MEM/mem_allocator.h
index c29054c4..2b58e3bd 100644
--- a/include/rvl/MEM/mem_allocator.h
+++ b/include/rvl/MEM/mem_allocator.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_MEM_ALLOCATOR_H
#define RVL_SDK_MEM_ALLOCATOR_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MEM/mem_expHeap.h b/include/rvl/MEM/mem_expHeap.h
index be08516c..b39f9c9f 100644
--- a/include/rvl/MEM/mem_expHeap.h
+++ b/include/rvl/MEM/mem_expHeap.h
@@ -1,14 +1,12 @@
#ifndef RVL_SDK_MEM_EXP_HEAP_H
#define RVL_SDK_MEM_EXP_HEAP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
-#define MEM_EXP_HEAP_MIN_SIZE \
- (sizeof(MEMiHeapHead) + sizeof(MEMiExpHeapHead) + \
- sizeof(MEMiExpHeapMBlock) + 4)
-
+#define MEM_EXP_HEAP_MIN_SIZE (sizeof(MEMiHeapHead) + sizeof(MEMiExpHeapHead) + sizeof(MEMiExpHeapMBlock) + 4)
+
// Forward declarations
typedef struct MEMiHeapHead;
diff --git a/include/rvl/MEM/mem_frameHeap.h b/include/rvl/MEM/mem_frameHeap.h
index e9c59c59..faf9497f 100644
--- a/include/rvl/MEM/mem_frameHeap.h
+++ b/include/rvl/MEM/mem_frameHeap.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_MEM_FRAME_HEAP_H
#define RVL_SDK_MEM_FRAME_HEAP_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -14,11 +14,9 @@ typedef struct MEMiHeapHead;
typedef enum {
MEM_FRM_HEAP_FREE_TO_HEAD = (1 << 0),
MEM_FRM_HEAP_FREE_TO_TAIL = (1 << 1),
- MEM_FRM_HEAP_FREE_ALL =
- MEM_FRM_HEAP_FREE_TO_HEAD | MEM_FRM_HEAP_FREE_TO_TAIL
+ MEM_FRM_HEAP_FREE_ALL = MEM_FRM_HEAP_FREE_TO_HEAD | MEM_FRM_HEAP_FREE_TO_TAIL
} MEMiFrmFreeFlag;
-
typedef struct MEMiFrmHeapState {
u32 id; // at 0x0
u8 *head; // at 0x4
diff --git a/include/rvl/MEM/mem_heapCommon.h b/include/rvl/MEM/mem_heapCommon.h
index 55a06524..aa7f97ad 100644
--- a/include/rvl/MEM/mem_heapCommon.h
+++ b/include/rvl/MEM/mem_heapCommon.h
@@ -1,9 +1,10 @@
#ifndef RVL_SDK_MEM_HEAP_COMMON_H
#define RVL_SDK_MEM_HEAP_COMMON_H
+#include "common.h"
#include "rvl/MEM/mem_list.h"
-#include "rvl/OS.h"
-#include <MSL_C/string.h>
-#include <common.h>
+#include "rvl/OS.h" // IWYU pragma: export
+#include "string.h"
+
// #include "string.h"
#ifdef __cplusplus
@@ -75,19 +76,19 @@ static inline void LockHeap(MEMiHeapHead *heap) {
}
}
-static void UnlockHeap(MEMiHeapHead* heap) {
+static void UnlockHeap(MEMiHeapHead *heap) {
if (GetOptForHeap(heap) & MEM_HEAP_OPT_CAN_LOCK) {
OSUnlockMutex(&heap->mutex);
}
}
-static void FillAllocMemory(MEMiHeapHead* heap, void* memBlock, u32 size) {
+static void FillAllocMemory(MEMiHeapHead *heap, void *memBlock, u32 size) {
if (GetOptForHeap(heap) & MEM_HEAP_OPT_CLEAR_ALLOC) {
memset(memBlock, 0, size);
}
}
-static s32 MEMGetHeapTotalSize(MEMiHeapHead* heap) {
+static s32 MEMGetHeapTotalSize(MEMiHeapHead *heap) {
return GetOffsetFromPtr(heap, heap->end);
}
diff --git a/include/rvl/MEM/mem_list.h b/include/rvl/MEM/mem_list.h
index c54b906b..821c90dc 100644
--- a/include/rvl/MEM/mem_list.h
+++ b/include/rvl/MEM/mem_list.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_MEM_LIST_H
#define RVL_SDK_MEM_LIST_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MTX/mtx.h b/include/rvl/MTX/mtx.h
index c973a20e..6ae07eb2 100644
--- a/include/rvl/MTX/mtx.h
+++ b/include/rvl/MTX/mtx.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_MTX_MTX_H
#define RVL_SDK_MTX_MTX_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MTX/mtx44.h b/include/rvl/MTX/mtx44.h
index 8834028b..65dfacc7 100644
--- a/include/rvl/MTX/mtx44.h
+++ b/include/rvl/MTX/mtx44.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_MTX_MTX44_H
#define RVL_SDK_MTX_MTX44_H
+#include "common.h"
#include "rvl/MTX/mtx.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MTX/mtxvec.h b/include/rvl/MTX/mtxvec.h
index b744d6f4..882c5413 100644
--- a/include/rvl/MTX/mtxvec.h
+++ b/include/rvl/MTX/mtxvec.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_MTX_MTXVEC_H
#define RVL_SDK_MTX_MTXVEC_H
+#include "common.h"
#include "rvl/MTX/mtx.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MTX/quat.h b/include/rvl/MTX/quat.h
index 7a92b9cf..9ec45305 100644
--- a/include/rvl/MTX/quat.h
+++ b/include/rvl/MTX/quat.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_MTX_QUAT_H
#define RVL_SDK_MTX_QUAT_H
+#include "common.h"
#include "rvl/MTX/mtx.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/MTX/vec.h b/include/rvl/MTX/vec.h
index bed89af0..12577264 100644
--- a/include/rvl/MTX/vec.h
+++ b/include/rvl/MTX/vec.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_MTX_VEC_H
#define RVL_SDK_MTX_VEC_H
+#include "common.h"
#include "rvl/MTX/mtx.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NAND/NANDCheck.h b/include/rvl/NAND/NANDCheck.h
index 52d87ce0..8f996d05 100644
--- a/include/rvl/NAND/NANDCheck.h
+++ b/include/rvl/NAND/NANDCheck.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_NAND_CHECK_H
#define RVL_SDK_NAND_CHECK_H
+#include "common.h"
#include "rvl/NAND/nand.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NAND/NANDCore.h b/include/rvl/NAND/NANDCore.h
index dc2616a1..0417b43c 100644
--- a/include/rvl/NAND/NANDCore.h
+++ b/include/rvl/NAND/NANDCore.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_NAND_CORE_H
#define RVL_SDK_NAND_CORE_H
+#include "common.h"
#include "rvl/NAND/nand.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NAND/NANDOpenClose.h b/include/rvl/NAND/NANDOpenClose.h
index de9106d8..afabe1d2 100644
--- a/include/rvl/NAND/NANDOpenClose.h
+++ b/include/rvl/NAND/NANDOpenClose.h
@@ -1,23 +1,27 @@
#ifndef RVL_SDK_NAND_OPEN_CLOSE_H
#define RVL_SDK_NAND_OPEN_CLOSE_H
+#include "common.h"
#include "rvl/NAND/nand.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
NANDResult NANDOpen(const char *path, NANDFileInfo *info, u8 mode);
NANDResult NANDPrivateOpen(const char *path, NANDFileInfo *info, u8 mode);
-NANDResult NANDOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback,
- NANDCommandBlock *block);
-NANDResult NANDPrivateOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, NANDCommandBlock *block);
+NANDResult NANDPrivateOpenAsync(
+ const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, NANDCommandBlock *block
+);
NANDResult NANDClose(NANDFileInfo *info);
NANDResult NANDCloseAsync(NANDFileInfo *info, NANDAsyncCallback callback, NANDCommandBlock *block);
-NANDResult NANDPrivateSafeOpenAsync(const char *path, NANDFileInfo *info, u8 access, void *buffer, u32 bufferSize,
- NANDAsyncCallback callback, NANDCommandBlock *block);
+NANDResult NANDPrivateSafeOpenAsync(
+ const char *path, NANDFileInfo *info, u8 access, void *buffer, u32 bufferSize, NANDAsyncCallback callback,
+ NANDCommandBlock *block
+);
NANDResult NANDSafeCloseAsync(NANDFileInfo *info, NANDAsyncCallback callback, NANDCommandBlock *block);
#ifdef __cplusplus
diff --git a/include/rvl/NAND/nand.h b/include/rvl/NAND/nand.h
index 4aa56179..6482ecc6 100644
--- a/include/rvl/NAND/nand.h
+++ b/include/rvl/NAND/nand.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_NAND_H
#define RVL_SDK_NAND_H
+#include "common.h"
#include "rvl/FS.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -42,7 +43,12 @@ typedef enum {
NAND_SEEK_END,
} NANDSeekMode;
-typedef enum { NAND_ACCESS_NONE, NAND_ACCESS_READ, NAND_ACCESS_WRITE, NAND_ACCESS_RW } NANDAccessType;
+typedef enum {
+ NAND_ACCESS_NONE,
+ NAND_ACCESS_READ,
+ NAND_ACCESS_WRITE,
+ NAND_ACCESS_RW
+} NANDAccessType;
typedef enum {
NAND_FILE_TYPE_NONE,
@@ -134,8 +140,8 @@ typedef struct NANDBanner {
NANDResult NANDCreate(const char *path, u8 perm, u8 attr);
NANDResult NANDPrivateCreate(const char *path, u8 perm, u8 attr);
-NANDResult NANDPrivateCreateAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDPrivateCreateAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDDelete(const char *path);
NANDResult NANDPrivateDelete(const char *path);
@@ -145,16 +151,16 @@ NANDResult NANDRead(NANDFileInfo *info, void *buf, u32 len);
NANDResult NANDReadAsync(NANDFileInfo *info, void *buf, u32 len, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDWrite(NANDFileInfo *info, const void *buf, u32 len);
-NANDResult NANDWriteAsync(NANDFileInfo *info, const void *buf, u32 len, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDWriteAsync(NANDFileInfo *info, const void *buf, u32 len, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDSeek(NANDFileInfo *info, s32 offset, NANDSeekMode whence);
-NANDResult NANDSeekAsync(NANDFileInfo *info, s32 offset, NANDSeekMode whence, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDSeekAsync(NANDFileInfo *info, s32 offset, NANDSeekMode whence, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDPrivateCreateDir(const char *path, u8 perm, u8 attr);
-NANDResult NANDPrivateCreateDirAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDPrivateCreateDirAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDMove(const char *from, const char *to);
@@ -162,8 +168,8 @@ NANDResult NANDGetLength(NANDFileInfo *info, u32 *length);
NANDResult NANDGetLengthAsync(NANDFileInfo *info, u32 *lengthOut, NANDAsyncCallback callback, NANDCommandBlock *block);
NANDResult NANDGetStatus(const char *path, NANDStatus *status);
-NANDResult NANDPrivateGetStatusAsync(const char *path, NANDStatus *status, NANDAsyncCallback callback,
- NANDCommandBlock *block);
+NANDResult
+NANDPrivateGetStatusAsync(const char *path, NANDStatus *status, NANDAsyncCallback callback, NANDCommandBlock *block);
void NANDSetUserData(NANDCommandBlock *block, void *data);
void *NANDGetUserData(NANDCommandBlock *block);
diff --git a/include/rvl/NWC24/NWC24Schedule.h b/include/rvl/NWC24/NWC24Schedule.h
index 922af2ca..7e3e7fac 100644
--- a/include/rvl/NWC24/NWC24Schedule.h
+++ b/include/rvl/NWC24/NWC24Schedule.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_NWC24_SCHEDULE_H
#define RVL_SDK_NWC24_SCHEDULE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NWC24/NWC24System.h b/include/rvl/NWC24/NWC24System.h
index 75cc1c60..c8523b02 100644
--- a/include/rvl/NWC24/NWC24System.h
+++ b/include/rvl/NWC24/NWC24System.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_NWC24_SYSTEM_H
#define RVL_SDK_NWC24_SYSTEM_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NWC24/NWC24Time.h b/include/rvl/NWC24/NWC24Time.h
index e7b55119..60dcade7 100644
--- a/include/rvl/NWC24/NWC24Time.h
+++ b/include/rvl/NWC24/NWC24Time.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_NWC24_TIME_H
#define RVL_SDK_NWC24_TIME_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NdevExi2AD/DebuggerDriver.h b/include/rvl/NdevExi2AD/DebuggerDriver.h
index be907319..e9eaef34 100644
--- a/include/rvl/NdevExi2AD/DebuggerDriver.h
+++ b/include/rvl/NdevExi2AD/DebuggerDriver.h
@@ -1,8 +1,10 @@
#ifndef RVL_SDK_NDEV_EXI2_AD_DEBUGGER_DRIVER_H
#define RVL_SDK_NDEV_EXI2_AD_DEBUGGER_DRIVER_H
+#include "common.h"
#include "rvl/NdevExi2AD/exi2.h"
-#include "rvl/OS.h"
-#include <common.h>
+#include "rvl/OS.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NdevExi2AD/ODEMU.h b/include/rvl/NdevExi2AD/ODEMU.h
index 8de6ddb7..e93eabe5 100644
--- a/include/rvl/NdevExi2AD/ODEMU.h
+++ b/include/rvl/NdevExi2AD/ODEMU.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_NDEV_EXI2_AD_ODEMU_H
#define RVL_SDK_NDEV_EXI2_AD_ODEMU_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/NdevExi2AD/exi2.h b/include/rvl/NdevExi2AD/exi2.h
index d240bce3..cbc552b9 100644
--- a/include/rvl/NdevExi2AD/exi2.h
+++ b/include/rvl/NdevExi2AD/exi2.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_NDEV_EXI2_AD_EXI2_H
#define RVL_SDK_NDEV_EXI2_AD_EXI2_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS.h b/include/rvl/OS.h
index 4604c7dd..e298765c 100644
--- a/include/rvl/OS.h
+++ b/include/rvl/OS.h
@@ -1,5 +1,8 @@
#ifndef RVL_SDK_PUBLIC_OS_H
#define RVL_SDK_PUBLIC_OS_H
+
+#include "common.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -40,4 +43,5 @@ extern "C" {
#ifdef __cplusplus
}
#endif
+
#endif
diff --git a/include/rvl/OS/OS.h b/include/rvl/OS/OS.h
index 290ab6a4..32d3a78c 100644
--- a/include/rvl/OS/OS.h
+++ b/include/rvl/OS/OS.h
@@ -1,8 +1,10 @@
#ifndef RVL_SDK_OS_H
#define RVL_SDK_OS_H
+#include "common.h"
#include "rvl/OS/OSContext.h"
#include "rvl/OS/OSExec.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSAddress.h b/include/rvl/OS/OSAddress.h
index 9563cd1d..f5fc51cc 100644
--- a/include/rvl/OS/OSAddress.h
+++ b/include/rvl/OS/OSAddress.h
@@ -1,6 +1,8 @@
#ifndef RVL_SDK_OS_ADDRESS_H
#define RVL_SDK_OS_ADDRESS_H
-#include <common.h>
+
+#include "common.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -20,4 +22,5 @@ static inline void *OSCachedToPhysical(const void *ofs) {
#ifdef __cplusplus
}
#endif
+
#endif
diff --git a/include/rvl/OS/OSAlarm.h b/include/rvl/OS/OSAlarm.h
index 10f7f99b..5ec841b8 100644
--- a/include/rvl/OS/OSAlarm.h
+++ b/include/rvl/OS/OSAlarm.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_ALARM_H
#define RVL_SDK_OS_ALARM_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSAlloc.h b/include/rvl/OS/OSAlloc.h
index a7baddc5..6e2ddb5c 100644
--- a/include/rvl/OS/OSAlloc.h
+++ b/include/rvl/OS/OSAlloc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_ALLOC_H
#define RVL_SDK_OS_ALLOC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSArena.h b/include/rvl/OS/OSArena.h
index 3900c202..77adb6ba 100644
--- a/include/rvl/OS/OSArena.h
+++ b/include/rvl/OS/OSArena.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_ARENA_H
#define RVL_SDK_OS_ARENA_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSAudioSystem.h b/include/rvl/OS/OSAudioSystem.h
index dbf7a60d..97ff605b 100644
--- a/include/rvl/OS/OSAudioSystem.h
+++ b/include/rvl/OS/OSAudioSystem.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_AUDIOSYSTEM_H
#define RVL_SDK_OS_AUDIOSYSTEM_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSCache.h b/include/rvl/OS/OSCache.h
index 1eecfb1f..e4d48bb5 100644
--- a/include/rvl/OS/OSCache.h
+++ b/include/rvl/OS/OSCache.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_CACHE_H
#define RVL_SDK_OS_CACHE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSContext.h b/include/rvl/OS/OSContext.h
index 136d2e00..bc87b69c 100644
--- a/include/rvl/OS/OSContext.h
+++ b/include/rvl/OS/OSContext.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_CONTEXT_H
#define RVL_SDK_OS_CONTEXT_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSCrc.h b/include/rvl/OS/OSCrc.h
index 5a24ef3e..7c5e94a1 100644
--- a/include/rvl/OS/OSCrc.h
+++ b/include/rvl/OS/OSCrc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_CRC_H
#define RVL_SDK_OS_CRC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSError.h b/include/rvl/OS/OSError.h
index 76b5463f..f26db27e 100644
--- a/include/rvl/OS/OSError.h
+++ b/include/rvl/OS/OSError.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_OS_ERROR_H
#define RVL_SDK_OS_ERROR_H
-#include <common.h>
-#include <Runtime.PPCEABI.H/__va_arg.h>
+#include "__va_arg.h"
+#include "common.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -10,8 +11,8 @@ extern "C" {
typedef struct OSContext;
#define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__)
-#define OSAssert(exp, ...) \
- if (!(exp)) \
+#define OSAssert(exp, ...) \
+ if (!(exp)) \
OSPanic(__FILE__, __LINE__, __VA_ARGS__)
typedef enum {
@@ -41,9 +42,9 @@ typedef void (*OSErrorHandler)(u16 error, OSContext *ctx, u32 dsisr, u32 dar);
extern OSErrorHandler __OSErrorTable[OS_ERR_MAX];
extern u32 __OSFpscrEnableBits;
-DECL_WEAK void OSReport(const char *msg, ...);
-DECL_WEAK void OSVReport(const char *msg, va_list args);
-DECL_WEAK void OSPanic(const char *file, int line, const char *msg, ...);
+void OSReport(const char *msg, ...);
+void OSVReport(const char *msg, va_list args);
+void OSPanic(const char *file, int line, const char *msg, ...);
OSErrorHandler OSSetErrorHandler(u16 error, OSErrorHandler handler);
void __OSUnhandledException(u8 error, OSContext *ctx, u32 dsisr, u32 dar);
diff --git a/include/rvl/OS/OSExec.h b/include/rvl/OS/OSExec.h
index fc2c1213..37b72f80 100644
--- a/include/rvl/OS/OSExec.h
+++ b/include/rvl/OS/OSExec.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_EXEC_H
#define RVL_SDK_OS_EXEC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSFastCast.h b/include/rvl/OS/OSFastCast.h
index 8aa2e04a..3f7aace6 100644
--- a/include/rvl/OS/OSFastCast.h
+++ b/include/rvl/OS/OSFastCast.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_FAST_CAST_H
#define RVL_SDK_OS_FAST_CAST_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSFatal.h b/include/rvl/OS/OSFatal.h
index 2c145072..2f8694c9 100644
--- a/include/rvl/OS/OSFatal.h
+++ b/include/rvl/OS/OSFatal.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_OS_FATAL_H
#define RVL_SDK_OS_FATAL_H
+#include "common.h"
#include "rvl/GX/GXTypes.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSFont.h b/include/rvl/OS/OSFont.h
index 73ca9a03..80051307 100644
--- a/include/rvl/OS/OSFont.h
+++ b/include/rvl/OS/OSFont.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_FONT_H
#define RVL_SDK_OS_FONT_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSHardware.h b/include/rvl/OS/OSHardware.h
index 9db8881e..898eae50 100644
--- a/include/rvl/OS/OSHardware.h
+++ b/include/rvl/OS/OSHardware.h
@@ -1,14 +1,17 @@
#ifndef RVL_SDK_OS_HARDWARE_H
#define RVL_SDK_OS_HARDWARE_H
-#include "rvl/OS/OSAddress.h"
+
+// #include "rvl/OS/OSAddress.h"
+#include "common.h"
#include "rvl/OS/OSThread.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct OSContext;
-typedef struct OSExecParams;
+typedef struct OSContext OSContext;
+typedef struct OSExecParams OSExecParams;
/**
* For more details, see:
@@ -18,29 +21,29 @@ typedef struct OSExecParams;
*/
// Derive offsets for use with OSAddress functions
-#define __DEF_ADDR_OFFSETS(name, addr) \
- static const u32 OS_PHYS_##name = (addr)-0x80000000; \
- static const u32 OS_CACHED_##name = (addr); \
+#define __DEF_ADDR_OFFSETS(name, addr) \
+ static const u32 OS_PHYS_##name = (addr)-0x80000000; \
+ static const u32 OS_CACHED_##name = (addr); \
static const u32 OS_UNCACHED_##name = (addr) + (0xC0000000 - 0x80000000);
// Define a global variable in *CACHED* MEM1.
// Can be accessed directly or with OSAddress functions.
-#define OS_DEF_GLOBAL_VAR(type, name, addr) \
- /* Memory-mapped value for direct access */ \
- type OS_##name : (addr); \
+#define OS_DEF_GLOBAL_VAR(type, name, addr) \
+ /* Memory-mapped value for direct access */ \
+ type OS_##name AT_ADDRESS(addr); \
__DEF_ADDR_OFFSETS(name, addr)
// Define a global array in *CACHED* MEM1.
// Can be accessed directly or with OSAddress functions.
-#define OS_DEF_GLOBAL_ARR(type, name, arr, addr) \
- /* Memory-mapped value for direct access */ \
- type OS_##name arr : (addr); \
+#define OS_DEF_GLOBAL_ARR(type, name, arr, addr) \
+ /* Memory-mapped value for direct access */ \
+ type OS_##name arr AT_ADDRESS(addr); \
__DEF_ADDR_OFFSETS(name, addr)
// Define an global variable in the hardware-register range.
-#define OS_DEF_HW_REG(type, name, addr) \
- /* Memory-mapped value for direct access */ \
- type OS_##name : (addr);
+#define OS_DEF_HW_REG(type, name, addr) \
+ /* Memory-mapped value for direct access */ \
+ type OS_##name AT_ADDRESS(addr);
typedef struct OSBootInfo {
u32 appName; // at 0x0
@@ -114,7 +117,7 @@ OS_DEF_GLOBAL_VAR(u32, CPU_CLOCK_SPEED, 0x800000FC);
// clang-format off
OS_DEF_GLOBAL_ARR(void*, EXCEPTION_TABLE, [15], 0x80003000);
OS_DEF_GLOBAL_VAR(void*, INTR_HANDLER_TABLE, 0x80003040);
-OS_DEF_GLOBAL_ARR(volatile s32, EXI_800030C0, [], 0x800030C0);
+OS_DEF_GLOBAL_ARR(volatile s32, EXI_800030C0, [2], 0x800030C0);
OS_DEF_GLOBAL_VAR(void*, FIRST_REL, 0x800030C8);
OS_DEF_GLOBAL_VAR(void*, LAST_REL, 0x800030CC);
OS_DEF_GLOBAL_VAR(void*, REL_NAME_TABLE, 0x800030D0);
@@ -154,9 +157,9 @@ OS_DEF_GLOBAL_ARR(u8, SC_PRDINFO, [0x100], 0x80003800);
// clang-format on
/**
- * PI hardware globals
+ * PI hardware globals - Number in arr is just to satisfy typing
*/
-volatile u32 PI_HW_REGS[] : 0xCC003000;
+volatile u32 PI_HW_REGS[10] AT_ADDRESS(0xCC003000);
typedef enum {
PI_INTSR, //!< 0xCC003000
PI_INTMR, //!< 0xCC003004
@@ -207,10 +210,10 @@ typedef enum {
#define PI_INTMR_ACR (1 << 14)
/**
- * MI Hardware Registers
+ * MI Hardware Registers - Arr size just to satisfy typing
* https://www.gc-forever.com/yagcd/chap5.html#sec5.5
*/
-volatile u16 MI_HW_REGS[] : 0xCC004000;
+volatile u16 MI_HW_REGS[22] AT_ADDRESS(0xCC004000);
typedef enum {
MI_PAGE_MEM0_H, //!< 0xCC004000
MI_PAGE_MEM0_L, //!< 0xCC004002
diff --git a/include/rvl/OS/OSInterrupt.h b/include/rvl/OS/OSInterrupt.h
index 875200d6..7db68c59 100644
--- a/include/rvl/OS/OSInterrupt.h
+++ b/include/rvl/OS/OSInterrupt.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_INTERRUPT_H
#define RVL_SDK_OS_INTERRUPT_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSIpc.h b/include/rvl/OS/OSIpc.h
index f681ac39..ce4cb59c 100644
--- a/include/rvl/OS/OSIpc.h
+++ b/include/rvl/OS/OSIpc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_IPC_H
#define RVL_SDK_OS_IPC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSLink.h b/include/rvl/OS/OSLink.h
index 0bc13dc3..ddb04350 100644
--- a/include/rvl/OS/OSLink.h
+++ b/include/rvl/OS/OSLink.h
@@ -1,7 +1,7 @@
#ifndef OSLINK_H
#define OSLINK_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
@@ -22,16 +22,16 @@ typedef struct OSRel OSRel;
// OSModuleQueue __OSModuleList : 0x800030C8;
// void* __OSStringTable : 0x800030D0;
extern OSModuleQueue __OSModuleList;
-extern void * __OSStringTable;
+extern void *__OSStringTable;
struct OSModuleQueue {
- OSModuleInfo* head;
- OSModuleInfo* tail;
+ OSModuleInfo *head;
+ OSModuleInfo *tail;
};
struct OSModuleLink {
- OSModuleInfo* next;
- OSModuleInfo* prev;
+ OSModuleInfo *next;
+ OSModuleInfo *prev;
};
struct OSSectionInfo {
@@ -40,13 +40,13 @@ struct OSSectionInfo {
};
struct OSModuleInfo {
- OSModuleID id; // unique identifier for the module
- OSModuleLink link; // doubly linked list of modules
- u32 numSections; // # of sections
- u32 sectionInfoOffset; // offset to section info table
- u32 nameOffset; // offset to module name
- u32 nameSize; // size of module name
- u32 version; // version number
+ OSModuleID id; // unique identifier for the module
+ OSModuleLink link; // doubly linked list of modules
+ u32 numSections; // # of sections
+ u32 sectionInfoOffset; // offset to section info table
+ u32 nameOffset; // offset to module name
+ u32 nameSize; // size of module name
+ u32 version; // version number
};
struct OSModuleHeader {
@@ -54,22 +54,22 @@ struct OSModuleHeader {
OSModuleInfo info;
// OS_MODULE_VERSION == 1
- u32 bssSize; // total size of bss sections in bytes
+ u32 bssSize; // total size of bss sections in bytes
u32 relOffset;
u32 impOffset;
- u32 impSize; // size in bytes
- u8 prologSection; // section # for prolog function
- u8 epilogSection; // section # for epilog function
- u8 unresolvedSection; // section # for unresolved function
- u8 bssSection; // section # for bss section (set at run-time)
- u32 prolog; // prolog function offset
- u32 epilog; // epilog function offset
- u32 unresolved; // unresolved function offset
+ u32 impSize; // size in bytes
+ u8 prologSection; // section # for prolog function
+ u8 epilogSection; // section # for epilog function
+ u8 unresolvedSection; // section # for unresolved function
+ u8 bssSection; // section # for bss section (set at run-time)
+ u32 prolog; // prolog function offset
+ u32 epilog; // epilog function offset
+ u32 unresolved; // unresolved function offset
// OS_MODULE_VERSION == 2
#if (2 <= OS_MODULE_VERSION)
- u32 align; // module alignment constraint
- u32 bssAlign; // bss alignment constraint
+ u32 align; // module alignment constraint
+ u32 bssAlign; // bss alignment constraint
#endif
// OS_MODULE_VERSION == 3
@@ -78,34 +78,34 @@ struct OSModuleHeader {
#endif
};
-#define OSGetSectionInfo(module) ((OSSectionInfo*)(((OSModuleInfo*)(module))->sectionInfoOffset))
+#define OSGetSectionInfo(module) ((OSSectionInfo *)(((OSModuleInfo *)(module))->sectionInfoOffset))
#define OS_SECTIONINFO_EXEC 0x1
#define OS_SECTIONINFO_OFFSET(offset) ((offset) & ~0x1)
struct OSImportInfo {
- OSModuleID id; // external module id
- u32 offset; // offset to OSRel instructions
+ OSModuleID id; // external module id
+ u32 offset; // offset to OSRel instructions
};
struct OSRel {
- u16 offset; // byte offset from the previous entry
+ u16 offset; // byte offset from the previous entry
u8 type;
u8 section;
u32 addend;
};
-#define R_DOLPHIN_NOP 201 // C9h current offset += OSRel.offset
-#define R_DOLPHIN_SECTION 202 // CAh current section = OSRel.section
-#define R_DOLPHIN_END 203 // CBh
-#define R_DOLPHIN_MRKREF 204 // CCh
+#define R_DOLPHIN_NOP 201 // C9h current offset += OSRel.offset
+#define R_DOLPHIN_SECTION 202 // CAh current section = OSRel.section
+#define R_DOLPHIN_END 203 // CBh
+#define R_DOLPHIN_MRKREF 204 // CCh
-BOOL OSLink(OSModuleInfo* newModule, void* bss);
-BOOL OSLinkFixed(OSModuleInfo* newModule, void* bss);
-BOOL OSUnlink(OSModuleInfo* module);
-void OSSetStringTable(void* string_table);
+BOOL OSLink(OSModuleInfo *newModule, void *bss);
+BOOL OSLinkFixed(OSModuleInfo *newModule, void *bss);
+BOOL OSUnlink(OSModuleInfo *module);
+void OSSetStringTable(void *string_table);
void __OSModuleInit(void);
-OSModuleInfo* OSSearchModule(void* ptr, u32* section, u32* offset);
+OSModuleInfo *OSSearchModule(void *ptr, u32 *section, u32 *offset);
#ifdef __cplusplus
};
diff --git a/include/rvl/OS/OSMemory.h b/include/rvl/OS/OSMemory.h
index ae25cae4..5a186e1b 100644
--- a/include/rvl/OS/OSMemory.h
+++ b/include/rvl/OS/OSMemory.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_MEMORY_H
#define RVL_SDK_OS_MEMORY_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSMessage.h b/include/rvl/OS/OSMessage.h
index 38f7358b..7761bddc 100644
--- a/include/rvl/OS/OSMessage.h
+++ b/include/rvl/OS/OSMessage.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_OS_MESSAGE_H
#define RVL_SDK_OS_MESSAGE_H
+#include "common.h"
#include "rvl/OS/OSThread.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -9,7 +11,9 @@ extern "C" {
// General-purpose typedef
typedef void *OSMessage;
-typedef enum { OS_MSG_PERSISTENT = (1 << 0) } OSMessageFlags;
+typedef enum {
+ OS_MSG_PERSISTENT = (1 << 0)
+} OSMessageFlags;
typedef struct OSMessageQueue {
OSThreadQueue sendQueue; // at 0x0
diff --git a/include/rvl/OS/OSMutex.h b/include/rvl/OS/OSMutex.h
index f83dee73..94d21f02 100644
--- a/include/rvl/OS/OSMutex.h
+++ b/include/rvl/OS/OSMutex.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_OS_MUTEX_H
#define RVL_SDK_OS_MUTEX_H
+#include "common.h"
#include "rvl/OS/OSThread.h"
-#include <common.h>
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSNet.h b/include/rvl/OS/OSNet.h
index 2025165f..83342095 100644
--- a/include/rvl/OS/OSNet.h
+++ b/include/rvl/OS/OSNet.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_NET_H
#define RVL_SDK_OS_NET_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSPlayRecord.h b/include/rvl/OS/OSPlayRecord.h
index d5a65e07..9c9e2a4d 100644
--- a/include/rvl/OS/OSPlayRecord.h
+++ b/include/rvl/OS/OSPlayRecord.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_PLAY_RECORD_H
#define RVL_SDK_OS_PLAY_RECORD_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSReset.h b/include/rvl/OS/OSReset.h
index d6e065c1..06d5a344 100644
--- a/include/rvl/OS/OSReset.h
+++ b/include/rvl/OS/OSReset.h
@@ -1,13 +1,16 @@
#ifndef RVL_SDK_OS_RESET_H
#define RVL_SDK_OS_RESET_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef BOOL (*OSShutdownFunction)(u32 pass, u32 event);
-typedef enum { OS_SD_PASS_FIRST, OS_SD_PASS_SECOND } OSShutdownPass;
+typedef enum {
+ OS_SD_PASS_FIRST,
+ OS_SD_PASS_SECOND
+} OSShutdownPass;
typedef enum {
OS_SD_EVENT_SHUTDOWN = 2,
diff --git a/include/rvl/OS/OSRtc.h b/include/rvl/OS/OSRtc.h
index 0d345ca3..c535e300 100644
--- a/include/rvl/OS/OSRtc.h
+++ b/include/rvl/OS/OSRtc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_RTC_H
#define RVL_SDK_OS_RTC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSStateFlags.h b/include/rvl/OS/OSStateFlags.h
index c6a457ce..80abc345 100644
--- a/include/rvl/OS/OSStateFlags.h
+++ b/include/rvl/OS/OSStateFlags.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_STATE_FLAGS_H
#define RVL_SDK_OS_STATE_FLAGS_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSStateTM.h b/include/rvl/OS/OSStateTM.h
index c22aec74..ca21d9b6 100644
--- a/include/rvl/OS/OSStateTM.h
+++ b/include/rvl/OS/OSStateTM.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_STATETM_H
#define RVL_SDK_OS_STATETM_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSSync.h b/include/rvl/OS/OSSync.h
index 5edc5746..ae0796ce 100644
--- a/include/rvl/OS/OSSync.h
+++ b/include/rvl/OS/OSSync.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_SYNC_H
#define RVL_SDK_OS_SYNC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSThread.h b/include/rvl/OS/OSThread.h
index dfe07d5f..148b099d 100644
--- a/include/rvl/OS/OSThread.h
+++ b/include/rvl/OS/OSThread.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_OS_THREAD_H
#define RVL_SDK_OS_THREAD_H
+#include "common.h"
#include "rvl/OS/OSContext.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -19,7 +20,9 @@ typedef enum {
OS_THREAD_STATE_MORIBUND = 8
} OSThreadState;
-typedef enum { OS_THREAD_DETACHED = (1 << 0) } OSThreadFlag;
+typedef enum {
+ OS_THREAD_DETACHED = (1 << 0)
+} OSThreadFlag;
typedef struct OSThreadQueue {
struct OSThread *head; // at 0x0
@@ -47,8 +50,8 @@ typedef struct OSThread {
OSMutexQueue mutexQueue; // at 0x2F4
struct OSThread *nextActive; // at 0x2FC
struct OSThread *prevActive; // at 0x300
- void *stackBegin; // at 0x304
- void *stackEnd; // at 0x308
+ void *stackBegin; // at 0x304
+ void *stackEnd; // at 0x308
s32 error; // at 0x30C
void *specific[2]; // at 0x310
} OSThread;
@@ -69,8 +72,9 @@ s32 __OSGetEffectivePriority(OSThread *thread);
void __OSPromoteThread(OSThread *thread, s32 prio);
void __OSReschedule(void);
void OSYieldThread(void);
-BOOL OSCreateThread(OSThread *thread, OSThreadFunc func, void *funcArg, void *stackBegin, u32 stackSize, s32 prio,
- u16 flags);
+BOOL OSCreateThread(
+ OSThread *thread, OSThreadFunc func, void *funcArg, void *stackBegin, u32 stackSize, s32 prio, u16 flags
+);
void OSExitThread(OSThread *thread);
void OSCancelThread(OSThread *thread);
BOOL OSJoinThread(OSThread *thread, void *val);
diff --git a/include/rvl/OS/OSTime.h b/include/rvl/OS/OSTime.h
index 1d1310d2..761760b9 100644
--- a/include/rvl/OS/OSTime.h
+++ b/include/rvl/OS/OSTime.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_OS_TIME_H
#define RVL_SDK_OS_TIME_H
-#include "rvl/OS/OSHardware.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/OS/OSHardware.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/OSUtf.h b/include/rvl/OS/OSUtf.h
index 5e52925e..aa863340 100644
--- a/include/rvl/OS/OSUtf.h
+++ b/include/rvl/OS/OSUtf.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_UTF_H
#define RVL_SDK_OS_UTF_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/OS/__ppc_eabi_init.h b/include/rvl/OS/__ppc_eabi_init.h
index b0a40e72..087ecfd9 100644
--- a/include/rvl/OS/__ppc_eabi_init.h
+++ b/include/rvl/OS/__ppc_eabi_init.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_OS_PPC_EABI_INIT_H
#define RVL_SDK_OS_PPC_EABI_INIT_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -20,14 +20,14 @@ void _ExitProcess(void);
*/
// Declare linker symbols for a section in the ROM
-#define DECL_ROM_SECTION(x) \
- extern u8 _f##x[]; \
- extern u8 _f##x##_rom[]; \
+#define DECL_ROM_SECTION(x) \
+ extern u8 _f##x[]; \
+ extern u8 _f##x##_rom[]; \
extern u8 _e##x[];
// Declare linker symbols for a BSS section
-#define DECL_BSS_SECTION(x) \
- extern u8 _f##x[]; \
+#define DECL_BSS_SECTION(x) \
+ extern u8 _f##x[]; \
extern u8 _e##x[];
// Debugger stack
diff --git a/include/rvl/PAD/Pad.h b/include/rvl/PAD/Pad.h
index 9766355a..45d85714 100644
--- a/include/rvl/PAD/Pad.h
+++ b/include/rvl/PAD/Pad.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_PAD_H
#define RVL_SDK_PAD_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/SC/scapi.h b/include/rvl/SC/scapi.h
index 52708b4c..b9a120a7 100644
--- a/include/rvl/SC/scapi.h
+++ b/include/rvl/SC/scapi.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_SC_SCAPI_H
#define RVL_SDK_SC_SCAPI_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -10,9 +10,15 @@ extern "C" {
* https://wiibrew.org/wiki//shared2/sys/SYSCONF
*/
-typedef enum { SC_ASPECT_STD, SC_ASPECT_WIDE } SCAspectRatio;
+typedef enum {
+ SC_ASPECT_STD,
+ SC_ASPECT_WIDE
+} SCAspectRatio;
-typedef enum { SC_EURGB_50_HZ, SC_EURGB_60_HZ } SCEuRgb60Mode;
+typedef enum {
+ SC_EURGB_50_HZ,
+ SC_EURGB_60_HZ
+} SCEuRgb60Mode;
typedef enum {
SC_LANG_JP,
@@ -27,9 +33,16 @@ typedef enum {
SC_LANG_KR,
} SCLanguage;
-typedef enum { SC_SND_MONO, SC_SND_STEREO, SC_SND_SURROUND } SCSoundMode;
+typedef enum {
+ SC_SND_MONO,
+ SC_SND_STEREO,
+ SC_SND_SURROUND
+} SCSoundMode;
-typedef enum { SC_SENSOR_BAR_BOTTOM, SC_SENSOR_BAR_TOP } SCSensorBarPos;
+typedef enum {
+ SC_SENSOR_BAR_BOTTOM,
+ SC_SENSOR_BAR_TOP
+} SCSensorBarPos;
typedef struct SCIdleMode {
u8 wc24; // at 0x0
diff --git a/include/rvl/SC/scapi_prdinfo.h b/include/rvl/SC/scapi_prdinfo.h
index 21f66aaf..66ac407f 100644
--- a/include/rvl/SC/scapi_prdinfo.h
+++ b/include/rvl/SC/scapi_prdinfo.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_SC_SCAPI_PRDINFO_H
#define RVL_SDK_SC_SCAPI_PRDINFO_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/SC/scsystem.h b/include/rvl/SC/scsystem.h
index d01ace55..26fcea2b 100644
--- a/include/rvl/SC/scsystem.h
+++ b/include/rvl/SC/scsystem.h
@@ -1,9 +1,11 @@
#ifndef RVL_SDK_SC_SCSYSTEM_H
#define RVL_SDK_SC_SCSYSTEM_H
-#include "rvl/FS.h"
-#include "rvl/NAND.h"
-#include "rvl/OS.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/FS.h" // IWYU pragma: export
+#include "rvl/NAND.h" // IWYU pragma: export
+#include "rvl/OS.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/SI/SIBios.h b/include/rvl/SI/SIBios.h
index eae3e606..805ab88a 100644
--- a/include/rvl/SI/SIBios.h
+++ b/include/rvl/SI/SIBios.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_SI_SIBIOS_H
#define RVL_SDK_SI_SIBIOS_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/TPL/TPL.h b/include/rvl/TPL/TPL.h
index acf56ab1..7669f4cd 100644
--- a/include/rvl/TPL/TPL.h
+++ b/include/rvl/TPL/TPL.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_TPL_H
#define RVL_SDK_TPL_H
-#include "rvl/GX.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/GX.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/USB/usb.h b/include/rvl/USB/usb.h
index 018dfaff..2a38193f 100644
--- a/include/rvl/USB/usb.h
+++ b/include/rvl/USB/usb.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_USB_H
#define RVL_SDK_USB_H
-#include "rvl/IPC.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/IPC.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -12,13 +14,15 @@ IPCResult IUSB_OpenLib(void);
IPCResult IUSB_CloseLib(void);
IPCResult IUSB_OpenDeviceIds(const char *interface, u16 vid, u16 pid, IPCResult *resultOut);
IPCResult IUSB_CloseDeviceAsync(s32 fd, USBCallback callback, void *callbackArg);
-IPCResult IUSB_ReadIntrMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback,
- void *callbackArg);
+IPCResult
+IUSB_ReadIntrMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback, void *callbackArg);
IPCResult IUSB_ReadBlkMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback, void *callbackArg);
-IPCResult IUSB_WriteBlkMsgAsync(s32 fd, u32 endpoint, u32 length, const void *buffer, USBCallback callback,
- void *callbackArg);
-IPCResult IUSB_WriteCtrlMsgAsync(s32 fd, u8 requestType, u8 request, u16 value, u16 index, u16 length, void *buffer,
- USBCallback callback, void *callbackArg);
+IPCResult
+IUSB_WriteBlkMsgAsync(s32 fd, u32 endpoint, u32 length, const void *buffer, USBCallback callback, void *callbackArg);
+IPCResult IUSB_WriteCtrlMsgAsync(
+ s32 fd, u8 requestType, u8 request, u16 value, u16 index, u16 length, void *buffer, USBCallback callback,
+ void *callbackArg
+);
#ifdef __cplusplus
}
diff --git a/include/rvl/VF/pf.h b/include/rvl/VF/pf.h
index 8041c2e2..8078d61a 100644
--- a/include/rvl/VF/pf.h
+++ b/include/rvl/VF/pf.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VF_PF_H
#define RVL_SDK_VF_PF_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_clib.h b/include/rvl/VF/pf_clib.h
index d6c6bd5b..d755a9d6 100644
--- a/include/rvl/VF/pf_clib.h
+++ b/include/rvl/VF/pf_clib.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VF_PF_CLIB_H
#define RVL_SDK_VF_PF_CLIB_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_code.h b/include/rvl/VF/pf_code.h
index 4e6720ce..c7eb82a1 100644
--- a/include/rvl/VF/pf_code.h
+++ b/include/rvl/VF/pf_code.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VF_PF_CODE_H
#define RVL_SDK_VF_PF_CODE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_service.h b/include/rvl/VF/pf_service.h
index f158f391..5bd4a1d8 100644
--- a/include/rvl/VF/pf_service.h
+++ b/include/rvl/VF/pf_service.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VF_PF_SERVICE_H
#define RVL_SDK_VF_PF_SERVICE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_str.h b/include/rvl/VF/pf_str.h
index bde314e1..dad5aafc 100644
--- a/include/rvl/VF/pf_str.h
+++ b/include/rvl/VF/pf_str.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_VF_PF_STRING_H
#define RVL_SDK_VF_PF_STRING_H
-#include "rvl/VF/pf.h"
-#include <common.h>
+
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_volume.h b/include/rvl/VF/pf_volume.h
index f737f38d..a043a982 100644
--- a/include/rvl/VF/pf_volume.h
+++ b/include/rvl/VF/pf_volume.h
@@ -1,7 +1,8 @@
#ifndef RVL_SDK_VF_PF_VOLUME_H
#define RVL_SDK_VF_PF_VOLUME_H
+#include "common.h"
#include "rvl/VF/pf_code.h"
-#include <common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VF/pf_w_clib.h b/include/rvl/VF/pf_w_clib.h
index 4c86447d..25bc7755 100644
--- a/include/rvl/VF/pf_w_clib.h
+++ b/include/rvl/VF/pf_w_clib.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VF_PF_W_CLIB_H
#define RVL_SDK_VF_PF_W_CLIB_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VI/vi.h b/include/rvl/VI/vi.h
index 7a892813..5a6d943b 100644
--- a/include/rvl/VI/vi.h
+++ b/include/rvl/VI/vi.h
@@ -1,7 +1,9 @@
#ifndef RVL_SDK_VI_H
#define RVL_SDK_VI_H
-#include "rvl/GX.h"
-#include <common.h>
+#include "common.h"
+#include "rvl/GX.h" // IWYU pragma: export
+
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VI/vi3in1.h b/include/rvl/VI/vi3in1.h
index db46897e..e0de6556 100644
--- a/include/rvl/VI/vi3in1.h
+++ b/include/rvl/VI/vi3in1.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_VI_VI3IN1_H
#define RVL_SDK_VI_VI3IN1_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/rvl/VI/vihardware.h b/include/rvl/VI/vihardware.h
index 6c0c6331..47370089 100644
--- a/include/rvl/VI/vihardware.h
+++ b/include/rvl/VI/vihardware.h
@@ -1,15 +1,15 @@
#ifndef RVL_SDK_VI_HARDWARE_H
#define RVL_SDK_VI_HARDWARE_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
- * VI Hardware Registers
+ * VI Hardware Registers - arr size for typing
* https://www.gc-forever.com/yagcd/chap5.html#sec5.3
*/
-volatile u16 VI_HW_REGS[] : 0xCC002000;
+volatile u16 VI_HW_REGS[63] AT_ADDRESS(0xCC002000);
/**
* Hardware register indexes
diff --git a/include/rvl/WENC.h b/include/rvl/WENC.h
index aca777d1..268070da 100644
--- a/include/rvl/WENC.h
+++ b/include/rvl/WENC.h
@@ -4,7 +4,7 @@
extern "C" {
#endif
-#include <rvl/WENC/wenc.h>
+#include "rvl/WENC/wenc.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/WENC/wenc.h b/include/rvl/WENC/wenc.h
index 3e247ce8..e2ec47dd 100644
--- a/include/rvl/WENC/wenc.h
+++ b/include/rvl/WENC/wenc.h
@@ -1,6 +1,6 @@
#ifndef RVL_SDK_WENC_H
#define RVL_SDK_WENC_H
-#include <common.h>
+#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -19,8 +19,7 @@ typedef struct WENCInfo {
u8 padding[8]; // at 0x18
} WENCInfo;
-s32 WENCGetEncodeData(WENCInfo* info, u32 flag, const s16* pcmData, s32 samples,
- u8* adpcmData);
+s32 WENCGetEncodeData(WENCInfo *info, u32 flag, const s16 *pcmData, s32 samples, u8 *adpcmData);
#ifdef __cplusplus
}
diff --git a/include/rvl/WPAD.h b/include/rvl/WPAD.h
index 8f63eb9e..8e4556aa 100644
--- a/include/rvl/WPAD.h
+++ b/include/rvl/WPAD.h
@@ -4,8 +4,8 @@
extern "C" {
#endif
-#include <rvl/WPAD/WPAD.h>
-#include <rvl/WPAD/WPADMem.h>
+#include "rvl/WPAD/WPAD.h"
+#include "rvl/WPAD/WPADMem.h"
#ifdef __cplusplus
}
diff --git a/include/rvl/WPAD/WPAD.h b/include/rvl/WPAD/WPAD.h
index 5154aadc..683b0e2a 100644
--- a/include/rvl/WPAD/WPAD.h
+++ b/include/rvl/WPAD/WPAD.h
@@ -4,9 +4,10 @@
// From
// https://github.com/muff1n1634/wpad_11dec2009/blob/3c3aa5416d15ccc5867517d9ed4aaf6d25a70e9c/include/revolution/WPAD/WPAD.h
-#include <common.h>
-#include <rvl/SC/scsystem.h>
-#include <rvl/WPAD/WUD.h>
+#include "common.h"
+#include "rvl/SC/scsystem.h"
+#include "rvl/WPAD/WUD.h"
+
/*******************************************************************************
* macros
diff --git a/include/rvl/WPAD/WPADMem.h b/include/rvl/WPAD/WPADMem.h
index d5d2c259..e2c3c388 100644
--- a/include/rvl/WPAD/WPADMem.h
+++ b/include/rvl/WPAD/WPADMem.h
@@ -1,9 +1,9 @@
#ifndef RVL_SDK_WPAD_MEMORY_H
#define RVL_SDK_WPAD_MEMORY_H
-#include <common.h>
-#include <rvl/OS/OSTime.h>
-#include <rvl/WPAD/WPAD.h>
+#include "common.h"
+#include "rvl/OS/OSTime.h"
+#include "rvl/WPAD/WPAD.h"
/*******************************************************************************
diff --git a/include/rvl/WPAD/WUD.h b/include/rvl/WPAD/WUD.h
index a363bd40..f719d04b 100644
--- a/include/rvl/WPAD/WUD.h
+++ b/include/rvl/WPAD/WUD.h
@@ -1,7 +1,7 @@
#ifndef RVL_SDK_WPAD_WUD_H
#define RVL_SDK_WPAD_WUD_H
-#include <common.h>
+#include "common.h"
// TODO: Fix when possible
#include "context_bte.h"