Reduce dependencies on global.h (10) (#2490)

* reduce z64.h size

* fix z_cheap_proc.inc.c

* ,bss

* remove temp delcaration
This commit is contained in:
mzxrules
2025-02-26 17:18:30 -05:00
committed by GitHub
parent 2b30c61a26
commit cf1a39c26f
116 changed files with 663 additions and 308 deletions
@@ -1,7 +1,15 @@
#include "z_kaleido_scope.h"
#include "controller.h"
#include "gfx.h"
#include "regs.h"
#include "sfx.h"
#include "z64ocarina.h"
#include "z64play.h"
#include "z64save.h"
#include "global.h"
#include "assets/textures/parameter_static/parameter_static.h"
#include "assets/textures/icon_item_static/icon_item_static.h"
@@ -1,5 +1,11 @@
#include "z_kaleido_scope.h"
#include "libu64/gfxprint.h"
#include "controller.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "gfxalloc.h"
#include "z64play.h"
#include "z64save.h"
#include "assets/textures/parameter_static/parameter_static.h"
@@ -1,5 +1,12 @@
#include "z_kaleido_scope.h"
#include "controller.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "regs.h"
#include "sfx.h"
#include "z64play.h"
#include "z64player.h"
#include "z64save.h"
#include "assets/textures/icon_item_static/icon_item_static.h"
@@ -1,5 +1,12 @@
#include "z_kaleido_scope.h"
#include "libu64/pad.h"
#include "controller.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "regs.h"
#include "sfx.h"
#include "z64play.h"
#include "z64save.h"
#include "assets/textures/parameter_static/parameter_static.h"
@@ -1,9 +1,17 @@
#include "z_kaleido_scope.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "map.h"
#include "regs.h"
#include "sfx.h"
#include "sys_ucode.h"
#include "versions.h"
#include "z64play.h"
#include "z64save.h"
#include "global.h"
#include "assets/textures/icon_item_24_static/icon_item_24_static.h"
#if OOT_NTSC
#include "assets/textures/icon_item_jpn_static/icon_item_jpn_static.h"
@@ -1,5 +1,10 @@
#include "z_kaleido_scope.h"
#include "libu64/pad.h"
#include "regs.h"
#include "sfx.h"
#include "z64play.h"
static s16 sKaleidoPromptCursorAlphaVals[] = { 100, 255 };
void KaleidoScope_UpdatePrompt(PlayState* play) {
@@ -1,13 +1,30 @@
#include "z_kaleido_scope.h"
#include "libc64/sleep.h"
#include "controller.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "gfxalloc.h"
#include "map.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
#include "regs.h"
#include "segment_symbols.h"
#include "segmented_address.h"
#include "seqcmd.h"
#include "sfx.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "title_setup_state.h"
#include "versions.h"
#include "z64audio.h"
#include "z64ocarina.h"
#include "z64play.h"
#include "z64player.h"
#include "z64save.h"
#include "global.h"
#include "assets/textures/icon_item_static/icon_item_static.h"
#include "assets/textures/icon_item_24_static/icon_item_24_static.h"
#if OOT_NTSC
@@ -20,7 +37,7 @@
#endif
#include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 ntsc-1.0:0 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:0 pal-1.1:0"
#if !PLATFORM_GC
#define KALEIDO_PROMPT_CURSOR_R 100
@@ -2,8 +2,11 @@
#define Z_KALEIDO_SCOPE_H
#include "ultra64.h"
#include "global.h"
#include "gfx.h"
#include "z64inventory.h"
#include "z64pause.h"
struct PlayState;
extern u8 gAmmoItems[];
extern s16 gVtxPageMapWorldQuadsWidth[];
@@ -166,26 +169,26 @@ typedef enum ItemQuad {
/* 41 */ ITEM_QUAD_MAX
} ItemQuad;
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
void KaleidoScope_DrawQuestStatus(struct PlayState* play, GraphicsContext* gfxCtx);
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
void KaleidoScope_DrawDebugEditor(PlayState* play);
void KaleidoScope_DrawPlayerWork(PlayState* play);
void KaleidoScope_DrawEquipment(PlayState* play);
void KaleidoScope_DrawDebugEditor(struct PlayState* play);
void KaleidoScope_DrawPlayerWork(struct PlayState* play);
void KaleidoScope_DrawEquipment(struct PlayState* play);
void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx);
void KaleidoScope_DrawItemSelect(PlayState* play);
void KaleidoScope_UpdateItemEquip(PlayState* play);
void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx);
void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx);
void KaleidoScope_UpdatePrompt(PlayState* play);
void KaleidoScope_DrawItemSelect(struct PlayState* play);
void KaleidoScope_UpdateItemEquip(struct PlayState* play);
void KaleidoScope_DrawDungeonMap(struct PlayState* play, GraphicsContext* gfxCtx);
void KaleidoScope_DrawWorldMap(struct PlayState* play, GraphicsContext* gfxCtx);
void KaleidoScope_UpdatePrompt(struct PlayState* play);
Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, u16 point);
Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, u16 point);
void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, u16 specialPos);
void KaleidoScope_MoveCursorToSpecialPos(struct PlayState* play, u16 specialPos);
void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, void* texture, u16 width, u16 height, u16 point);
void KaleidoScope_ProcessPlayerPreRender();
void KaleidoScope_SetupPlayerPreRender(PlayState* play);
void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex);
void KaleidoScope_UpdateDungeonMap(PlayState* play);
void KaleidoScope_SetupPlayerPreRender(struct PlayState* play);
void KaleidoScope_DrawCursor(struct PlayState* play, u16 pageIndex);
void KaleidoScope_UpdateDungeonMap(struct PlayState* play);
void PauseMapMark_Draw(PlayState* play);
void PauseMapMark_Draw(struct PlayState* play);
#endif
@@ -1,7 +1,14 @@
#if PLATFORM_N64
#include "n64dd.h"
#endif
#include "regs.h"
#include "sys_matrix.h"
#include "z_kaleido_scope.h"
#include "z_lib.h"
#include "z64play.h"
#include "global.h"
#include "assets/textures/parameter_static/parameter_static.h"
typedef struct PauseMapMarkInfo {