diff options
| author | mzxrules <mzxrules@gmail.com> | 2026-08-30 09:56:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-30 09:56:09 -0400 |
| commit | 49afa18da04e797217536bb473edbf054bd9e36e (patch) | |
| tree | aaaefaafb0621c1cf7020df6a96780d40989d86a /include | |
| parent | ff5b97216d5f6f6a43cb0677b2248f6c2bb65c1d (diff) | |
split headers z_en_item00.h, z_en_a_keep.h, z64draw.h (#1897)
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 9 | ||||
| -rw-r--r-- | include/z64actor.h | 82 | ||||
| -rw-r--r-- | include/z64draw.h | 8 | ||||
| -rw-r--r-- | include/z_en_a_keep.h | 28 | ||||
| -rw-r--r-- | include/z_en_item00.h | 70 |
5 files changed, 109 insertions, 88 deletions
diff --git a/include/functions.h b/include/functions.h index 573dfff44..7f80f741e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -3,19 +3,10 @@ #include "z64.h" -Actor* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, u32 params); -Actor* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s32 params); -void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params); -s32 func_800A8150(s32 index); -s32 func_800A817C(s32 index); -bool Item_CanDropBigFairy(PlayState* play, s32 index, s32 collectibleFlag); - // Ideally these two prototypes would be in z64actor.h, but they use PlayerItemAction which would require including z64player.h there. s32 Actor_OfferTalkExchange(Actor* actor, struct PlayState* play, f32 xzRange, f32 yRange, PlayerItemAction exchangeItemAction); s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, struct PlayState* play, f32 radius, PlayerItemAction exchangeItemAction); -void GetItem_Draw(PlayState* play, s16 drawId); - void Room_Noop(PlayState* play, Room* room, Input* input, s32 arg3); void Room_Init(PlayState* play, RoomContext* roomCtx); size_t Room_SetupFirstRoom(PlayState* play, RoomContext* roomCtx); diff --git a/include/z64actor.h b/include/z64actor.h index 94f74f70e..9a2053432 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 @@ -179,82 +179,6 @@ typedef struct DynaPolyActor { /* 0x158 */ u8 interactFlags; } DynaPolyActor; // size = 0x15C -typedef enum Item00Type { - /* 0x00 */ ITEM00_RUPEE_GREEN, - /* 0x01 */ ITEM00_RUPEE_BLUE, - /* 0x02 */ ITEM00_RUPEE_RED, - /* 0x03 */ ITEM00_RECOVERY_HEART, - /* 0x04 */ ITEM00_BOMBS_A, - /* 0x05 */ ITEM00_ARROWS_10, - /* 0x06 */ ITEM00_HEART_PIECE, - /* 0x07 */ ITEM00_HEART_CONTAINER, - /* 0x08 */ ITEM00_ARROWS_30, - /* 0x09 */ ITEM00_ARROWS_40, - /* 0x0A */ ITEM00_ARROWS_50, - /* 0x0B */ ITEM00_BOMBS_B, - /* 0x0C */ ITEM00_DEKU_NUTS_1, - /* 0x0D */ ITEM00_DEKU_STICK, - /* 0x0E */ ITEM00_MAGIC_JAR_BIG, - /* 0x0F */ ITEM00_MAGIC_JAR_SMALL, - /* 0x10 */ ITEM00_MASK, - /* 0x11 */ ITEM00_SMALL_KEY, - /* 0x12 */ ITEM00_FLEXIBLE, - /* 0x13 */ ITEM00_RUPEE_HUGE, - /* 0x14 */ ITEM00_RUPEE_PURPLE, - /* 0x15 */ ITEM00_3_HEARTS, - /* 0x16 */ ITEM00_SHIELD_HERO, - /* 0x17 */ ITEM00_DEKU_NUTS_10, - /* 0x18 */ ITEM00_NOTHING, - /* 0x19 */ ITEM00_BOMBS_0, - /* 0x1A */ ITEM00_BIG_FAIRY, - /* 0x1B */ ITEM00_MAP, - /* 0x1C */ ITEM00_COMPASS, - /* 0x1D */ ITEM00_MUSHROOM_CLOUD, - - /* 0xFF */ ITEM00_NO_DROP = -1 -} Item00Type; - -struct EnItem00; - -typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*); - -#define ENITEM00_GET_8000(thisx) ((thisx)->params & 0x8000) -#define ENITEM00_GET_7F00(thisx) (((thisx)->params & 0x7F00) >> 8) - -typedef struct EnItem00 { - /* 0x000 */ Actor actor; - /* 0x144 */ EnItem00ActionFunc actionFunc; - /* 0x148 */ s16 collectibleFlag; - /* 0x14A */ s16 getItemId; - /* 0x14C */ s16 unk14C; - /* 0x14E */ s16 unk14E; - /* 0x150 */ s16 unk150; - /* 0x152 */ s16 unk152; - /* 0x154 */ f32 unk154; - /* 0x158 */ ColliderCylinder collider; - /* 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/z64draw.h b/include/z64draw.h new file mode 100644 index 000000000..0f9b79f93 --- /dev/null +++ b/include/z64draw.h @@ -0,0 +1,8 @@ +#ifndef Z64_DRAW_H +#define Z64_DRAW_H + +#include "ultra64.h" + +void GetItem_Draw(struct PlayState* play, s16 drawId); + +#endif diff --git a/include/z_en_a_keep.h b/include/z_en_a_keep.h new file mode 100644 index 000000000..5a48b331f --- /dev/null +++ b/include/z_en_a_keep.h @@ -0,0 +1,28 @@ +#ifndef Z_EN_A_KEEP_H +#define Z_EN_A_KEEP_H + +#include "z64actor.h" +#include "z64collision_check.h" + +struct EnAObj; +struct PlayState; + +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)) + +#endif diff --git a/include/z_en_item00.h b/include/z_en_item00.h new file mode 100644 index 000000000..c849a268b --- /dev/null +++ b/include/z_en_item00.h @@ -0,0 +1,70 @@ +#ifndef Z_EN_ITEM00_H +#define Z_EN_ITEM00_H + +#include "ultra64.h" +#include "z64actor.h" + +typedef enum Item00Type { + /* 0x00 */ ITEM00_RUPEE_GREEN, + /* 0x01 */ ITEM00_RUPEE_BLUE, + /* 0x02 */ ITEM00_RUPEE_RED, + /* 0x03 */ ITEM00_RECOVERY_HEART, + /* 0x04 */ ITEM00_BOMBS_A, + /* 0x05 */ ITEM00_ARROWS_10, + /* 0x06 */ ITEM00_HEART_PIECE, + /* 0x07 */ ITEM00_HEART_CONTAINER, + /* 0x08 */ ITEM00_ARROWS_30, + /* 0x09 */ ITEM00_ARROWS_40, + /* 0x0A */ ITEM00_ARROWS_50, + /* 0x0B */ ITEM00_BOMBS_B, + /* 0x0C */ ITEM00_DEKU_NUTS_1, + /* 0x0D */ ITEM00_DEKU_STICK, + /* 0x0E */ ITEM00_MAGIC_JAR_BIG, + /* 0x0F */ ITEM00_MAGIC_JAR_SMALL, + /* 0x10 */ ITEM00_MASK, + /* 0x11 */ ITEM00_SMALL_KEY, + /* 0x12 */ ITEM00_FLEXIBLE, + /* 0x13 */ ITEM00_RUPEE_HUGE, + /* 0x14 */ ITEM00_RUPEE_PURPLE, + /* 0x15 */ ITEM00_3_HEARTS, + /* 0x16 */ ITEM00_SHIELD_HERO, + /* 0x17 */ ITEM00_DEKU_NUTS_10, + /* 0x18 */ ITEM00_NOTHING, + /* 0x19 */ ITEM00_BOMBS_0, + /* 0x1A */ ITEM00_BIG_FAIRY, + /* 0x1B */ ITEM00_MAP, + /* 0x1C */ ITEM00_COMPASS, + /* 0x1D */ ITEM00_MUSHROOM_CLOUD, + + /* 0xFF */ ITEM00_NO_DROP = -1 +} Item00Type; + +struct EnItem00; + +typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*); + +#define ENITEM00_GET_8000(thisx) ((thisx)->params & 0x8000) +#define ENITEM00_GET_7F00(thisx) (((thisx)->params & 0x7F00) >> 8) + +typedef struct EnItem00 { + /* 0x000 */ Actor actor; + /* 0x144 */ EnItem00ActionFunc actionFunc; + /* 0x148 */ s16 collectibleFlag; + /* 0x14A */ s16 getItemId; + /* 0x14C */ s16 unk14C; + /* 0x14E */ s16 unk14E; + /* 0x150 */ s16 unk150; + /* 0x152 */ s16 unk152; + /* 0x154 */ f32 unk154; + /* 0x158 */ ColliderCylinder collider; + /* 0x1A4 */ s8 unk1A4; +} EnItem00; // size = 0x1A8 + +Actor* Item_DropCollectible(struct PlayState* play, Vec3f* spawnPos, u32 params); +Actor* Item_DropCollectible2(struct PlayState* play, Vec3f* spawnPos, s32 params); +void Item_DropCollectibleRandom(struct PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params); +s32 func_800A8150(s32 index); +s32 func_800A817C(s32 index); +bool Item_CanDropBigFairy(struct PlayState* play, s32 index, s32 collectibleFlag); + +#endif |
