2021-09-15 19:24:19 -04:00
|
|
|
#ifndef FUNCTIONS_H
|
|
|
|
#define FUNCTIONS_H
|
2020-03-17 00:31:30 -04:00
|
|
|
|
2020-03-24 12:29:59 -05:00
|
|
|
#include "z64.h"
|
2022-06-03 17:51:23 +01:00
|
|
|
#include "macros.h"
|
2020-03-17 00:31:30 -04:00
|
|
|
|
|
|
|
void bootproc(void);
|
2021-02-14 00:49:40 +00:00
|
|
|
void Main_ThreadEntry(void* arg);
|
|
|
|
void Idle_ThreadEntry(void* arg);
|
2022-06-03 20:43:30 +01:00
|
|
|
void ViConfig_UpdateVi(u32 black);
|
2021-02-14 00:49:40 +00:00
|
|
|
void ViConfig_UpdateBlack(void);
|
2025-01-10 05:31:20 -08:00
|
|
|
#if !PLATFORM_IQUE
|
2022-11-17 02:57:02 +00:00
|
|
|
void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
|
2025-01-10 05:31:20 -08:00
|
|
|
#else
|
|
|
|
void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
|
|
|
|
#endif
|
2021-02-14 00:49:40 +00:00
|
|
|
void Locale_Init(void);
|
|
|
|
void Locale_ResetRegion(void);
|
2024-11-17 17:02:07 -05:00
|
|
|
#if DEBUG_FEATURES
|
2021-02-14 00:49:40 +00:00
|
|
|
void isPrintfInit(void);
|
2024-01-29 09:10:28 -08:00
|
|
|
#endif
|
2020-03-17 00:31:30 -04:00
|
|
|
void rmonPrintf(const char* fmt, ...);
|
2024-11-17 17:02:07 -05:00
|
|
|
#if DEBUG_FEATURES
|
2023-10-27 15:06:44 +01:00
|
|
|
void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
|
2024-02-27 07:37:33 +00:00
|
|
|
NORETURN void func_80002384(const char* exp, const char* file, int line);
|
2024-01-29 09:10:28 -08:00
|
|
|
#endif
|
2021-02-14 00:49:40 +00:00
|
|
|
OSPiHandle* osDriveRomInit(void);
|
2024-01-29 15:14:30 -08:00
|
|
|
void Mio0_Decompress(u8* src, u8* dst);
|
2020-03-17 00:31:30 -04:00
|
|
|
|
2022-05-21 14:23:43 -04:00
|
|
|
void FlagSet_Update(PlayState* play);
|
2020-03-17 00:31:30 -04:00
|
|
|
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
|
|
|
|
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
|
2024-09-23 17:06:43 +02:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
void ActorOverlayTable_LogPrint(void);
|
|
|
|
void ActorOverlayTable_Init(void);
|
|
|
|
void ActorOverlayTable_Cleanup(void);
|
2024-09-07 08:29:50 +02:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
void SaveContext_Init(void);
|
2024-09-25 19:45:06 +02:00
|
|
|
|
2022-05-01 23:06:35 +01:00
|
|
|
void* MemCpy(void* dest, const void* src, s32 len);
|
2024-06-25 15:13:31 -04:00
|
|
|
|
2022-05-21 14:23:43 -04:00
|
|
|
void MapMark_Init(PlayState* play);
|
|
|
|
void MapMark_ClearPointers(PlayState* play);
|
|
|
|
void MapMark_Draw(PlayState* play);
|
2020-03-20 12:43:51 +01:00
|
|
|
void PreNmiBuff_Init(PreNmiBuff* this);
|
|
|
|
void PreNmiBuff_SetReset(PreNmiBuff* this);
|
|
|
|
u32 PreNmiBuff_IsResetting(PreNmiBuff* this);
|
2022-06-03 20:43:30 +01:00
|
|
|
void Sched_FlushTaskQueue(void);
|
2024-09-08 03:00:05 +02:00
|
|
|
|
2020-10-11 21:52:50 -04:00
|
|
|
void PreNMI_Init(GameState* thisx);
|
2024-09-25 00:18:01 +02:00
|
|
|
|
2020-10-11 21:52:50 -04:00
|
|
|
void Sample_Destroy(GameState* thisx);
|
|
|
|
void Sample_Init(GameState* thisx);
|
2024-09-18 21:40:59 +02:00
|
|
|
|
2022-06-20 22:31:53 +02:00
|
|
|
void ViMode_LogPrint(OSViMode* osViMode);
|
2022-11-13 23:07:27 +00:00
|
|
|
void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
|
|
|
s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust);
|
2021-05-29 15:41:39 +02:00
|
|
|
void ViMode_Save(ViMode* viMode);
|
|
|
|
void ViMode_Load(ViMode* viMode);
|
|
|
|
void ViMode_Init(ViMode* viMode);
|
|
|
|
void ViMode_Destroy(ViMode* viMode);
|
|
|
|
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
|
|
|
|
void ViMode_Update(ViMode* viMode, Input* input);
|
2021-02-14 00:49:40 +00:00
|
|
|
void PlayerCall_InitFuncPtrs(void);
|
2022-12-28 13:29:59 -08:00
|
|
|
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);
|
2022-06-20 22:31:53 +02:00
|
|
|
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);
|
2021-02-14 00:49:40 +00:00
|
|
|
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);
|
2022-12-23 18:46:56 -08:00
|
|
|
void TransitionCircle_SetUnkColor(void* thisx, u32 color);
|
2022-06-20 22:31:53 +02:00
|
|
|
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);
|
2024-09-25 19:45:06 +02:00
|
|
|
|
2023-01-12 16:06:31 -05:00
|
|
|
void DebugCamera_Init(DebugCam* debugCam, Camera* cameraPtr);
|
|
|
|
void DebugCamera_Enable(DebugCam* debugCam, Camera* cam);
|
|
|
|
void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
|
|
|
|
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
|
2024-06-25 15:13:31 -04:00
|
|
|
|
2021-07-04 08:58:19 -07:00
|
|
|
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
|
|
|
|
void PreRender_Init(PreRender* this);
|
|
|
|
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
|
|
|
|
void PreRender_Destroy(PreRender* this);
|
2023-09-16 22:16:58 +01:00
|
|
|
void func_800C170C(PreRender* this, Gfx** gfxP, void* buf, void* bufSave, u32 r, u32 g, u32 b, u32 a);
|
|
|
|
void func_800C1AE8(PreRender* this, Gfx** gfxP, void* fbuf, void* fbufSave);
|
|
|
|
void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxP);
|
|
|
|
void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxP);
|
|
|
|
void PreRender_DrawCoverage(PreRender* this, Gfx** gfxP);
|
|
|
|
void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxP);
|
|
|
|
void func_800C213C(PreRender* this, Gfx** gfxP);
|
|
|
|
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxP);
|
|
|
|
void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP);
|
2022-08-28 17:18:20 +01:00
|
|
|
void PreRender_ApplyFilters(PreRender* this);
|
2021-09-12 07:02:45 -04:00
|
|
|
void Graph_InitTHGA(GraphicsContext* gfxCtx);
|
2020-05-14 18:11:33 -05:00
|
|
|
GameStateOverlay* Graph_GetNextGameState(GameState* gameState);
|
2020-04-05 12:32:08 +02:00
|
|
|
void Graph_Init(GraphicsContext* gfxCtx);
|
|
|
|
void Graph_Destroy(GraphicsContext* gfxCtx);
|
2020-04-04 18:12:59 +02:00
|
|
|
void Graph_TaskSet00(GraphicsContext* gfxCtx);
|
|
|
|
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState);
|
2020-03-17 00:31:30 -04:00
|
|
|
void Graph_ThreadEntry(void*);
|
2024-09-07 12:30:55 +02:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
ListAlloc* ListAlloc_Init(ListAlloc* this);
|
|
|
|
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
|
|
|
|
void ListAlloc_Free(ListAlloc* this, void* data);
|
|
|
|
void ListAlloc_FreeAll(ListAlloc* this);
|
2021-02-14 00:49:40 +00:00
|
|
|
void Main(void* arg);
|
2020-03-17 00:31:30 -04:00
|
|
|
void SysCfb_Init(s32 n64dd);
|
2022-10-02 17:38:09 +02:00
|
|
|
void* SysCfb_GetFbPtr(s32 idx);
|
|
|
|
void* SysCfb_GetFbEnd(void);
|
2024-06-19 00:00:23 -04:00
|
|
|
|
2023-09-09 15:24:52 +01:00
|
|
|
NORETURN void func_800D31A0(void);
|
2021-02-14 00:49:40 +00:00
|
|
|
void func_800D31F0(void);
|
|
|
|
void func_800D3210(void);
|
2024-06-19 00:00:23 -04:00
|
|
|
|
2022-03-21 15:49:11 -04:00
|
|
|
void RcpUtils_PrintRegisterStatus(void);
|
2022-01-24 01:04:50 +02:00
|
|
|
void RcpUtils_Reset(void);
|
2023-02-27 08:14:02 +00:00
|
|
|
void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd);
|
2024-01-30 16:30:27 -08:00
|
|
|
void Overlay_Relocate(void* allocatedRamAddr, OverlayRelocationSection* ovlRelocs, void* vramStart);
|
|
|
|
size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd, void* allocatedRamAddr);
|
2020-03-17 00:31:30 -04:00
|
|
|
// ? func_800FC800(?);
|
|
|
|
// ? func_800FC83C(?);
|
|
|
|
// ? func_800FCAB4(?);
|
2020-03-22 22:50:11 +01:00
|
|
|
void SystemHeap_Init(void* start, u32 size);
|
2024-06-19 00:00:23 -04:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
f32 absf(f32);
|
2024-06-25 15:13:31 -04:00
|
|
|
|
2022-10-15 07:40:00 +02:00
|
|
|
void Regs_InitData(PlayState* play);
|
2020-03-17 00:31:30 -04:00
|
|
|
|
2022-06-23 14:34:26 -07:00
|
|
|
void Setup_Init(GameState* thisx);
|
|
|
|
void Setup_Destroy(GameState* thisx);
|
|
|
|
void ConsoleLogo_Init(GameState* thisx);
|
|
|
|
void ConsoleLogo_Destroy(GameState* thisx);
|
|
|
|
void MapSelect_Init(GameState* thisx);
|
|
|
|
void MapSelect_Destroy(GameState* thisx);
|
|
|
|
void TitleSetup_Init(GameState* thisx);
|
|
|
|
void TitleSetup_Destroy(GameState* thisx);
|
|
|
|
void FileSelect_Init(GameState* thisx);
|
|
|
|
void FileSelect_Destroy(GameState* thisx);
|
2020-03-19 23:29:33 +01:00
|
|
|
|
2020-03-17 00:31:30 -04:00
|
|
|
#endif
|