summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2025-04-05 19:16:52 -0400
committerGitHub <noreply@github.com>2025-04-05 19:16:52 -0400
commit5133db15a3d3f554e7936a600ff358a6aa38540a (patch)
treeb94d427b1ae5dff84d73812ad02c984b763564d8 /include
parent1beeff96583e30f6a61960446a97b3583ff2ac73 (diff)
Remove functions.h (#2501)
* split most of functions.h * osdriverominit * forgot include * fix * remove functions.h * temporary fix for fix_bss * fix bss * revert fix_bss.py change
Diffstat (limited to 'include')
-rw-r--r--include/flag_set.h8
-rw-r--r--include/functions.h84
-rw-r--r--include/global.h1
-rw-r--r--include/idle.h6
-rw-r--r--include/inflate.h10
-rw-r--r--include/is_debug.h18
-rw-r--r--include/libu64/rcp_utils.h6
-rw-r--r--include/libu64/runtime.h8
-rw-r--r--include/memory_utils.h9
-rw-r--r--include/mio0.h8
-rw-r--r--include/sys_cfb.h10
-rw-r--r--include/transition_circle.h55
-rw-r--r--include/transition_fade.h24
-rw-r--r--include/transition_tile.h30
-rw-r--r--include/transition_triforce.h27
-rw-r--r--include/transition_wipe.h30
-rw-r--r--include/ultra64.h1
-rw-r--r--include/yaz0.h10
-rw-r--r--include/z64play.h1
-rw-r--r--include/z64transition.h4
-rw-r--r--include/z64transition_instances.h98
21 files changed, 267 insertions, 181 deletions
diff --git a/include/flag_set.h b/include/flag_set.h
new file mode 100644
index 000000000..df9262ac7
--- /dev/null
+++ b/include/flag_set.h
@@ -0,0 +1,8 @@
+#ifndef FLAG_SET_H
+#define FLAG_SET_H
+
+struct PlayState;
+
+void FlagSet_Update(struct PlayState* play);
+
+#endif
diff --git a/include/functions.h b/include/functions.h
deleted file mode 100644
index 1fe27acb2..000000000
--- a/include/functions.h
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifndef FUNCTIONS_H
-#define FUNCTIONS_H
-
-#include "z64.h"
-#include "macros.h"
-
-void Idle_ThreadEntry(void* arg);
-
-#if !PLATFORM_IQUE
-void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
-#else
-void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
-#endif
-
-#if DEBUG_FEATURES
-void isPrintfInit(void);
-#endif
-void rmonPrintf(const char* fmt, ...);
-
-#if DEBUG_FEATURES
-void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
-NORETURN void func_80002384(const char* exp, const char* file, int line);
-#endif
-
-OSPiHandle* osDriveRomInit(void);
-
-void Mio0_Decompress(u8* src, u8* dst);
-
-void FlagSet_Update(PlayState* play);
-
-void* MemCpy(void* dest, const void* src, s32 len);
-
-void TransitionTile_Destroy(TransitionTile* this);
-TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows);
-void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP);
-void TransitionTile_Update(TransitionTile* this);
-
-void TransitionTriforce_Start(void* thisx);
-void* TransitionTriforce_Init(void* thisx);
-void TransitionTriforce_Destroy(void* thisx);
-void TransitionTriforce_Update(void* thisx, s32 updateRate);
-void TransitionTriforce_SetColor(void* thisx, u32 color);
-void TransitionTriforce_SetType(void* thisx, s32 type);
-void TransitionTriforce_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionTriforce_IsDone(void* thisx);
-
-void TransitionWipe_Start(void* thisx);
-void* TransitionWipe_Init(void* thisx);
-void TransitionWipe_Destroy(void* thisx);
-void TransitionWipe_Update(void* thisx, s32 updateRate);
-void TransitionWipe_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionWipe_IsDone(void* thisx);
-void TransitionWipe_SetType(void* thisx, s32 type);
-void TransitionWipe_SetColor(void* thisx, u32 color);
-
-void TransitionCircle_Start(void* thisx);
-void* TransitionCircle_Init(void* thisx);
-void TransitionCircle_Destroy(void* thisx);
-void TransitionCircle_Update(void* thisx, s32 updateRate);
-void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionCircle_IsDone(void* thisx);
-void TransitionCircle_SetType(void* thisx, s32 type);
-void TransitionCircle_SetColor(void* thisx, u32 color);
-void TransitionCircle_SetUnkColor(void* thisx, u32 color);
-
-void TransitionFade_Start(void* thisx);
-void* TransitionFade_Init(void* thisx);
-void TransitionFade_Destroy(void* thisx);
-void TransitionFade_Update(void* thisx, s32 updateRate);
-void TransitionFade_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionFade_IsDone(void* thisx);
-void TransitionFade_SetColor(void* thisx, u32 color);
-void TransitionFade_SetType(void* thisx, s32 type);
-
-void SysCfb_Init(s32 n64dd);
-void* SysCfb_GetFbPtr(s32 idx);
-void* SysCfb_GetFbEnd(void);
-
-void RcpUtils_PrintRegisterStatus(void);
-void RcpUtils_Reset(void);
-
-void Runtime_Init(void* start, u32 size);
-
-#endif
diff --git a/include/global.h b/include/global.h
index d2a081a5f..902ddad84 100644
--- a/include/global.h
+++ b/include/global.h
@@ -1,7 +1,6 @@
#ifndef GLOBAL_H
#define GLOBAL_H
-#include "functions.h"
#include "variables.h"
#include "macros.h"
#include "versions.h"
diff --git a/include/idle.h b/include/idle.h
new file mode 100644
index 000000000..03dfa5180
--- /dev/null
+++ b/include/idle.h
@@ -0,0 +1,6 @@
+#ifndef IDLE_H
+#define IDLE_H
+
+void Idle_ThreadEntry(void* arg);
+
+#endif
diff --git a/include/inflate.h b/include/inflate.h
new file mode 100644
index 000000000..f26f7e496
--- /dev/null
+++ b/include/inflate.h
@@ -0,0 +1,10 @@
+#ifndef INFLATE_H
+#define INFLATE_H
+
+#include "libc/stddef.h"
+#include "libc/stdint.h"
+#include "ultra64.h"
+
+void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
+
+#endif
diff --git a/include/is_debug.h b/include/is_debug.h
new file mode 100644
index 000000000..e5f03bb78
--- /dev/null
+++ b/include/is_debug.h
@@ -0,0 +1,18 @@
+#ifndef IS_DEBUG_H
+#define IS_DEBUG_H
+
+#include "libc/stddef.h"
+#include "attributes.h"
+
+#if DEBUG_FEATURES
+void isPrintfInit(void);
+#endif
+
+void rmonPrintf(const char* fmt, ...);
+
+#if DEBUG_FEATURES
+void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
+NORETURN void func_80002384(const char* exp, const char* file, int line);
+#endif
+
+#endif
diff --git a/include/libu64/rcp_utils.h b/include/libu64/rcp_utils.h
new file mode 100644
index 000000000..758230514
--- /dev/null
+++ b/include/libu64/rcp_utils.h
@@ -0,0 +1,6 @@
+#ifndef LIBU64_RCP_UTILS_H
+#define LIBU64_RCP_UTILS_H
+
+void RcpUtils_Reset(void);
+
+#endif
diff --git a/include/libu64/runtime.h b/include/libu64/runtime.h
new file mode 100644
index 000000000..7df947cef
--- /dev/null
+++ b/include/libu64/runtime.h
@@ -0,0 +1,8 @@
+#ifndef LIBU64_RUNTIME_H
+#define LIBU64_RUNTIME_H
+
+#include "ultra64.h"
+
+void Runtime_Init(void* start, u32 size);
+
+#endif
diff --git a/include/memory_utils.h b/include/memory_utils.h
new file mode 100644
index 000000000..7a8d9aca9
--- /dev/null
+++ b/include/memory_utils.h
@@ -0,0 +1,9 @@
+#ifndef MEMORY_UTILS_H
+#define MEMORY_UTILS_H
+
+#include "ultra64.h"
+
+void* MemCpy(void* dest, const void* src, s32 len);
+void* MemSet(void* dest, s32 val, s32 len);
+
+#endif
diff --git a/include/mio0.h b/include/mio0.h
new file mode 100644
index 000000000..d350b4555
--- /dev/null
+++ b/include/mio0.h
@@ -0,0 +1,8 @@
+#ifndef MIO0_H
+#define MIO0_H
+
+#include "ultra64.h"
+
+void Mio0_Decompress(u8* src, u8* dst);
+
+#endif
diff --git a/include/sys_cfb.h b/include/sys_cfb.h
new file mode 100644
index 000000000..5b7039175
--- /dev/null
+++ b/include/sys_cfb.h
@@ -0,0 +1,10 @@
+#ifndef SYS_CFB_H
+#define SYS_CFB_H
+
+#include "ultra64.h"
+
+void SysCfb_Init(s32 n64dd);
+void* SysCfb_GetFbPtr(s32 idx);
+void* SysCfb_GetFbEnd(void);
+
+#endif
diff --git a/include/transition_circle.h b/include/transition_circle.h
new file mode 100644
index 000000000..23dec1d9d
--- /dev/null
+++ b/include/transition_circle.h
@@ -0,0 +1,55 @@
+#ifndef TRANSITION_CIRCLE_H
+#define TRANSITION_CIRCLE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef enum TransitionCircleAppearance {
+ /* 0 */ TCA_NORMAL,
+ /* 1 */ TCA_WAVE,
+ /* 2 */ TCA_RIPPLE,
+ /* 3 */ TCA_STARBURST
+} TransitionCircleAppearance;
+
+typedef enum TransitionCircleColor {
+ /* 0 */ TCC_BLACK,
+ /* 1 */ TCC_WHITE,
+ /* 2 */ TCC_GRAY,
+ /* 3 */ TCC_SPECIAL // color varies depending on appearance. unused and appears broken
+} TransitionCircleColor;
+
+typedef enum TransitionCircleSpeed {
+ /* 0 */ TCS_FAST,
+ /* 1 */ TCS_SLOW
+} TransitionCircleSpeed;
+
+typedef struct TransitionCircle {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ Color_RGBA8_u32 unkColor;
+ /* 0x008 */ s32 texX;
+ /* 0x00C */ s32 texY;
+ /* 0x010 */ s32 speed;
+ /* 0x014 */ u8 direction;
+ /* 0x015 */ u8 colorType;
+ /* 0x016 */ u8 speedType;
+ /* 0x017 */ u8 appearanceType;
+ /* 0x018 */ u8 isDone;
+ /* 0x019 */ u8 frame;
+ /* 0x01A */ u16 normal;
+ /* 0x020 */ Mtx projection;
+ /* 0x060 */ Mtx lookAt;
+ /* 0x0A0 */ void* texture;
+ /* 0x0A8 */ Mtx modelView[2][3];
+} TransitionCircle; // size = 0x228
+
+void TransitionCircle_Start(void* thisx);
+void* TransitionCircle_Init(void* thisx);
+void TransitionCircle_Destroy(void* thisx);
+void TransitionCircle_Update(void* thisx, s32 updateRate);
+void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionCircle_IsDone(void* thisx);
+void TransitionCircle_SetType(void* thisx, s32 type);
+void TransitionCircle_SetColor(void* thisx, u32 color);
+void TransitionCircle_SetUnkColor(void* thisx, u32 color);
+
+#endif
diff --git a/include/transition_fade.h b/include/transition_fade.h
new file mode 100644
index 000000000..be4e575e0
--- /dev/null
+++ b/include/transition_fade.h
@@ -0,0 +1,24 @@
+#ifndef TRANSITION_FADE_H
+#define TRANSITION_FADE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionFade {
+ /* 0x000 */ u8 type;
+ /* 0x001 */ u8 isDone;
+ /* 0x002 */ u8 direction;
+ /* 0x004 */ Color_RGBA8_u32 color;
+ /* 0x008 */ u16 timer;
+} TransitionFade; // size = 0xC
+
+void TransitionFade_Start(void* thisx);
+void* TransitionFade_Init(void* thisx);
+void TransitionFade_Destroy(void* thisx);
+void TransitionFade_Update(void* thisx, s32 updateRate);
+void TransitionFade_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionFade_IsDone(void* thisx);
+void TransitionFade_SetColor(void* thisx, u32 color);
+void TransitionFade_SetType(void* thisx, s32 type);
+
+#endif
diff --git a/include/transition_tile.h b/include/transition_tile.h
new file mode 100644
index 000000000..14191f3fe
--- /dev/null
+++ b/include/transition_tile.h
@@ -0,0 +1,30 @@
+#ifndef TRANSITION_TILE_H
+#define TRANSITION_TILE_H
+
+#include "ultra64.h"
+
+typedef struct TransitionTileVtxData {
+ /* 0x0 */ f32 x;
+ /* 0x4 */ f32 y;
+} TransitionTileVtxData; // size = 0x8
+
+typedef struct TransitionTile {
+ /* 0x00 */ s32 cols;
+ /* 0x04 */ s32 rows;
+ /* 0x08 */ s32 frame;
+ /* 0x0C */ TransitionTileVtxData* vtxData;
+ /* 0x10 */ Vtx* vtxFrame1;
+ /* 0x14 */ Vtx* vtxFrame2;
+ /* 0x18 */ Mtx projection;
+ /* 0x58 */ Mtx modelView;
+ /* 0x98 */ Mtx unk_98;
+ /* 0xD8 */ Gfx* gfx; // "gfxtbl"
+ /* 0xDC */ u16* zBuffer;
+} TransitionTile; // size = 0xE0
+
+TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows);
+void TransitionTile_Destroy(TransitionTile* this);
+void TransitionTile_Update(TransitionTile* this);
+void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP);
+
+#endif
diff --git a/include/transition_triforce.h b/include/transition_triforce.h
new file mode 100644
index 000000000..85eb1597e
--- /dev/null
+++ b/include/transition_triforce.h
@@ -0,0 +1,27 @@
+#ifndef TRANSITION_TRIFORCE_H
+#define TRANSITION_TRIFORCE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionTriforce {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ f32 transPos;
+ /* 0x008 */ f32 step;
+ /* 0x00C */ s32 state;
+ /* 0x010 */ s32 type;
+ /* 0x018 */ Mtx projection;
+ /* 0x058 */ s32 frame;
+ /* 0x060 */ Mtx modelView[2][3];
+} TransitionTriforce; // size = 0x1E0
+
+void TransitionTriforce_Start(void* thisx);
+void* TransitionTriforce_Init(void* thisx);
+void TransitionTriforce_Destroy(void* thisx);
+void TransitionTriforce_Update(void* thisx, s32 updateRate);
+void TransitionTriforce_SetColor(void* thisx, u32 color);
+void TransitionTriforce_SetType(void* thisx, s32 type);
+void TransitionTriforce_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionTriforce_IsDone(void* thisx);
+
+#endif
diff --git a/include/transition_wipe.h b/include/transition_wipe.h
new file mode 100644
index 000000000..654e9b623
--- /dev/null
+++ b/include/transition_wipe.h
@@ -0,0 +1,30 @@
+#ifndef TRANSITION_WIPE_H
+#define TRANSITION_WIPE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionWipe {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ Color_RGBA8_u32 unkColor;
+ /* 0x008 */ u8 direction;
+ /* 0x009 */ u8 frame;
+ /* 0x00A */ u8 isDone;
+ /* 0x00C */ u16 texX;
+ /* 0x00E */ u16 texY;
+ /* 0x010 */ u16 normal;
+ /* 0x018 */ Mtx projection;
+ /* 0x058 */ Mtx lookAt;
+ /* 0x098 */ Mtx modelView[2][3];
+} TransitionWipe; // size = 0x218
+
+void TransitionWipe_Start(void* thisx);
+void* TransitionWipe_Init(void* thisx);
+void TransitionWipe_Destroy(void* thisx);
+void TransitionWipe_Update(void* thisx, s32 updateRate);
+void TransitionWipe_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionWipe_IsDone(void* thisx);
+void TransitionWipe_SetType(void* thisx, s32 type);
+void TransitionWipe_SetColor(void* thisx, u32 color);
+
+#endif
diff --git a/include/ultra64.h b/include/ultra64.h
index 9972a4dfe..cccab388b 100644
--- a/include/ultra64.h
+++ b/include/ultra64.h
@@ -105,6 +105,7 @@ OSMesgQueue* osPiGetCmdQueue(void);
s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
void osViSetSpecialFeatures(u32 func);
OSPiHandle* osCartRomInit(void);
+OSPiHandle* osDriveRomInit(void);
void __osSetFpcCsr(u32);
u32 __osGetFpcCsr(void);
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
diff --git a/include/yaz0.h b/include/yaz0.h
new file mode 100644
index 000000000..52f5ba951
--- /dev/null
+++ b/include/yaz0.h
@@ -0,0 +1,10 @@
+#ifndef YAZ0_H
+#define YAZ0_H
+
+#include "libc/stddef.h"
+#include "libc/stdint.h"
+#include "ultra64.h"
+
+void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
+
+#endif
diff --git a/include/z64play.h b/include/z64play.h
index 4ca9e0b02..4853ac8f4 100644
--- a/include/z64play.h
+++ b/include/z64play.h
@@ -4,6 +4,7 @@
#include "ultra64.h"
#include "prerender.h"
+#include "transition_tile.h"
#include "z64actor.h"
#include "z64bgcheck.h"
#include "z64camera.h"
diff --git a/include/z64transition.h b/include/z64transition.h
index 569b8fb32..d46683d2b 100644
--- a/include/z64transition.h
+++ b/include/z64transition.h
@@ -3,6 +3,10 @@
#include "ultra64/ultratypes.h"
#include "ultra64/gbi.h" // for Gfx
+#include "transition_circle.h"
+#include "transition_fade.h"
+#include "transition_triforce.h"
+#include "transition_wipe.h"
#include "z64transition_instances.h"
#define TRANS_TRIGGER_OFF 0 // transition is not active
diff --git a/include/z64transition_instances.h b/include/z64transition_instances.h
index 154b98d00..cc35add03 100644
--- a/include/z64transition_instances.h
+++ b/include/z64transition_instances.h
@@ -1,104 +1,10 @@
#ifndef Z64TRANSITION_INSTANCES_H
#define Z64TRANSITION_INSTANCES_H
-#include "ultra64.h"
-#include "color.h"
-
-typedef struct TransitionTileVtxData {
- /* 0x0 */ f32 x;
- /* 0x4 */ f32 y;
-} TransitionTileVtxData; // size = 0x8
-
-typedef struct TransitionTile {
- /* 0x00 */ s32 cols;
- /* 0x04 */ s32 rows;
- /* 0x08 */ s32 frame;
- /* 0x0C */ TransitionTileVtxData* vtxData;
- /* 0x10 */ Vtx* vtxFrame1;
- /* 0x14 */ Vtx* vtxFrame2;
- /* 0x18 */ Mtx projection;
- /* 0x58 */ Mtx modelView;
- /* 0x98 */ Mtx unk_98;
- /* 0xD8 */ Gfx* gfx; // "gfxtbl"
- /* 0xDC */ u16* zBuffer;
-} TransitionTile; // size = 0xE0
-
typedef enum TransitionInstanceType {
/* 1 */ TRANS_INSTANCE_TYPE_FILL_OUT = 1,
- /* 2 */ TRANS_INSTANCE_TYPE_FILL_IN
+ /* 2 */ TRANS_INSTANCE_TYPE_FILL_IN,
+ /* 3 */ TRANS_INSTANCE_TYPE_FADE_FLASH
} TransitionInstanceType;
-typedef struct TransitionWipe {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ Color_RGBA8_u32 unkColor;
- /* 0x008 */ u8 direction;
- /* 0x009 */ u8 frame;
- /* 0x00A */ u8 isDone;
- /* 0x00C */ u16 texX;
- /* 0x00E */ u16 texY;
- /* 0x010 */ u16 normal;
- /* 0x018 */ Mtx projection;
- /* 0x058 */ Mtx lookAt;
- /* 0x098 */ Mtx modelView[2][3];
-} TransitionWipe; // size = 0x218
-
-#define TRANS_INSTANCE_TYPE_FADE_FLASH 3
-
-typedef struct TransitionFade {
- /* 0x000 */ u8 type;
- /* 0x001 */ u8 isDone;
- /* 0x002 */ u8 direction;
- /* 0x004 */ Color_RGBA8_u32 color;
- /* 0x008 */ u16 timer;
-} TransitionFade; // size = 0xC
-
-typedef enum TransitionCircleAppearance {
- /* 0 */ TCA_NORMAL,
- /* 1 */ TCA_WAVE,
- /* 2 */ TCA_RIPPLE,
- /* 3 */ TCA_STARBURST
-} TransitionCircleAppearance;
-
-typedef enum TransitionCircleColor {
- /* 0 */ TCC_BLACK,
- /* 1 */ TCC_WHITE,
- /* 2 */ TCC_GRAY,
- /* 3 */ TCC_SPECIAL // color varies depending on appearance. unused and appears broken
-} TransitionCircleColor;
-
-typedef enum TransitionCircleSpeed {
- /* 0 */ TCS_FAST,
- /* 1 */ TCS_SLOW
-} TransitionCircleSpeed;
-
-typedef struct TransitionCircle {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ Color_RGBA8_u32 unkColor;
- /* 0x008 */ s32 texX;
- /* 0x00C */ s32 texY;
- /* 0x010 */ s32 speed;
- /* 0x014 */ u8 direction;
- /* 0x015 */ u8 colorType;
- /* 0x016 */ u8 speedType;
- /* 0x017 */ u8 appearanceType;
- /* 0x018 */ u8 isDone;
- /* 0x019 */ u8 frame;
- /* 0x01A */ u16 normal;
- /* 0x020 */ Mtx projection;
- /* 0x060 */ Mtx lookAt;
- /* 0x0A0 */ void* texture;
- /* 0x0A8 */ Mtx modelView[2][3];
-} TransitionCircle; // size = 0x228
-
-typedef struct TransitionTriforce {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ f32 transPos;
- /* 0x008 */ f32 step;
- /* 0x00C */ s32 state;
- /* 0x010 */ s32 type;
- /* 0x018 */ Mtx projection;
- /* 0x058 */ s32 frame;
- /* 0x060 */ Mtx modelView[2][3];
-} TransitionTriforce; // size = 0x1E0
-
#endif