From ab37332793161e1731176588fd901c0d90461f74 Mon Sep 17 00:00:00 2001 From: mzxrules Date: Thu, 23 Jan 2025 14:39:23 -0500 Subject: [PATCH] Reduce overlay dependencies on global.h (1) (#2438) * Reduce actor dependencies on global.h * move dependency on z64play.h into the .c files * add some missing dependencies --- include/{speedmeter.h => speed_meter.h} | 0 include/z64.h | 2 +- src/code/z_env_flags.c | 3 ++- src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c | 12 ++++++++++++ src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h | 5 +++-- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 4 ++++ .../actors/ovl_Arrow_Fire/z_arrow_fire.h | 4 ++-- src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c | 5 ++++- src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h | 4 ++-- .../actors/ovl_Arrow_Light/z_arrow_light.c | 5 ++++- .../actors/ovl_Arrow_Light/z_arrow_light.h | 4 ++-- .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 11 +++++++++++ .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h | 4 ++-- .../actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c | 10 ++++++++++ .../actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h | 4 ++-- .../actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c | 6 +++++- .../actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h | 4 ++-- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 12 +++++++++++- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h | 4 ++-- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 12 ++++++++++++ src/overlays/actors/ovl_En_Bom/z_en_bom.h | 2 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 15 +++++++++++++-- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h | 4 ++-- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 9 +++++++-- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h | 4 ++-- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 14 ++++++++++++++ .../actors/ovl_En_Bom_Chu/z_en_bom_chu.h | 4 ++-- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 14 +++++++++++++- .../actors/ovl_En_Ex_Item/z_en_ex_item.h | 6 +++--- .../actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c | 16 +++++++++++++++- .../actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h | 4 ++-- .../actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c | 13 +++++++++++-- .../actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h | 4 ++-- .../z_eff_ss_dead_sound.c | 3 +++ .../z_eff_ss_dead_sound.h | 2 +- .../effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c | 10 ++++++++++ .../effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h | 2 +- .../misc/ovl_map_mark_data/z_map_mark_data.c | 2 +- .../misc/ovl_map_mark_data/z_map_mark_data_mq.c | 2 +- 39 files changed, 197 insertions(+), 48 deletions(-) rename include/{speedmeter.h => speed_meter.h} (100%) diff --git a/include/speedmeter.h b/include/speed_meter.h similarity index 100% rename from include/speedmeter.h rename to include/speed_meter.h diff --git a/include/z64.h b/include/z64.h index 5154001d2f..ecaa19715f 100644 --- a/include/z64.h +++ b/include/z64.h @@ -66,7 +66,7 @@ #include "mempak.h" #include "tha.h" #include "thga.h" -#include "speedmeter.h" +#include "speed_meter.h" #include "gfx.h" #include "gfx_setupdl.h" #include "gfxalloc.h" diff --git a/src/code/z_env_flags.c b/src/code/z_env_flags.c index 0057128e22..d277a5f752 100644 --- a/src/code/z_env_flags.c +++ b/src/code/z_env_flags.c @@ -1,4 +1,5 @@ -#include "global.h" +#include "ultra64.h" +#include "z64play.h" void CutsceneFlags_UnsetAll(PlayState* play) { u8 i; diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index c79f9b0aa1..f9c6f71d25 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -1,4 +1,16 @@ #include "z_arms_hook.h" + +#include "libc64/math64.h" +#include "controller.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "z64play.h" +#include "z64player.h" +#include "z_lib.h" + #include "assets/objects/object_link_boy/object_link_boy.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h index c1c5790fd9..ad50194506 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h @@ -2,11 +2,12 @@ #define Z_ARMS_HOOK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64player.h" struct ArmsHook; -typedef void (*ArmsHookActionFunc)(struct ArmsHook*, PlayState*); +typedef void (*ArmsHookActionFunc)(struct ArmsHook*, struct PlayState*); typedef struct ArmsHook { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 9fec296d7a..3b98443c8f 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -7,6 +7,10 @@ #include "z_arrow_fire.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" +#include "z64play.h" + +#include "global.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowFire_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h index 44af3decf3..a04b496a11 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h @@ -2,11 +2,11 @@ #define Z_ARROW_FIRE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ArrowFire; -typedef void (*ArrowFireActionFunc)(struct ArrowFire*, PlayState*); +typedef void (*ArrowFireActionFunc)(struct ArrowFire*, struct PlayState*); typedef struct ArrowFire { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 326486aee0..56cf6b170b 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -5,9 +5,12 @@ */ #include "z_arrow_ice.h" - #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" +#include "z64play.h" + +#include "global.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowIce_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h index 1a6ed24b36..7494aefa9d 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h @@ -2,11 +2,11 @@ #define Z_ARROW_ICE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ArrowIce; -typedef void (*ArrowIceActionFunc)(struct ArrowIce*, PlayState*); +typedef void (*ArrowIceActionFunc)(struct ArrowIce*, struct PlayState*); typedef struct ArrowIce { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 6922b5ba68..b241170027 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -5,9 +5,12 @@ */ #include "z_arrow_light.h" - #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" +#include "z64play.h" + +#include "global.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowLight_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h index 78bef515e5..ee4b678961 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h @@ -2,11 +2,11 @@ #define Z_ARROW_LIGHT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ArrowLight; -typedef void (*ArrowLightActionFunc)(struct ArrowLight*, PlayState*); +typedef void (*ArrowLightActionFunc)(struct ArrowLight*, struct PlayState*); typedef struct ArrowLight { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index bcc7651687..2548f33e10 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -5,7 +5,18 @@ */ #include "z_bg_bdan_objects.h" + +#include "ichain.h" +#include "one_point_cutscene.h" #include "quake.h" +#include "rumble.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_bdan_objects/object_bdan_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h index 6c802bb3f6..e8729bb983 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h @@ -2,7 +2,7 @@ #define Z_BG_BDAN_OBJECTS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgBdanObjects; @@ -13,7 +13,7 @@ typedef enum BgBdanObjectsType { JABU_OBJECTS_TYPE_FALLING_PLATFORM } BgBdanObjectsType; -typedef void (*BgBdanObjectsActionFunc)(struct BgBdanObjects*, PlayState*); +typedef void (*BgBdanObjectsActionFunc)(struct BgBdanObjects*, struct PlayState*); typedef struct BgBdanObjects { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index f09d24d536..a28786d50f 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -5,6 +5,16 @@ */ #include "z_bg_bdan_switch.h" + +#include "ichain.h" +#include "rumble.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_bdan_objects/object_bdan_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h index b7914a4f0d..e47a98e6c8 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h @@ -2,7 +2,7 @@ #define Z_BG_BDAN_SWITCH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum BgBdanSwitchType { /* 0x00 */ BLUE, @@ -14,7 +14,7 @@ typedef enum BgBdanSwitchType { struct BgBdanSwitch; -typedef void (*BgBdanSwitchActionFunc)(struct BgBdanSwitch*, PlayState*); +typedef void (*BgBdanSwitchActionFunc)(struct BgBdanSwitch*, struct PlayState*); typedef struct BgBdanSwitch { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c index cfbd466021..ae816120b4 100644 --- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c +++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c @@ -6,8 +6,12 @@ #include "z_bg_bom_guard.h" #include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h" -#include "assets/objects/object_bowl/object_bowl.h" + +#include "regs.h" #include "terminal.h" +#include "z64play.h" + +#include "assets/objects/object_bowl/object_bowl.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h index 9df9ab2670..47e167de8a 100644 --- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h +++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h @@ -2,11 +2,11 @@ #define Z_BG_BOM_GUARD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgBomGuard; -typedef void (*BgBomGuardActionFunc)(struct BgBomGuard*, PlayState*); +typedef void (*BgBomGuardActionFunc)(struct BgBomGuard*, struct PlayState*); typedef struct BgBomGuard { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index a43804fa93..377efc13e8 100644 --- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -7,9 +7,19 @@ #include "z_bg_bowl_wall.h" #include "overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#include "assets/objects/object_bowl/object_bowl.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sfx.h" #include "quake.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + +#include "assets/objects/object_bowl/object_bowl.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h index 12a4bdf3a4..ac743fe7f1 100644 --- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h +++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h @@ -2,12 +2,12 @@ #define Z_BG_BOWL_WALL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h" struct BgBowlWall; -typedef void (*BgBowlWallActionFunc)(struct BgBowlWall*, PlayState*); +typedef void (*BgBowlWallActionFunc)(struct BgBowlWall*, struct PlayState*); typedef struct BgBowlWall { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index a542cbfcb0..7fefe03243 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -6,6 +6,18 @@ #include "z_en_bom.h" #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rumble.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.h b/src/overlays/actors/ovl_En_Bom/z_en_bom.h index df49b0ce1e..9fcb0fe029 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.h +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.h @@ -2,7 +2,7 @@ #define Z_EN_BOM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBom; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 4df7b35ce3..2935faa451 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -1,7 +1,18 @@ #include "z_en_bom_bowl_man.h" -#include "terminal.h" #include "overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h" -#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "terminal.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_bg/object_bg.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h index fada65b556..ffc4ae9efc 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h @@ -2,13 +2,13 @@ #define Z_EN_BOM_BOWL_MAN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" #include "overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h" struct EnBomBowlMan; -typedef void (*EnBomBowlManActionFunc)(struct EnBomBowlMan*, PlayState*); +typedef void (*EnBomBowlManActionFunc)(struct EnBomBowlMan*, struct PlayState*); typedef struct EnBomBowlMan { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index 17657586c9..81442e856a 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -1,7 +1,12 @@ #include "z_en_bom_bowl_pit.h" -#include "terminal.h" #include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h" -#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" + +#include "regs.h" +#include "sfx.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h index a4e838ff49..711518848f 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h @@ -2,12 +2,12 @@ #define Z_EN_BOM_BOWL_PIT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" struct EnBomBowlPit; -typedef void (*EnBomBowlPitActionFunc)(struct EnBomBowlPit*, PlayState*); +typedef void (*EnBomBowlPitActionFunc)(struct EnBomBowlPit*, struct PlayState*); typedef struct EnBomBowlPit { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 9f4263d8cd..8d1df99a4d 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -1,5 +1,19 @@ #include "z_en_bom_chu.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h index 7e2154a0a6..38ca8d20c6 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h @@ -2,11 +2,11 @@ #define Z_EN_BOM_CHU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBomChu; -typedef void (*EnBomChuActionFunc)(struct EnBomChu*, PlayState*); +typedef void (*EnBomChuActionFunc)(struct EnBomChu*, struct PlayState*); typedef struct EnBomChu { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index fea14bc560..4931fa6b65 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -6,8 +6,20 @@ #include "z_en_ex_item.h" #include "overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h" -#include "assets/objects/gameplay_keep/gameplay_keep.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" +#include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h index 1dd06afcbd..eba20bc116 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h @@ -2,12 +2,12 @@ #define Z_EN_EX_ITEM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnExItem; -typedef void (*EnExItemActionFunc)(struct EnExItem* this, PlayState* play); -typedef void (*EnExItemLightFunc)(Actor*, PlayState*, s32); +typedef void (*EnExItemActionFunc)(struct EnExItem* this, struct PlayState* play); +typedef void (*EnExItemLightFunc)(Actor*, struct PlayState*, s32); typedef struct EnExItem { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index 67d21f2311..a55d234477 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -5,8 +5,22 @@ */ #include "z_en_syateki_niw.h" -#include "assets/objects/object_niw/object_niw.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "z64.h" +#include "assets/objects/object_niw/object_niw.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h index 0ec9b9914a..37db3e65fd 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h @@ -2,11 +2,11 @@ #define Z_EN_SYATEKI_NIW_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSyatekiNiw; -typedef void (*EnSyatekiNiwActionFunc)(struct EnSyatekiNiw*, PlayState*); +typedef void (*EnSyatekiNiwActionFunc)(struct EnSyatekiNiw*, struct PlayState*); typedef struct EnSyatekiNiwEffect { /* 0x00 */ u8 state; diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c index 2824daa4cb..c650e79e85 100644 --- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c +++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c @@ -5,12 +5,21 @@ */ #include "z_en_wall_tubo.h" -#include "quake.h" -#include "terminal.h" #include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h" #include "overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" +#include "rand.h" +#include "regs.h" +#include "sfx.h" +#include "quake.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + +#include "global.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED void EnWallTubo_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h index 1e7eead00b..b2e9005372 100644 --- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h +++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h @@ -2,12 +2,12 @@ #define Z_EN_WALL_TUBO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h" struct EnWallTubo; -typedef void (*EnWallTuboActionFunc)(struct EnWallTubo*, PlayState*); +typedef void (*EnWallTuboActionFunc)(struct EnWallTubo*, struct PlayState*); typedef struct EnWallTubo { /* 0x0000 */ Actor actor; diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c index b1c92ec972..c0e0e9babb 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c @@ -5,6 +5,9 @@ */ #include "z_eff_ss_dead_sound.h" +#include "sfx.h" +#include "z64effect.h" +#include "z64play.h" #define rSfxId regs[10] #define rRepeatMode regs[11] // sound is replayed every update. unused in the original game diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h index cdb20f640b..1f8ca9304c 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h @@ -2,7 +2,7 @@ #define Z_EFF_SS_DEAD_SOUND_H #include "ultra64.h" -#include "global.h" +#include "z64math.h" typedef struct EffectSsDeadSoundInitParams { /* 0x00 */ Vec3f pos; diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c index 9b27081773..e084b5f1f6 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c +++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c @@ -5,6 +5,16 @@ */ #include "z_eff_ss_hahen.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define rPitch regs[0] diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h index 1385bee8c8..d598cebf5d 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h +++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h @@ -2,7 +2,7 @@ #define Z_EFF_SS_HAHEN_H #include "ultra64.h" -#include "global.h" +#include "z64math.h" typedef struct EffectSsHahenInitParams { /* 0x00 */ Vec3f pos; diff --git a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c index 013b8b7b31..48a18fff9d 100644 --- a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c +++ b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "z64map_mark.h" static MapMarkData sMapMarkDekuTree[] = { // Deku Tree minimap 0 diff --git a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c index 1fa95837a7..ba7517034c 100644 --- a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c +++ b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "z64map_mark.h" static MapMarkData sMapMarkDekuTree[] = { // Deku Tree minimap 0