diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/PreRender.c | 1 | ||||
| -rw-r--r-- | src/code/cutscene_camera.c | 3 | ||||
| -rw-r--r-- | src/code/flg_set.c | 2 | ||||
| -rw-r--r-- | src/code/game.c | 9 | ||||
| -rw-r--r-- | src/code/gfxalloc.c | 4 | ||||
| -rw-r--r-- | src/code/graph.c | 15 | ||||
| -rw-r--r-- | src/code/sys_math3d.c | 9 | ||||
| -rw-r--r-- | src/code/z_camera.c | 5 | ||||
| -rw-r--r-- | src/code/z_debug_mode.c | 7 | ||||
| -rw-r--r-- | src/code/z_elf_message.c | 5 | ||||
| -rw-r--r-- | src/code/z_eventmgr.c | 6 | ||||
| -rw-r--r-- | src/code/z_inventory.c | 10 | ||||
| -rw-r--r-- | src/code/z_kankyo.c | 1 | ||||
| -rw-r--r-- | src/code/z_message.c | 2 | ||||
| -rw-r--r-- | src/code/z_olib.c | 5 | ||||
| -rw-r--r-- | src/code/z_play.c | 1 | ||||
| -rw-r--r-- | src/code/z_quake.c | 1 | ||||
| -rw-r--r-- | src/code/z_rcp.c | 6 | ||||
| -rw-r--r-- | src/code/z_snap.c | 5 | ||||
| -rw-r--r-- | src/code/z_visfbuf.c | 4 | ||||
| -rw-r--r-- | src/code/z_vismono.c | 3 |
21 files changed, 88 insertions, 16 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c index 52a914a07..0a46b9ccc 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -15,6 +15,7 @@ #include "color.h" #include "macros.h" #include "gfx.h" +#include "gfxalloc.h" #include "slowly.h" #include "stack.h" #include "stackcheck.h" diff --git a/src/code/cutscene_camera.c b/src/code/cutscene_camera.c index 20406e60a..b560e9c95 100644 --- a/src/code/cutscene_camera.c +++ b/src/code/cutscene_camera.c @@ -1,6 +1,9 @@ #include "global.h" + #include "string.h" +#include "z64olib.h" + CutsceneCamera* sCurCsCamera; typedef s16 (*CsCamInterpolateCallback)(Vec3f*, f32*, s16*, CsCmdCamPoint*, CsCmdCamMisc*, CutsceneCameraInterp*); diff --git a/src/code/flg_set.c b/src/code/flg_set.c index b964bba80..249860329 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -11,6 +11,8 @@ */ #include "flg_set.h" + +#include "gfxalloc.h" #include "global.h" #include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" diff --git a/src/code/game.c b/src/code/game.c index 90b9b106b..69131cc70 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -1,14 +1,21 @@ +#include "z64game.h" + #include "global.h" #include "audiomgr.h" +#include "debug.h" +#include "gfx.h" +#include "gfxalloc.h" #include "idle.h" +#include "regs.h" #include "sys_cfb.h" #include "libc64/malloc.h" + #include "z64debug_text.h" +#include "z64pause_menu.h" #include "z64rumble.h" #include "z64speed_meter.h" #include "z64vimode.h" #include "z64vis.h" -#include "debug.h" s32 gFramerateDivisor = 1; f32 gFramerateDivisorF = 1.0f; diff --git a/src/code/gfxalloc.c b/src/code/gfxalloc.c index 07070e964..2af4926ba 100644 --- a/src/code/gfxalloc.c +++ b/src/code/gfxalloc.c @@ -1,4 +1,6 @@ -#include "global.h" +#include "gfxalloc.h" + +#include "alignment.h" Gfx* Gfx_Open(Gfx* gfx) { return &gfx[1]; diff --git a/src/code/graph.c b/src/code/graph.c index 2be2d9de8..7fa6e505f 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -1,14 +1,17 @@ -#include "z64.h" -#include "regs.h" -#include "fault.h" +#include "ultra64.h" + +#include "scheduler.h" // Variables are put before most headers as a hacky way to bypass bss reordering -FaultAddrConvClient sGraphFaultAddrConvClient; -FaultClient sGraphFaultClient; -GfxMasterList* gGfxMasterDL; +struct FaultAddrConvClient sGraphFaultAddrConvClient; +struct FaultClient sGraphFaultClient; +struct GfxMasterList* gGfxMasterDL; CfbInfo sGraphCfbInfos[3]; OSTime sGraphPrevUpdateEndTime; +#include "regs.h" +#include "fault.h" + #include "macros.h" #include "buffers.h" #include "idle.h" diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index 4e9bcdc05..d770a0d73 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -1,6 +1,6 @@ #include "prevent_bss_reordering2.h" // bumps the bss index by 65 // clang-format off -// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 56 +// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 59 struct Dummy200 { int x; }; struct Dummy201 { int x; }; struct Dummy202 { int x; }; @@ -29,12 +29,15 @@ struct Dummy224 { int x; }; struct Dummy225 { int x; }; struct Dummy226 { int x; }; struct Dummy227 { int x; }; +struct Dummy228 { int x; }; +typedef int Dummy229; + // clang-format on -// Headers are currently valued at 63 mod 256 (./tools/calc_bss.sh <headers>) +// Headers are currently valued at 60 mod 256 (./tools/calc_bss.sh <headers>) #include "z64math.h" -#include "libc/stdbool.h" +#include "stdbool.h" #include "PR/gu.h" // The bss index at this point should be 184 diff --git a/src/code/z_camera.c b/src/code/z_camera.c index af7934490..58f57cd93 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -43,12 +43,17 @@ * */ +#include "z64camera.h" + #include "global.h" #include "string.h" + #include "z64malloc.h" +#include "z64olib.h" #include "z64quake.h" #include "z64shrink_window.h" #include "z64view.h" + #include "overlays/actors/ovl_En_Horse/z_en_horse.h" void func_800DDFE0(Camera* camera); diff --git a/src/code/z_debug_mode.c b/src/code/z_debug_mode.c index 9e9c2abba..ae4c877ce 100644 --- a/src/code/z_debug_mode.c +++ b/src/code/z_debug_mode.c @@ -1,5 +1,10 @@ #include "z64debug_text.h" -#include "global.h" + +#include "color.h" +#include "gfx.h" +#include "gfxalloc.h" +#include "gfxprint.h" +#include "macros.h" typedef struct { /* 0x0 */ u8 colorIndex; diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c index a7e97c3bd..029b07fa1 100644 --- a/src/code/z_elf_message.c +++ b/src/code/z_elf_message.c @@ -7,7 +7,12 @@ * which hint to give based on a script. * That system has been replaced with a single function that hardcodes the checks. */ + +#include "z64elf_message.h" + #include "global.h" +#include "z64save.h" +#include "z64scene.h" /** * Gets the relevant text ID for Tatl hints in first cycle. diff --git a/src/code/z_eventmgr.c b/src/code/z_eventmgr.c index 6c629cf5e..ed112e8c6 100644 --- a/src/code/z_eventmgr.c +++ b/src/code/z_eventmgr.c @@ -4,9 +4,13 @@ * Manages all cutscenes except for manual */ +#include "z64cutscene.h" + +#include "string.h" + #include "global.h" +#include "z64olib.h" #include "z64shrink_window.h" -#include "string.h" CutsceneEntry sGlobalCutsceneList[] = { // CS_ID_GLOBAL_78 diff --git a/src/code/z_inventory.c b/src/code/z_inventory.c index 69fcdcc0d..d0b50a5be 100644 --- a/src/code/z_inventory.c +++ b/src/code/z_inventory.c @@ -1,4 +1,14 @@ +#include "z64inventory.h" + #include "global.h" +#include "regs.h" + +#include "z64item.h" +#include "z64interface.h" +#include "z64player.h" +#include "z64save.h" +#include "z64scene.h" + #include "interface/parameter_static/parameter_static.h" #include "archives/icon_item_static/icon_item_static_yar.h" #include "archives/icon_item_24_static/icon_item_24_static_yar.h" diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index b57605668..3a0d12670 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -61,6 +61,7 @@ Gfx* sSkyboxStarsDList; #include "z64environment.h" +#include "gfxalloc.h" #include "global.h" #include "string.h" #include "sys_cfb.h" diff --git a/src/code/z_message.c b/src/code/z_message.c index 7fed4ade4..48bf47920 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -2,10 +2,12 @@ #include "z64message.h" #include "global.h" +#include "gfxalloc.h" #include "message_data_static.h" #include "padmgr.h" #include "sys_cmpdma.h" #include "segment_symbols.h" + #include "z64actor.h" #include "z64horse.h" #include "z64shrink_window.h" diff --git a/src/code/z_olib.c b/src/code/z_olib.c index 86fa656f9..32ea40dd6 100644 --- a/src/code/z_olib.c +++ b/src/code/z_olib.c @@ -1,4 +1,7 @@ -#include "global.h" +#include "z64olib.h" + +#include "macros.h" +#include "z64camera.h" /** * Calculates the distances between `a` and `b` diff --git a/src/code/z_play.c b/src/code/z_play.c index af7b40426..188336c00 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -16,6 +16,7 @@ u8 sMotionBlurStatus; #include "z64play.h" #include "buffers.h" +#include "gfxalloc.h" #include "idle.h" #include "regs.h" #include "sys_cfb.h" diff --git a/src/code/z_quake.c b/src/code/z_quake.c index 37b51df70..aad0bde12 100644 --- a/src/code/z_quake.c +++ b/src/code/z_quake.c @@ -3,6 +3,7 @@ #include "string.h" #include "global.h" +#include "z64olib.h" #include "z64view.h" typedef struct { diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 31bc01942..5636e9656 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -1,6 +1,12 @@ +#include "gfx.h" + #include "global.h" +#include "gfxalloc.h" +#include "regs.h" #include "sys_cfb.h" +#include "z64pause_menu.h" + Gfx gSetupDLs[SETUPDL_MAX][6] = { { /* SETUPDL_0 */ diff --git a/src/code/z_snap.c b/src/code/z_snap.c index cd5a03704..6bd2a05f2 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -1,5 +1,8 @@ -#include "global.h" #include "z64snap.h" + +#include "global.h" +#include "z64olib.h" + #include "overlays/actors/ovl_En_Kakasi/z_en_kakasi.h" #define PICTO_SEEN_IN_SCENE 1 diff --git a/src/code/z_visfbuf.c b/src/code/z_visfbuf.c index 86a8c0d31..f875a3a67 100644 --- a/src/code/z_visfbuf.c +++ b/src/code/z_visfbuf.c @@ -10,8 +10,10 @@ * VisFbuf_Draw() for how to do this. */ -#include "global.h" #include "z64visfbuf.h" + +#include "gfxalloc.h" +#include "global.h" #include "sys_cfb.h" #include "sys_ucode.h" diff --git a/src/code/z_vismono.c b/src/code/z_vismono.c index c898882b1..ba15bccd0 100644 --- a/src/code/z_vismono.c +++ b/src/code/z_vismono.c @@ -7,7 +7,10 @@ * color palette that converts each color into the desaturated equivalent. More precise details can be found in inline * comments. */ + #include "z64vis.h" + +#include "gfxalloc.h" #include "global.h" #include "libc64/malloc.h" |
