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

Some files were not shown because too many files have changed in this diff Show More