summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2024-09-11 10:17:47 +0200
committerGitHub <noreply@github.com>2024-09-11 10:17:47 +0200
commitcbf9eacf42c25f887589ba50d4ef2cd41cdc9030 (patch)
tree1073bdff9206abe866be5c0af6c9bef8a8690b0f /include
parent5441559b30d4419eb25e77abc4ff2eb1f34027aa (diff)
[headers 12] Add kaleido_manager.h, move various protos to headers (#2174)
* [headers 12] add kaleido_manager.h, move various protos to headers * BSS * bss
Diffstat (limited to 'include')
-rw-r--r--include/functions.h26
-rw-r--r--include/gfxprint.h10
-rw-r--r--include/kaleido_manager.h39
-rw-r--r--include/libc/string.h2
-rw-r--r--include/variables.h2
-rw-r--r--include/z64.h16
-rw-r--r--include/z64interface.h2
-rw-r--r--include/z64pause.h5
8 files changed, 59 insertions, 43 deletions
diff --git a/include/functions.h b/include/functions.h
index 0072baf4b..c05600352 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -682,9 +682,6 @@ void func_8006D684(PlayState* play, Player* player);
void func_8006DC68(PlayState* play, Player* player);
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
-void KaleidoSetup_Update(PlayState* play);
-void KaleidoSetup_Init(PlayState* play);
-void KaleidoSetup_Destroy(PlayState* play);
s32 Kanji_OffsetFromShiftJIS(s32 character);
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex);
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
@@ -1052,16 +1049,6 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyFrame, f32* curFrame);
-void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
-void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
-void KaleidoManager_Init(PlayState* play);
-void KaleidoManager_Destroy(void);
-void* KaleidoManager_GetRamAddr(void* vram);
-void KaleidoScopeCall_LoadPlayer(void);
-void KaleidoScopeCall_Init(PlayState* play);
-void KaleidoScopeCall_Destroy(PlayState* play);
-void KaleidoScopeCall_Update(PlayState* play);
-void KaleidoScopeCall_Draw(PlayState* play);
s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
s32 func_800C0DB4(PlayState* this, Vec3f* pos);
@@ -1349,15 +1336,6 @@ void Audio_InitSound(void);
void func_800F7170(void);
void func_800F71BC(s32 arg0);
-void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
-void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
-void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
-void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
-void GfxPrint_Init(GfxPrint* this);
-void GfxPrint_Destroy(GfxPrint* this);
-void GfxPrint_Open(GfxPrint* this, Gfx* dList);
-Gfx* GfxPrint_Close(GfxPrint* this);
-s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
void RcpUtils_PrintRegisterStatus(void);
void RcpUtils_Reset(void);
void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd);
@@ -1514,11 +1492,7 @@ void guMtxF2L(f32 mf[4][4], Mtx* m);
void* osViGetCurrentFramebuffer(void);
s32 __osSpSetPc(void* pc);
f32 absf(f32);
-void* memset(void* dest, int val, size_t len);
-void* memmove(void* dest, const void* src, size_t len);
-void Interface_Destroy(PlayState* play);
-void Interface_Init(PlayState* play);
void Regs_InitData(PlayState* play);
void Setup_Init(GameState* thisx);
diff --git a/include/gfxprint.h b/include/gfxprint.h
index 86879c480..039b564b4 100644
--- a/include/gfxprint.h
+++ b/include/gfxprint.h
@@ -39,4 +39,14 @@ typedef struct GfxPrint {
#endif
#define GFXP_FLAG_OPEN (1 << 7)
+void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
+void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
+void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
+void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
+void GfxPrint_Init(GfxPrint* this);
+void GfxPrint_Destroy(GfxPrint* this);
+void GfxPrint_Open(GfxPrint* this, Gfx* dList);
+Gfx* GfxPrint_Close(GfxPrint* this);
+s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
+
#endif
diff --git a/include/kaleido_manager.h b/include/kaleido_manager.h
new file mode 100644
index 000000000..ce116752a
--- /dev/null
+++ b/include/kaleido_manager.h
@@ -0,0 +1,39 @@
+#ifndef KALEIDO_MANAGER_H
+#define KALEIDO_MANAGER_H
+
+#include "ultra64.h"
+#include "romfile.h"
+
+struct PlayState;
+
+typedef struct KaleidoMgrOverlay {
+ /* 0x00 */ void* loadedRamAddr;
+ /* 0x04 */ RomFile file;
+ /* 0x0C */ void* vramStart;
+ /* 0x10 */ void* vramEnd;
+ /* 0x14 */ u32 offset; // loadedRamAddr - vramStart
+ /* 0x18 */ const char* name;
+} KaleidoMgrOverlay; // size = 0x1C
+
+typedef enum KaleidoOverlayType {
+ /* 0 */ KALEIDO_OVL_KALEIDO_SCOPE,
+ /* 1 */ KALEIDO_OVL_PLAYER_ACTOR,
+ /* 2 */ KALEIDO_OVL_MAX
+} KaleidoOverlayType;
+
+void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
+void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
+void KaleidoManager_Init(struct PlayState* play);
+void KaleidoManager_Destroy(void);
+void* KaleidoManager_GetRamAddr(void* vram);
+
+extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
+extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
+
+void KaleidoScopeCall_LoadPlayer(void);
+void KaleidoScopeCall_Init(struct PlayState* play);
+void KaleidoScopeCall_Destroy(struct PlayState* play);
+void KaleidoScopeCall_Update(struct PlayState* play);
+void KaleidoScopeCall_Draw(struct PlayState* play);
+
+#endif
diff --git a/include/libc/string.h b/include/libc/string.h
index 3f9a5cee7..3e2e6be59 100644
--- a/include/libc/string.h
+++ b/include/libc/string.h
@@ -7,5 +7,7 @@ char* strchr(const char*, int);
size_t strlen(const char*);
void* memcpy(void*, const void*, size_t);
+void* memmove(void* dest, const void* src, size_t len);
+void* memset(void* dest, int val, size_t len);
#endif
diff --git a/include/variables.h b/include/variables.h
index 92f68735b..269f45537 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -94,8 +94,6 @@ extern u16 gSramSlotOffsets[];
// 4 16-colors palettes
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
extern u64 gMojiFontTex[]; // original name: "font_ff"
-extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
-extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
extern u8 gBossMarkState;
#if OOT_DEBUG
diff --git a/include/z64.h b/include/z64.h
index a4871aa83..4c797ffae 100644
--- a/include/z64.h
+++ b/include/z64.h
@@ -71,6 +71,7 @@
#include "main.h"
#include "segmented_address.h"
#include "stackcheck.h"
+#include "kaleido_manager.h"
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
@@ -102,21 +103,6 @@
#define THREAD_ID_DMAMGR 18
#define THREAD_ID_IRQMGR 19
-typedef struct KaleidoMgrOverlay {
- /* 0x00 */ void* loadedRamAddr;
- /* 0x04 */ RomFile file;
- /* 0x0C */ void* vramStart;
- /* 0x10 */ void* vramEnd;
- /* 0x14 */ u32 offset; // loadedRamAddr - vramStart
- /* 0x18 */ const char* name;
-} KaleidoMgrOverlay; // size = 0x1C
-
-typedef enum KaleidoOverlayType {
- /* 0 */ KALEIDO_OVL_KALEIDO_SCOPE,
- /* 1 */ KALEIDO_OVL_PLAYER_ACTOR,
- /* 2 */ KALEIDO_OVL_MAX
-} KaleidoOverlayType;
-
typedef enum LensMode {
/* 0 */ LENS_MODE_SHOW_ACTORS, // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
/* 1 */ LENS_MODE_HIDE_ACTORS // lens actors are visible by default, and hidden by using lens (for example, fake walls)
diff --git a/include/z64interface.h b/include/z64interface.h
index 6ee09afe9..e9284499a 100644
--- a/include/z64interface.h
+++ b/include/z64interface.h
@@ -275,5 +275,7 @@ void Interface_SetSubTimerToFinalSecond(struct PlayState* play);
void Interface_SetTimer(s16 seconds);
void Interface_Draw(struct PlayState* play);
void Interface_Update(struct PlayState* play);
+void Interface_Destroy(struct PlayState* play);
+void Interface_Init(struct PlayState* play);
#endif
diff --git a/include/z64pause.h b/include/z64pause.h
index d560963a1..880252178 100644
--- a/include/z64pause.h
+++ b/include/z64pause.h
@@ -6,6 +6,7 @@
#include "z64view.h"
struct OcarinaStaff;
+struct PlayState;
#define PAUSE_ITEM_NONE 999
@@ -229,4 +230,8 @@ typedef struct PauseMapMarkData {
typedef PauseMapMarkData PauseMapMarksData[3];
+void KaleidoSetup_Update(struct PlayState* play);
+void KaleidoSetup_Init(struct PlayState* play);
+void KaleidoSetup_Destroy(struct PlayState* play);
+
#endif