diff --git a/include/z64actor.h b/include/z64actor.h index ef4e113110..a590e65d3b 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -76,9 +76,9 @@ typedef struct { #define BGCHECKFLAG_GROUND_STRICT (1 << 7) // Similar to BGCHECKFLAG_GROUND but with no velocity check and is cleared every frame #define BGCHECKFLAG_CRUSHED (1 << 8) // Crushed between a floor and ceiling (triggers a void for player) #define BGCHECKFLAG_PLAYER_WALL_INTERACT (1 << 9) // Only set/used by player, related to interacting with walls -#define BGCHECKFLAG_PLAYER_400 (1 << 10) // -#define BGCHECKFLAG_PLAYER_800 (1 << 11) // -#define BGCHECKFLAG_PLAYER_1000 (1 << 12) // +#define BGCHECKFLAG_PLAYER_400 (1 << 10) // +#define BGCHECKFLAG_PLAYER_800 (1 << 11) // +#define BGCHECKFLAG_PLAYER_1000 (1 << 12) // // Flags for Actor_UpdateBgCheckInfo #define UPDBGCHECKINFO_FLAG_1 (1 << 0) // check wall @@ -235,26 +235,6 @@ typedef struct EnItem00 { /* 0x1A4 */ s8 unk1A4; } EnItem00; // size = 0x1A8 -struct EnAObj; - -typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*); - -typedef struct EnAObj { - /* 0x000 */ Actor actor; - /* 0x144 */ EnAObjActionFunc actionFunc; - /* 0x148 */ ColliderCylinder collision; -} EnAObj; // size = 0x194 - -typedef enum { - /* 0 */ AOBJ_SIGNPOST_OBLONG, - /* 1 */ AOBJ_SIGNPOST_ARROW -} AObjType; - -#define AOBJ_GET_TEXTID(thisx) ((((thisx)->params >> 8) & 0xFF) | 0x300) -#define AOBJ_GET_TYPE(thisx) (((thisx)->params & 0xFF) - 9) - -#define AOBJ_PARAMS(textId, type) ((((textId - 0x300) & 0xFF) << 8) | (type + 9)) - typedef enum { /* 0x00 */ ACTORCAT_SWITCH, /* 0x01 */ ACTORCAT_BG, diff --git a/include/z_en_a_obj.h b/include/z_en_a_obj.h new file mode 100644 index 0000000000..5c1b22b7c5 --- /dev/null +++ b/include/z_en_a_obj.h @@ -0,0 +1,26 @@ +#ifndef Z_EN_A_OBJ_H +#define Z_EN_A_OBJ_H + +#include "z64actor.h" + +typedef enum { + /* 0 */ AOBJ_SIGNPOST_OBLONG, + /* 1 */ AOBJ_SIGNPOST_ARROW +} AObjType; + +struct EnAObj; + +typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*); + +typedef struct EnAObj { + /* 0x000 */ Actor actor; + /* 0x144 */ EnAObjActionFunc actionFunc; + /* 0x148 */ ColliderCylinder collision; +} EnAObj; // size = 0x194 + +#define AOBJ_GET_TEXTID(thisx) ((((thisx)->params >> 8) & 0xFF) | 0x300) +#define AOBJ_GET_TYPE(thisx) (((thisx)->params & 0xFF) - 9) + +#define AOBJ_PARAMS(textId, type) ((((textId - 0x300) & 0xFF) << 8) | (type + 9)) + +#endif diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 92b1d4b67f..1d164b55be 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -1,3 +1,8 @@ +#include "z_en_a_obj.h" +#include "gfx.h" +#include "ichain.h" +#include "z64play.h" + #include "global.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"