diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/code_8092334.h | 21 | ||||
-rw-r--r-- | include/friend_area_action_menu.h | 2 | ||||
-rw-r--r-- | include/item.h | 39 | ||||
-rw-r--r-- | include/pokemon.h | 6 | ||||
-rw-r--r-- | include/team_inventory.h | 11 |
5 files changed, 58 insertions, 21 deletions
diff --git a/include/code_8092334.h b/include/code_8092334.h new file mode 100644 index 0000000..6f7fcae --- /dev/null +++ b/include/code_8092334.h @@ -0,0 +1,21 @@ +#ifndef GUARD_CODE_8092334_H +#define GUARD_CODE_8092334_H + + +struct unkStruct_8094924 +{ + // size: 0x10? + u8 *unk0; // head? + u8 *unk4; // tail? + u32 unk8; + u32 unkC; +}; + +void sub_809486C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void nullsub_102(struct unkStruct_8094924 *r0); +void sub_809488C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void sub_809485C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void sub_80948E4(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void sub_8094924(struct unkStruct_8094924 *r0, u8 *r1, s32 size); + +#endif
\ No newline at end of file diff --git a/include/friend_area_action_menu.h b/include/friend_area_action_menu.h index aa82d6b..371811f 100644 --- a/include/friend_area_action_menu.h +++ b/include/friend_area_action_menu.h @@ -16,7 +16,7 @@ struct unkStruct_203B2BC s16 unk8; u16 unkA; u32 unkC; - struct ItemSlot_ALT unk10; + struct HeldItem unk10; u8 unk14; u8 fill15[3]; struct unkSubStruct_203B2BC *unk18; diff --git a/include/item.h b/include/item.h index 76db8a8..579c5c7 100644 --- a/include/item.h +++ b/include/item.h @@ -1,6 +1,8 @@ #ifndef GUARD_ITEMS_H #define GUARD_ITEMS_H +#include "code_8092334.h" + struct Item { /* 0x0 */ u8 *namePointer; @@ -28,11 +30,9 @@ struct ItemSlot u8 itemIndex; }; -struct ItemSlot_ALT -{ - u8 itemIndex; - u8 numItems; - u8 unk2; +struct HeldItem { + u8 itemIndex; + u8 numItems; }; struct unkStruct_80915F4 @@ -41,6 +41,15 @@ struct unkStruct_80915F4 u16 unk2; }; +struct unkStruct_8090F58 +{ + u32 unk0; + u8 unk4; + u8 unk5; + s16 unk6; + u8 unk8; +}; + enum ItemType { ITEM_TYPE_THROWABLE, @@ -337,16 +346,28 @@ u8 *GetItemDescription(u8 itemIndex); u32 GetItemUnkFood(u8 itemIndex, u32 r1); s32 GetNumberOfFilledInventorySlots(void); bool8 IsThrowableItem(u8 itemIndex); -void sub_8090A8C(struct ItemSlot *param_1,u8 itemIndex,u8 param_3); -void sub_8090B08(struct ItemSlot_ALT *param_1,u8 itemIndex); -void sub_8090B64(struct ItemSlot *param_1, struct ItemSlot_ALT *param_2); -void sub_8090DC4(void* param_1,u8 itemIndex,u32 param_3); +void xxx_init_itemslot_8090A8C(struct ItemSlot *param_1,u8 itemIndex,u8 param_3); +void xxx_init_helditem_8090B08(struct HeldItem *param_1,u8 itemIndex); +void HeldItemToSlot(struct ItemSlot *param_1, struct HeldItem *param_2); +void sub_8090DC4(void* param_1,u8 itemIndex, struct unkStruct_8090F58* param_3); bool8 AddItemToInventory(const struct ItemSlot* slot); void ConvertMoneyItemToMoney(); void AddToTeamMoney(s32 amount); u32 GetMoneyValue(struct ItemSlot* slot); u16 GetItemMove(u8 index); +bool8 CanSellItem(u32 id); bool8 IsGummiItem(u8); void xxx_init_unk230_substruct(u8); +bool8 xxx_insert_unk230_80919FC(u8); +u32 xxx_count_non_empty_inv_unk250_8091A48(); +void sub_8091BB4(u8); +void sub_8090F58(void*, u8 *, struct ItemSlot *, struct unkStruct_8090F58*); + +// some sort of weird memcpy's? +// not sure what the second argument should be typed as +void sub_8091DC0(struct unkStruct_8094924 *r0, u8*); +void sub_8091DE0(struct unkStruct_8094924 *a1, u8 *a2); +void sub_8091E00(struct unkStruct_8094924 *a1, u8 *a2); +void sub_8091E28(struct unkStruct_8094924 *a1, u8 *a2); #endif diff --git a/include/pokemon.h b/include/pokemon.h index 679a1d1..23a1311 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -2,6 +2,8 @@ #define GUARD_POKEMON_H #include "file_system.h" +#include "item.h" + struct PokemonStruct { @@ -28,9 +30,7 @@ struct PokemonStruct u8 unk20[4]; u8 unk24; u8 fill25[3]; - u8 itemIndexHeld; - u8 unk29; - u8 fill2A[2]; + struct HeldItem heldItem; u8 unk2C[4]; u8 fill30[0x4C - 0x30]; /* 0x4C */ u8 name[0xA]; diff --git a/include/team_inventory.h b/include/team_inventory.h index b8b8a09..36f5a87 100644 --- a/include/team_inventory.h +++ b/include/team_inventory.h @@ -1,18 +1,13 @@ #ifndef GUARD_TEAM_INVENTORY_H #define GUARD_TEAM_INVENTORY_H -struct subStruct_203B460 -{ - u8 unk0; - u8 unk1; -}; - struct TeamInventory { struct ItemSlot teamItems[INVENTORY_SIZE]; u16 teamStorage[NUMBER_OF_ITEM_IDS]; - struct subStruct_203B460 unk230[8]; // this is probably actually the same struct as ItemSlot_ALT (see sub_80919FC) - struct subStruct_203B460 unk250[4]; // TODO: idk if this is identical struct or not.. Ghidra says sizes are same + // same type (initialized by same function): + struct HeldItem unk230[8]; + struct HeldItem unk250[4]; /* 0x260 */ s32 teamMoney; /* 0x264 */ u32 teamSavings; }; |