diff options
author | Dennis <dhilhorst2000@gmail.com> | 2021-07-10 18:23:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-10 11:23:20 -0500 |
commit | 92a8e55fdd348a88a365eb389181d8e29da6dad9 (patch) | |
tree | 2467ef22cb8cf75bdf056143fab3fac4a68ef404 /src/wonder_mail.c | |
parent | 386299d1f401cb939e6fe3ea16d0ca57731b2648 (diff) |
Decompiled some item related functions (#42)
* decompile sub_8091290
* decompile sub_80912c8
* rename functions / struct field
* more names
* decompile 80913A0
* decompile GetItemMove
* decompile sub_80913E0
* rename function
* decompile CanSellItem function
* rename inventory struct
* add some item check functions
* fix renaming stuff
* this file shouldnt have been here
* forgot merge conflict
* decompile more item functions
* rename some stuff
* fix HM/TM naming
* Update src/code_801AFA4.c
Use enum value for USED_TM
* Fix incorrect value
Co-authored-by: Seth Barberee <seth.barberee@gmail.com>
Diffstat (limited to 'src/wonder_mail.c')
-rw-r--r-- | src/wonder_mail.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wonder_mail.c b/src/wonder_mail.c index af16acb..5ddebfe 100644 --- a/src/wonder_mail.c +++ b/src/wonder_mail.c @@ -7,11 +7,11 @@ #include "memory.h" #include "text.h" #include "sub_8095228.h" -#include "gUnknown_203B460.h" +#include "team_inventory.h" extern struct WonderMailStruct_203B2C0 *gUnknown_203B2C0; extern struct WonderMailStruct_203B2C4 *gUnknown_203B2C4; -extern struct unkStruct_203B460 *gUnknown_203B460; +extern struct TeamInventory *gTeamInventory_203B460; extern u32 sub_80144A4(s32 *r0); extern void sub_8011C28(u32); @@ -29,7 +29,7 @@ extern u8 sub_80A2824(u32); #include "data/wonder_mail_1.h" -const struct ItemStruct_203B460 gUnknown_80DED44 = +const struct ItemSlot gUnknown_80DED44 = { 1, 0, 0 }; @@ -170,7 +170,7 @@ extern void sub_803092C(); extern void sub_8035CF4(u32 *, u32, u32); extern u32 sub_801CA08(u32); extern void sub_801CBB8(); -extern void sub_801B3C0(struct ItemStruct_203B460 *); +extern void sub_801B3C0(struct ItemSlot *); extern u8 sub_801CB24(); extern void sub_801B450(); extern u32 sub_801B410(); @@ -1548,7 +1548,7 @@ void sub_8029F98(void) if (sub_80144A4(&auStack20) != 0) { return; } - MemoryFill8((u8 *)&gUnknown_203B2C4->unk41C, 0, sizeof(struct ItemStruct_203B460)); + MemoryFill8((u8 *)&gUnknown_203B2C4->unk41C, 0, sizeof(struct ItemSlot)); gUnknown_203B2C4->unk41C.itemIndex = 0; gUnknown_203B2C4->unk41C.numItems = 1; gUnknown_203B2C4->unk41C.unk0 = 0; @@ -2007,7 +2007,7 @@ void sub_802A798(void) { return_var->unk20 = gUnknown_203B2C4->unk41C; } - gUnknown_203B460->unk50[gUnknown_203B2C4->unk41C.itemIndex]--; + gTeamInventory_203B460->unk50[gUnknown_203B2C4->unk41C.itemIndex]--; sub_802B2BC(0x29); break; case 8: |