diff --git a/include/functions.h b/include/functions.h index 0313b9e233..61787d83a7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1742,9 +1742,6 @@ Path* Path_GetByIndex(PlayState* play, s16 index, s16 max); f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw); void Path_CopyLastPoint(Path* path, Vec3f* dest); -void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx); -s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input); - s32 func_801226E0(PlayState* play, s32 arg1); s32 func_80122744(PlayState* play, struct_80122744_arg1* arg1, u32 arg2, Vec3s* arg3); s32 func_80122760(PlayState* play, struct_80122744_arg1* arg1, f32 arg2); diff --git a/include/z64.h b/include/z64.h index d35265402a..028162a1e0 100644 --- a/include/z64.h +++ b/include/z64.h @@ -36,6 +36,7 @@ #include "z64dma.h" #include "z64eff_footmark.h" #include "z64effect.h" +#include "z64frameadvance.h" #include "z64interface.h" #include "z64item.h" #include "z64light.h" @@ -690,11 +691,6 @@ typedef struct { /* 0x1 */ u8 ambienceId; } SequenceContext; // size = 0x2 -typedef struct { - /* 0x0 */ s32 enabled; - /* 0x4 */ s32 timer; -} FrameAdvanceContext; // size = 0x8 - typedef enum { /* 0 */ GAMEOVER_INACTIVE, /* 1 */ GAMEOVER_DEATH_START, diff --git a/include/z64frameadvance.h b/include/z64frameadvance.h new file mode 100644 index 0000000000..c0feaed597 --- /dev/null +++ b/include/z64frameadvance.h @@ -0,0 +1,16 @@ +#ifndef Z64FRAMEADVANCE_H +#define Z64FRAMEADVANCE_H + +#include "ultra64.h" +#include "io/controller.h" + +typedef struct FrameAdvanceContext { + /* 0x0 */ s32 enabled; + /* 0x4 */ s32 timer; +} FrameAdvanceContext; // size = 0x8 + + +void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx); +s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input); + +#endif diff --git a/src/code/z_pause.c b/src/code/z_pause.c index bb5b33cf2f..5f212b7ae8 100644 --- a/src/code/z_pause.c +++ b/src/code/z_pause.c @@ -18,7 +18,9 @@ * * Note2: Controllers 2-4's inputs are normally zeroed out, so this would also need to be fixed to use frame advance */ -#include "global.h" + +#include "z64frameadvance.h" +#include "macros.h" void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) { frameAdvCtx->timer = 0;