diff options
| author | mzxrules <mzxrules@gmail.com> | 2025-01-27 13:01:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-27 13:01:54 -0500 |
| commit | d855f2bfd83a904cffc0243fdac0d83dd294b278 (patch) | |
| tree | 6f60c5ee4dadea5d13d452bd2788e0617a90030c /include | |
| parent | 7dd3a833130cc428d440fea4c38a6870f9276fad (diff) | |
Split z64debug_display.h, z64draw.h, z_en_item00.h (#2443)
* z64debug_display.h
* z64draw.h
* z_en_item00.h
* bss
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 10 | ||||
| -rw-r--r-- | include/z64.h | 12 | ||||
| -rw-r--r-- | include/z64actor.h | 48 | ||||
| -rw-r--r-- | include/z64debug_display.h | 27 | ||||
| -rw-r--r-- | include/z64draw.h | 10 | ||||
| -rw-r--r-- | include/z_en_item00.h | 59 |
6 files changed, 99 insertions, 67 deletions
diff --git a/include/functions.h b/include/functions.h index 758f94648..d861112d4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -27,10 +27,6 @@ NORETURN void func_80002384(const char* exp, const char* file, int line); OSPiHandle* osDriveRomInit(void); void Mio0_Decompress(u8* src, u8* dst); -EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params); -EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params); -void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params); - void FlagSet_Update(PlayState* play); void Overlay_LoadGameState(GameStateOverlay* overlayEntry); void Overlay_FreeGameState(GameStateOverlay* overlayEntry); @@ -48,14 +44,8 @@ void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text); void Regs_UpdateEditor(Input* input); #endif void Debug_DrawText(GraphicsContext* gfxCtx); -void DebugDisplay_Init(void); -DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX, - f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type, - GraphicsContext* gfxCtx); -void DebugDisplay_DrawObjects(PlayState* play); void* MemCpy(void* dest, const void* src, s32 len); -void GetItem_Draw(PlayState* play, s16 drawId); u16 QuestHint_GetSariaTextId(PlayState* play); u16 QuestHint_GetNaviTextId(PlayState* play); diff --git a/include/z64.h b/include/z64.h index 625d61564..f0ac7d547 100644 --- a/include/z64.h +++ b/include/z64.h @@ -87,6 +87,9 @@ #include "libc64/sleep.h" #include "libc64/sprintf.h" #include "libu64/debug.h" +#include "z64debug_display.h" +#include "z64draw.h" +#include "z_en_item00.h" #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 @@ -308,15 +311,6 @@ typedef struct PreNMIState { /* 0xA8 */ UNK_TYPE4 unk_A8; } PreNMIState; // size = 0xAC -typedef struct DebugDispObject { - /* 0x00 */ Vec3f pos; - /* 0x0C */ Vec3s rot; - /* 0x14 */ Vec3f scale; - /* 0x20 */ Color_RGBA8 color; - /* 0x24 */ s16 type; - /* 0x28 */ struct DebugDispObject* next; -} DebugDispObject; // size = 0x2C - typedef struct ISVDbg { /* 0x00 */ u32 magic; // IS64 /* 0x04 */ u32 get; diff --git a/include/z64actor.h b/include/z64actor.h index cf93af0a9..38132540a 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -362,54 +362,6 @@ typedef struct BodyBreak { #define BODYBREAK_STATUS_READY -1 #define BODYBREAK_STATUS_FINISHED 0 -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_SINGLE, - /* 0x06 */ ITEM00_HEART_PIECE, - /* 0x07 */ ITEM00_HEART_CONTAINER, - /* 0x08 */ ITEM00_ARROWS_SMALL, - /* 0x09 */ ITEM00_ARROWS_MEDIUM, - /* 0x0A */ ITEM00_ARROWS_LARGE, - /* 0x0B */ ITEM00_BOMBS_B, - /* 0x0C */ ITEM00_NUTS, - /* 0x0D */ ITEM00_STICK, - /* 0x0E */ ITEM00_MAGIC_LARGE, - /* 0x0F */ ITEM00_MAGIC_SMALL, - /* 0x10 */ ITEM00_SEEDS, - /* 0x11 */ ITEM00_SMALL_KEY, - /* 0x12 */ ITEM00_FLEXIBLE, - /* 0x13 */ ITEM00_RUPEE_ORANGE, - /* 0x14 */ ITEM00_RUPEE_PURPLE, - /* 0x15 */ ITEM00_SHIELD_DEKU, - /* 0x16 */ ITEM00_SHIELD_HYLIAN, - /* 0x17 */ ITEM00_TUNIC_ZORA, - /* 0x18 */ ITEM00_TUNIC_GORON, - /* 0x19 */ ITEM00_BOMBS_SPECIAL, - /* 0x1A */ ITEM00_MAX, - /* 0xFF */ ITEM00_NONE = 0xFF -} Item00Type; - -struct EnItem00; - -typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*); - -typedef struct EnItem00 { - /* 0x000 */ Actor actor; - /* 0x14C */ EnItem00ActionFunc actionFunc; - /* 0x150 */ s16 collectibleFlag; - /* 0x152 */ s16 getItemId; - /* 0x154 */ s16 unk_154; - /* 0x156 */ s16 unk_156; - /* 0x158 */ s16 unk_158; - /* 0x15A */ s16 despawnTimer; - /* 0x15C */ f32 scale; - /* 0x160 */ ColliderCylinder collider; -} EnItem00; // size = 0x1AC - // Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files. typedef enum AObjType { /* 0x00 */ A_OBJ_BLOCK_SMALL, diff --git a/include/z64debug_display.h b/include/z64debug_display.h new file mode 100644 index 000000000..9cb119806 --- /dev/null +++ b/include/z64debug_display.h @@ -0,0 +1,27 @@ +#ifndef Z64_DEBUG_DISPLAY_H +#define Z64_DEBUG_DISPLAY_H + +#include "ultra64.h" +#include "z64math.h" +#include "color.h" + +struct GraphicsContext; +struct PlayState; + +typedef struct DebugDispObject { + /* 0x00 */ Vec3f pos; + /* 0x0C */ Vec3s rot; + /* 0x14 */ Vec3f scale; + /* 0x20 */ Color_RGBA8 color; + /* 0x24 */ s16 type; + /* 0x28 */ struct DebugDispObject* next; +} DebugDispObject; // size = 0x2C + +void DebugDisplay_Init(void); +DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX, + f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type, + struct GraphicsContext* gfxCtx); +void DebugDisplay_DrawObjects(struct PlayState* play); + + +#endif diff --git a/include/z64draw.h b/include/z64draw.h new file mode 100644 index 000000000..51250ed8c --- /dev/null +++ b/include/z64draw.h @@ -0,0 +1,10 @@ +#ifndef Z64_DRAW_H +#define Z64_DRAW_H + +#include "ultra64.h" + +struct PlayState; + +void GetItem_Draw(struct PlayState* play, s16 drawId); + +#endif diff --git a/include/z_en_item00.h b/include/z_en_item00.h new file mode 100644 index 000000000..483f666f5 --- /dev/null +++ b/include/z_en_item00.h @@ -0,0 +1,59 @@ +#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_SINGLE, + /* 0x06 */ ITEM00_HEART_PIECE, + /* 0x07 */ ITEM00_HEART_CONTAINER, + /* 0x08 */ ITEM00_ARROWS_SMALL, + /* 0x09 */ ITEM00_ARROWS_MEDIUM, + /* 0x0A */ ITEM00_ARROWS_LARGE, + /* 0x0B */ ITEM00_BOMBS_B, + /* 0x0C */ ITEM00_NUTS, + /* 0x0D */ ITEM00_STICK, + /* 0x0E */ ITEM00_MAGIC_LARGE, + /* 0x0F */ ITEM00_MAGIC_SMALL, + /* 0x10 */ ITEM00_SEEDS, + /* 0x11 */ ITEM00_SMALL_KEY, + /* 0x12 */ ITEM00_FLEXIBLE, + /* 0x13 */ ITEM00_RUPEE_ORANGE, + /* 0x14 */ ITEM00_RUPEE_PURPLE, + /* 0x15 */ ITEM00_SHIELD_DEKU, + /* 0x16 */ ITEM00_SHIELD_HYLIAN, + /* 0x17 */ ITEM00_TUNIC_ZORA, + /* 0x18 */ ITEM00_TUNIC_GORON, + /* 0x19 */ ITEM00_BOMBS_SPECIAL, + /* 0x1A */ ITEM00_MAX, + /* 0xFF */ ITEM00_NONE = 0xFF +} Item00Type; + +struct EnItem00; + +typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*); + +typedef struct EnItem00 { + /* 0x000 */ Actor actor; + /* 0x14C */ EnItem00ActionFunc actionFunc; + /* 0x150 */ s16 collectibleFlag; + /* 0x152 */ s16 getItemId; + /* 0x154 */ s16 unk_154; + /* 0x156 */ s16 unk_156; + /* 0x158 */ s16 unk_158; + /* 0x15A */ s16 despawnTimer; + /* 0x15C */ f32 scale; + /* 0x160 */ ColliderCylinder collider; +} EnItem00; // size = 0x1AC + +EnItem00* Item_DropCollectible(struct PlayState* play, Vec3f* spawnPos, s16 params); +EnItem00* Item_DropCollectible2(struct PlayState* play, Vec3f* spawnPos, s16 params); +void Item_DropCollectibleRandom(struct PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params); + +#endif |
