summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/entity.h30
-rw-r--r--include/functions.h20
-rw-r--r--include/greatFairy.h2
-rw-r--r--include/main.h8
-rw-r--r--include/object.h197
-rw-r--r--include/player.h15
6 files changed, 239 insertions, 33 deletions
diff --git a/include/entity.h b/include/entity.h
index d1593d1d..a1dd6d93 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -5,6 +5,16 @@
#include "global.h"
#include "sprite.h"
+typedef enum {
+ PLAYER = 1,
+ ENEMY = 3,
+ PROJECTILE = 4,
+ OBJECT = 6,
+ NPC = 7,
+ PLAYER_ITEM = 8,
+ MANAGER = 9,
+} EntityType;
+
typedef struct {
void* entity1;
void* entity2;
@@ -12,19 +22,12 @@ typedef struct {
} UnkStruct;
typedef struct {
- u8 type;
- u8 subtype;
- u8 form;
- u8 parameter;
-} EntityType;
-
-typedef struct {
s8 offset_x;
s8 offset_y;
u8 unk2[4];
u8 width;
u8 height;
-} BoundingBox;
+} Hitbox;
typedef struct {
s8 offset_x;
@@ -34,12 +37,15 @@ typedef struct {
u8 height;
u8 depth;
u8 unknown2[3];
-} BoundingBox3D;
+} Hitbox3D;
typedef struct Entity {
/*0x00*/ struct Entity* prev;
/*0x04*/ struct Entity* next;
- /*0x08*/ EntityType entityType;
+ /*0x08*/ u8 kind; // was: type
+ /*0x09*/ u8 id; // was: subtype
+ /*0x0a*/ u8 type; // was: form
+ /*0x0b*/ u8 type2; // was: parameter
/*0x0c*/ u8 action;
/*0x0d*/ u8 previousActionFlag;
/*0x0e*/ u8 actionDelay;
@@ -112,7 +118,7 @@ typedef struct Entity {
/*0x44*/ u8 field_0x44;
/*0x45*/ u8 currentHealth;
/*0x46*/ u16 field_0x46;
- /*0x48*/ BoundingBox* boundingBox;
+ /*0x48*/ Hitbox* hitbox;
/*0x4c*/ struct Entity* field_0x4c;
/*0x50*/ struct Entity* parent;
/*0x54*/ struct Entity* attachedEntity;
@@ -132,7 +138,7 @@ typedef struct Entity {
/*0x60*/ u16 spriteVramOffset;
/*0x62*/ u8 spriteOffsetX;
/*0x63*/ s8 spriteOffsetY;
- /*0x64*/ u32* otherEntity;
+ /*0x64*/ u32* myHeap;
/*0x68*/ union SplitHWord field_0x68;
/*0x6a*/ union SplitHWord field_0x6a;
/*0x6c*/ union SplitHWord field_0x6c;
diff --git a/include/functions.h b/include/functions.h
index 9e8b7d0b..2c91bdd9 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -12,7 +12,7 @@
// Identified - to be sorted into header files
extern u32 Random(void);
-extern void PlaySFX(u32);
+extern void SoundReq(u32);
extern void ShowNPCDialogue(Entity*, Dialog*);
extern u32 UpdateFuseInteraction();
extern void DeleteEntity(Entity*);
@@ -20,7 +20,7 @@ extern u32 __modsi3(u32, u32);
extern void DoFade(u32, u32);
extern u32 GetInventoryValue(u32);
extern u32 CheckKinstoneFused(u32);
-extern void ForceEquipItem(u8, u8);
+extern void ForceEquipItem(u32, u8);
extern void LoadRoomEntityList();
void CopyPosition(Entity*, Entity*);
extern void ResolveEntityOnTop(Entity*, Entity*);
@@ -32,7 +32,7 @@ extern Entity* CreatePlayerItem(u32, u32, u32, u32);
extern Entity* GetEmptyEntity(void);
extern u32 GetTileTypeByPos(s32 x, s32 y, u32 layer);
extern u32 GetTileType(u32 pos, u32 layer);
-extern void _DmaZero(void* src, u32 count);
+extern void MemClear32(void* src, u32 count);
extern void EraseAllEntities(void);
extern void SetTile(u32, u32, u32);
extern void SetDirtTile(u32);
@@ -42,15 +42,15 @@ extern void UpdateAnimationVariableFrames(Entity*, u32);
extern void CopyPositionAndSpriteOffset(Entity*, Entity*);
extern u8* GetSpriteSubEntryOffsetDataPointer(u32, u32);
extern u32 LoadFixedGFX(Entity*, u32);
-extern void _DmaFill32(u32, void*, u32);
+extern void MemFill32(u32, void*, u32);
extern Entity* CreateItemEntity(u32, u32, u32);
-void _DmaCopy(const void* src, void* dst, u32 size);
+void MemCopy(const void* src, void* dst, u32 size);
extern u32 ProcessMovement(Entity*);
extern Entity* FindEntityInListBySubtype(u32, u32, u32);
extern Entity* FindEntityInListByForm(u32, u32, u32, u32, u32);
-extern void _DmaZero(void*, u32);
+extern void MemClear32(void*, u32);
extern void MenuFadeIn(u32, u32);
-extern void LoadAssetAsync(const void*, u32, u32);
+extern void LoadResourceAsync(const void*, u32, u32);
extern void LoadPaletteGroup(u32);
extern void TryLoadPrologueHyruleTown(void);
extern Manager* GetEmptyManager(void);
@@ -227,7 +227,7 @@ extern void sub_0804A7D4(Entity*);
extern void sub_08033744(Entity*);
extern void sub_0800417E(Entity*, u32);
extern void sub_080784C8();
-extern void sub_08017640();
+extern void RegisterPlayerHitbox();
extern u32 sub_0808288C(Entity*, u32, u32, u32);
extern void sub_0806FDA0(Entity*);
extern void sub_080AE008(Entity*, u32, u32);
@@ -312,8 +312,8 @@ extern u32 sub_08056134(void);
extern void sub_08004484(Entity*, Entity*);
extern void sub_080564C8(u32);
extern void sub_08056F70(void);
-extern void sub_08056C68(void);
-extern void sub_08056D70(void);
+extern void DeleteWindow(void);
+extern void CreateWindow(void);
extern void sub_0805EEB4(u8*, u32, u32);
extern void sub_08056FBC(void*);
extern void sub_08056C54(u32);
diff --git a/include/greatFairy.h b/include/greatFairy.h
index f3eb845e..31a37c99 100644
--- a/include/greatFairy.h
+++ b/include/greatFairy.h
@@ -11,7 +11,7 @@ extern Entity* GreatFairy_CreateForm(Entity*, u32, u32);
extern void PositionRelative();
extern void CopyPosition();
extern void DoFade();
-extern void PlaySFX();
+extern void SoundReq();
extern void GetNextFrame();
extern void sub_0805EC9C();
extern void sub_0805EC60();
diff --git a/include/main.h b/include/main.h
index 55e7b341..6ab823a6 100644
--- a/include/main.h
+++ b/include/main.h
@@ -74,7 +74,7 @@ typedef struct {
} UI;
static_assert(sizeof(UI) == 0x3b4);
-extern Main gUnk_03001000;
+extern Main gMain;
extern UI gUnk_02032EC0;
void InitScreen();
@@ -84,16 +84,16 @@ extern void sub_0807CE90(void);
extern void sub_080560B8(void);
extern void sub_08056208(void);
extern void sub_0804FFE4(void);
-extern void sub_08056418(void);
+extern void MessageInitialize(void);
extern void sub_080ADD30(void);
extern void InitScreen(u32);
-extern void sub_08016E78(void);
+extern void PrepNextFrame(void);
extern void ReadKeyInput(void);
extern void DoSoftReset(void);
extern void sub_08056260(void);
extern void VBlankIntrWait();
-extern void sub_08056458(void);
+extern void MessageUpdate(void);
extern void sub_08050154(void);
extern void sub_080A3480(void);
diff --git a/include/object.h b/include/object.h
index 5480a8a2..465ef064 100644
--- a/include/object.h
+++ b/include/object.h
@@ -4,6 +4,203 @@
#include "global.h"
#include "entity.h"
+typedef enum {
+ GROUND_ITEM,
+ DEATH_FX,
+ SHOP_ITEM,
+ BUTTON,
+ OBJECT_4,
+ POT,
+ OBJECT_6,
+ PUSHED_BLOCK,
+ LOCKED_DOOR,
+ OBJECT_9,
+ OBJECT_A,
+ OBJECT_B,
+ CHEST_SPAWNER,
+ OBJECT_D,
+ OBJECT_E,
+ SPECIAL_FX,
+ OBJECT_10,
+ OBJECT_11,
+ OBJECT_12,
+ RAILTRACK,
+ LILYPAD_LARGE,
+ OBJECT_15,
+ FLOATING_PLATFORM,
+ OBJECT_17,
+ EVIL_SPIRIT,
+ HOUSE_DOOR_EXT,
+ OBJECT_1A,
+ GREAT_FAIRY,
+ OBJECT_1C,
+ OBJECT_1D,
+ OBJECT_1E,
+ OBJECT_1F,
+ OBJECT_20,
+ OBJECT_21,
+ FIGURINE_DEVICE,
+ EYE_SWITCH,
+ OBJECT_24,
+ BIG_BARREL,
+ OBJECT_26,
+ PUSHABLE_STATUE,
+ OBJECT_28,
+ OBJECT_29,
+ OBJECT_2A,
+ OBJECT_2B,
+ BEANSTALK,
+ SMOKE,
+ PUSHABLE_ROCK,
+ HITTABLE_LEVER,
+ OBJECT_30,
+ OBJECT_31,
+ PULLABLE_MUSHROOM,
+ BOLLARD,
+ WARP_POINT,
+ OBJECT_35,
+ OBJECT_36,
+ OBJECT_37,
+ JAR_PORTAL,
+ BOSS_DOOR,
+ OBJECT_3A,
+ PORTAL_MUSHROOM_STALKS,
+ PORTAL_FALLING_PLAYER,
+ OBJECT_3D,
+ OBJECT_3E,
+ GIANT_LEAF,
+ FAIRY,
+ LADDER_UP,
+ OBJECT_42,
+ OBJECT_43,
+ OBJECT_44,
+ OBJECT_45,
+ GIANT_BOOK_LADDER,
+ HEART_CONTAINER,
+ FILE_SCREEN_OBJECTS,
+ OBJECT_49,
+ BACKGROUND_CLOUD,
+ OBJECT_4B,
+ PUSHABLE_FURNITURE,
+ FURNITURE,
+ MINISH_SIZED_ENTRANCE,
+ ARCHWAY,
+ GIANT_ROCK,
+ OBJECT_51,
+ OBJECT_52,
+ OBJECT_53,
+ PULLABLE_LEVER,
+ MINECART,
+ THOUGHT_BUBBLE,
+ HIDDEN_LADDER_DOWN,
+ GENTARI_CURTAIN,
+ LAVA_PLATFORM,
+ OBJECT_5A,
+ OBJECT_5B,
+ MASK,
+ HOUSE_DOOR_INT,
+ WHIRLWIND,
+ OBJECT_BLOCKING_STAIRS,
+ SWORDSMAN_NEWSLETTER,
+ OBJECT_61,
+ GIANT_TWIG,
+ OBJECT_63,
+ OBJECT_64,
+ LADDER_HOLE,
+ OBJECT_66,
+ OBJECT_67,
+ OBJECT_68,
+ OBJECT_69,
+ OBJECT_6A,
+ CRENAL_BEAN_SPROUT,
+ MINECART_DOOR,
+ OBJECT_ON_PILLAR,
+ MINERAL_WATER_SOURCE,
+ MINISH_SIZED_ARCHWAY,
+ OBJECT_70,
+ PUSHABLE_GRAVE,
+ OBJECT_72,
+ LILYPAD_SMALL,
+ OBJECT_74,
+ OBJECT_75,
+ OBJECT_76,
+ BELL,
+ HUGE_DECORATION,
+ OBJECT_79,
+ STEAM,
+ PUSHABLE_LEVER,
+ HUGE_SHOES,
+ OBJECT_ON_BEETLE,
+ OBJECT_7E,
+ PICO_BLOOM,
+ OBJECT_80,
+ OBJECT_81,
+ BIG_VORTEX,
+ BIG_PUSHABLE_LEVER,
+ SMALL_ICE_BLOCK,
+ BIG_ICE_BLOCK,
+ OBJECT_86,
+ OBJECT_87,
+ HUGE_BOOK,
+ OBJECT_89,
+ OBJECT_8A,
+ OBJECT_8B,
+ BOOK,
+ FIREPLACE,
+ OBJECT_8E,
+ FROZEN_WATER_ELEMENT,
+ OBJECT_90,
+ OBJECT_91,
+ BAKER_OVEN,
+ OBJECT_93,
+ WIND_TRIBE_FLAG,
+ BIRD,
+ OBJECT_96,
+ OBJECT_97,
+ OBJECT_98,
+ OBJECT_99,
+ HUGE_ACORN,
+ OBJECT_9B,
+ TREE_HIDING_PORTAL,
+ LIGHTABLE_SWITCH,
+ OBJECT_9E,
+ FAN,
+ OBJECT_A0,
+ PALACE_ARCHWAY,
+ OBJECT_A2,
+ CLOUD,
+ MINISH_LIGHT,
+ OBJECT_A5,
+ OBJECT_A6,
+ OBJECT_A7,
+ OBJECT_A8,
+ OBJECT_A9,
+ WATERFALL_OPENING,
+ OBJECT_AB,
+ FOUR_ELEMENTS,
+ OBJECT_AD,
+ FLOATING_BLOCK,
+ OBJECT_AF,
+ METAL_DOOR,
+ JAIL_BARS,
+ OBJECT_B2,
+ OBJECT_B3,
+ OBJECT_B4,
+ OBJECT_B5,
+ OBJECT_B6,
+ WELL,
+ WIND_TRIBE_TELEPORTER,
+ OBJECT_B9,
+ OBJECT_BA,
+ WINDCREST,
+ LIT_AREA,
+ OBJECT_BD,
+ PINWHEEL,
+ OBJECT_BF,
+ ENEMY_ITEM,
+ OBJECT_C1,
+} Object;
+
extern void ItemOnGround(Entity*);
extern void DeathFx(Entity*);
extern void ItemForSale(Entity*);
diff --git a/include/player.h b/include/player.h
index f1f08f6f..e9d96665 100644
--- a/include/player.h
+++ b/include/player.h
@@ -33,8 +33,9 @@ typedef struct {
/*0x30*/ union {
/* */ u32 all;
/* */ struct {
- /* */ u32 filler9 : 2;
+ /* */ u32 unk1 : 1;
/* */ u32 unk2 : 1;
+ /* */ u32 unk4 : 1;
/* */ u32 noMinishCap : 1;
/* */ u32 pullingState : 1;
/* */ u32 windyState : 1;
@@ -87,17 +88,19 @@ typedef struct {
/*0x05*/ u8 arrowCount;
/*0x06*/ u8 bombBagType;
/*0x07*/ u8 quiverType;
- /*0x08*/ u8 filler[4];
+ /*0x08*/ u8 filler[2];
+ /*0x0a*/ u8 charm;
+ /*0x0b*/ u8 unkB;
/*0x0c*/ u8 itemOnA;
/*0x0d*/ u8 itemOnB;
/*0x0e*/ u8 bottles[4];
- /*0x12*/ u8 floorType;
+ /*0x12*/ u8 effect;
/*0x13*/ u8 filler3[5];
/*0x18*/ u16 rupees;
/*0x1a*/ u16 field_0x1a;
- /*0x1c*/ u16 field_0x1c;
- /*0x1e*/ u16 field_0x1e;
- /*0x20*/ u16 field_0x20;
+ /*0x1c*/ u16 charmTimer;
+ /*0x1e*/ u16 unkTimer;
+ /*0x20*/ u16 effectTimer;
/*0x22*/ u8 filler4[4];
} Stats;