mirror of
https://github.com/HackerN64/HackerOoT.git
synced 2026-01-21 10:37:37 -08:00
Split z64debug_display.h, z64draw.h, z_en_item00.h (#2443)
* z64debug_display.h * z64draw.h * z_en_item00.h * bss
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
27
include/z64debug_display.h
Normal file
27
include/z64debug_display.h
Normal file
@@ -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
|
||||
10
include/z64draw.h
Normal file
10
include/z64draw.h
Normal file
@@ -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
|
||||
59
include/z_en_item00.h
Normal file
59
include/z_en_item00.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user