1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-08 00:44:42 +00:00

Reduce overlay dependencies on global.h (6) (#2468)

* add some headers, split some of z64.h

* MtxClear -> IdentityMtx

* more misc cleanups

* move D_80116280 to header, fix build issue

* remove z64.h

* Revert "MtxClear -> IdentityMtx"

This reverts commit 8fc74c0672.

* split z64path.h and z64skin.h functions

* z64face_reaction.h

* cleanup overlay global references

* trim padding

* bss
This commit is contained in:
mzxrules 2025-02-13 18:15:14 -05:00 committed by GitHub
parent 494aecc9fc
commit 4639914583
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 419 additions and 297 deletions

View file

@ -40,7 +40,7 @@
* DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen.
* DPad-Down disables sending fault pages over osSyncPrintf.
*/
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:144 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \
"gc-us-mq:160 ique-cn:160"
#include "global.h"
@ -48,6 +48,7 @@
#include "fault.h"
#include "stack.h"
#include "terminal.h"
#include "z64thread.h"
void Fault_Init(void);
void Fault_SetOsSyncPrintfEnabled(u32 enabled);

View file

@ -5,6 +5,7 @@
#include "libc64/os_malloc.h"
#include "stack.h"
#include "terminal.h"
#include "z64thread.h"
#pragma increment_block_number "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "fault.h"
#include "sys_ucode.h"
#include "terminal.h"
#include "ucode_disas.h"
#include "versions.h"

View file

@ -35,6 +35,7 @@
#include "global.h"
#include "terminal.h"
#include "versions.h"
#include "z64thread.h"
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
volatile OSTime sIrqMgrResetTime = 0;

View file

@ -22,9 +22,10 @@ extern struct IrqMgr gIrqMgr;
#include "cic6105.h"
#include "n64dd.h"
#endif
#include "z64thread.h"
#pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \
"ique-cn:160 ntsc-1.0:137 ntsc-1.1:137 ntsc-1.2:137 pal-1.0:135 pal-1.1:135"
"ique-cn:160 ntsc-1.0:139 ntsc-1.1:139 ntsc-1.2:139 pal-1.0:137 pal-1.1:137"
extern u8 _buffersSegmentEnd[];

View file

@ -31,6 +31,7 @@
#include "libu64/debug.h"
#include "libu64/padsetup.h"
#include "macros.h"
#include "padmgr.h"
#include "fault.h"
#include "terminal.h"
#include "line_numbers.h"

View file

@ -42,6 +42,7 @@
#include "global.h"
#include "fault.h"
#include "versions.h"
#include "z64thread.h"
#define RSP_DONE_MSG 667
#define RDP_DONE_MSG 668

View file

@ -1,7 +1,14 @@
#include "global.h"
#include "libc64/math64.h"
#include "gfx.h"
#if DEBUG_FEATURES
#include "fault.h"
#endif
#include "macros.h"
#include "sys_matrix.h"
#include "ultra64.h"
#include "z_lib.h"
#include "z64game.h"
#include "z64skin_matrix.h"
// clang-format off
Mtx gIdentityMtx = gdSPDefMtx(
@ -19,9 +26,6 @@ MtxF gIdentityMtxF = {
};
// clang-format on
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"pal-1.1:128"
MtxF* sMatrixStack; // "Matrix_stack"
MtxF* sCurrentMatrix; // "Matrix_now"

View file

@ -1,4 +1,4 @@
#include "global.h"
#include "ultra64.h"
u64* sDefaultGSPUCodeText = gspF3DZEX2_NoN_PosLight_fifoTextStart;
u64* sDefaultGSPUCodeData = gspF3DZEX2_NoN_PosLight_fifoDataStart;

View file

@ -1,5 +1,10 @@
#include "global.h"
#include "ucode_disas.h"
#include "ultra64.h"
#include "ultra64/gs2dex.h"
#include "libu64/mtxuty-cvt.h"
#include "segmented_address.h"
#include "macros.h"
#if DEBUG_FEATURES

View file

@ -1,13 +1,30 @@
#include "global.h"
#include "libc64/math64.h"
#include "fault.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "quake.h"
#include "rand.h"
#include "regs.h"
#include "rumble.h"
#include "segmented_address.h"
#include "sfx.h"
#include "sys_math.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "versions.h"
#include "z_lib.h"
#include "zelda_arena.h"
#include "z64effect.h"
#include "z64light.h"
#include "z64horse.h"
#include "z64play.h"
#include "z64skin_matrix.h"
#include "global.h"
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
#include "overlays/actors/ovl_En_Part/z_en_part.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h"

View file

@ -3640,7 +3640,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ique-cn:128 ntsc-1.0:138 ntsc-1.1:138 ntsc-1.2:138 pal-1.0:136 pal-1.1:136"
"ique-cn:128 ntsc-1.0:140 ntsc-1.1:140 ntsc-1.2:140 pal-1.0:138 pal-1.1:138"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;

View file

@ -1,4 +1,6 @@
#include "global.h"
#include "ultra64.h"
#include "z64face_reaction.h"
#include "z64player.h"
u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
// MASK_REACTION_SET_CARPENTER_BOSS
@ -182,7 +184,7 @@ u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 },
};
u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet) {
u16 MaskReaction_GetTextId(struct PlayState* play, u32 maskReactionSet) {
u8 currentMask = Player_GetMask(play);
return sMaskReactionSetTextIds[maskReactionSet][currentMask];

View file

@ -3,7 +3,7 @@
#include "stdbool.h"
#include "controller.h"
#include "padmgr.h"
#include "libu64/pad.h"
#include "macros.h"
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {

View file

@ -1,6 +1,12 @@
#include "global.h"
#include "ultra64.h"
#include "attributes.h"
#include "jpeg.h"
#include "sys_ucode.h"
#include "terminal.h"
#include "macros.h"
#define MARKER_ESCAPE 0x00
#define MARKER_SOI 0xD8
#define MARKER_SOF 0xC0

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \
"ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:232 pal-1.1:232"
#pragma increment_block_number "gc-eu:228 gc-eu-mq:228 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \
"ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:236 pal-1.1:236"
#include "global.h"
#include "ultra64.h"

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "ultra64.h"
#include "sched.h"
/**
* Blocks the current thread until all queued scheduler tasks have completed.

View file

@ -1,6 +1,8 @@
#include "ultra64.h"
#include "libc64/math64.h"
#include "segmented_address.h"
#include "z64actor.h"
#include "z64path.h"
#include "z64play.h"
Path* Path_GetByIndex(PlayState* play, s16 index, s16 max) {

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "fault.h"
#include "sys_ucode.h"
#include "terminal.h"
#include "versions.h"
#include "line_numbers.h"

View file

@ -1,4 +1,10 @@
#include "global.h"
#include "gfx.h"
#include "segmented_address.h"
#include "sys_matrix.h"
#include "z64math.h"
#include "z64play.h"
#include "z64skin.h"
#include "z64skin_matrix.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"pal-1.1:128"

View file

@ -1,5 +1,10 @@
#include "global.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#include "segmented_address.h"
#include "zelda_arena.h"
#include "z64actor.h"
#include "z64play.h"
#include "z64skin.h"
#include "z64skin_matrix.h"
/**
* Initialises the Vtx buffers used for limb at index `limbIndex`