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/debug_menu_mid.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/debug_menu_mid.c')
-rw-r--r-- | src/debug_menu_mid.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/debug_menu_mid.c b/src/debug_menu_mid.c index 3ed684c..b479cca 100644 --- a/src/debug_menu_mid.c +++ b/src/debug_menu_mid.c @@ -1,7 +1,7 @@ #include "global.h" #include "input.h" #include "item.h" -#include "gUnknown_203B460.h" +#include "team_inventory.h" #include "memory.h" #include "menu.h" #include "text.h" @@ -49,8 +49,8 @@ struct unkStruct_203B3F4 extern struct unkStruct_203B3F4 *gUnknown_203B3F4; -extern struct unkStruct_203B460 *gUnknown_203B460; -extern void sub_801B3C0(struct ItemStruct_203B460 *); +extern struct TeamInventory *gTeamInventory_203B460; +extern void sub_801B3C0(struct ItemSlot *); extern void sub_8013AA0(u32 *); extern struct UnkTextStruct2 gUnknown_80E7E34; @@ -73,7 +73,7 @@ extern void sub_8012EA4(u32 *, u32); extern void sub_80073E0(u32); extern void sub_8013C68(u32 *); extern void xxx_call_draw_string(s32, u32, const char *, u32, u32); -extern bool8 sub_8091524(u8); +extern bool8 IsNotMoneyOrUsedTMItem(u8); extern u32 sub_801CA08(u32); extern u8 sub_801CB24(); extern void sub_801CBB8(); @@ -181,7 +181,7 @@ void sub_803A51C(void) void sub_803A5A0(void) { - struct ItemStruct_203B460 auStack8; + struct ItemSlot auStack8; switch(gUnknown_203B3F0->state) { case 0: @@ -199,7 +199,7 @@ void sub_803A5A0(void) gUnknown_203B3F0->unkAC = 3; gUnknown_203B3F0->unkA4 = 0; gUnknown_203B3F0->unkA8 = 0x3e7; - gUnknown_203B3F0->unkA0 = gUnknown_203B460->unk50[gUnknown_203B3F0->itemIndex]; + gUnknown_203B3F0->unkA0 = gTeamInventory_203B460->unk50[gUnknown_203B3F0->itemIndex]; gUnknown_203B3F0->unkB0 = 1; gUnknown_203B3F0->unkB4 = &gUnknown_203B3F0->unkD8[1]; gUnknown_203B3F0->unkB8 = 0x2C; @@ -235,7 +235,7 @@ void sub_803A6F0(void) gUnknown_203B3F0->menus[0].text = &gDebug_NumberText; gUnknown_203B3F0->menus[0].menuAction = 2; gUnknown_203B3F0->unk8 = 2; - if (!sub_8091524(gUnknown_203B3F0->itemIndex)) { + if (!IsNotMoneyOrUsedTMItem(gUnknown_203B3F0->itemIndex)) { gUnknown_203B3F0->menus[0].menuAction = -1; gUnknown_203B3F0->unk8 = 3; } @@ -300,7 +300,7 @@ void sub_803A810(void) switch(sub_8013BBC(&gUnknown_203B3F0->unk9C)) { case 3: - gUnknown_203B460->unk50[gUnknown_203B3F0->itemIndex] = gUnknown_203B3F0->unk9C; + gTeamInventory_203B460->unk50[gUnknown_203B3F0->itemIndex] = gUnknown_203B3F0->unk9C; // Fallthrough needed to match case 2: sub_803A504(1); |