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

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
This commit is contained in:
mzxrules 2025-01-23 14:39:23 -05:00 committed by GitHub
parent b97a21c253
commit ab37332793
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 197 additions and 48 deletions

View file

@ -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"

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "ultra64.h"
#include "z64play.h"
void CutsceneFlags_UnsetAll(PlayState* play) {
u8 i;

View file

@ -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)

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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)

View file

@ -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;

View file

@ -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)

View file

@ -2,7 +2,7 @@
#define Z_EN_BOM_H
#include "ultra64.h"
#include "global.h"
#include "z64actor.h"
struct EnBom;

View file

@ -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 \

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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)

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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]

View file

@ -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;

View file

@ -1,4 +1,4 @@
#include "global.h"
#include "z64map_mark.h"
static MapMarkData sMapMarkDekuTree[] = {
// Deku Tree minimap 0

View file

@ -1,4 +1,4 @@
#include "global.h"
#include "z64map_mark.h"
static MapMarkData sMapMarkDekuTree[] = {
// Deku Tree minimap 0