From cf917a873392df734afde73d7ff6125fd56a3ed4 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Mar 2019 14:45:09 -0500 Subject: Decompile berry_powder.c --- data/berry_powder.s | 36 ++++++++++++++++++++++++++++++++++++ data/berry_powder_vendor.s | 35 ----------------------------------- data/maps/SlateportCity/scripts.inc | 16 ++++++++-------- data/specials.inc | 10 +++++----- 4 files changed, 49 insertions(+), 48 deletions(-) create mode 100755 data/berry_powder.s delete mode 100755 data/berry_powder_vendor.s (limited to 'data') diff --git a/data/berry_powder.s b/data/berry_powder.s new file mode 100755 index 000000000..2e8002bdd --- /dev/null +++ b/data/berry_powder.s @@ -0,0 +1,36 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + + .align 2 +gUnknown_082F7BA4_UnrefDupe:: @ 82F444C struct BgTemplate(???) + .4byte 0x000001e0 + .4byte 0x000012c9 + .4byte 0x000012ea + .4byte 0x000021ff + .4byte 0x000000ff + .4byte 0x00000000 + + .align 2 +gUnknown_082F7BBC_UnrefDupe:: @ 82F4464 + window_template 0x00, 0x01, 0x01, 0x1c, 0x02, 0x0d, 0x0013 + window_template 0x00, 0x01, 0x05, 0x1c, 0x0e, 0x0d, 0x004b + + .align 2 +gUnknown_082F7BCC_UnrefDupe:: @ 82F4474 + window_template 0x00, 0x01, 0x05, 0x1c, 0x07, 0x0d, 0x004b + + .align 2 +gUnknown_082F7BD4_UnrefDupe:: @ 82F447C + window_template 0x00, 0x01, 0x08, 0x13, 0x03, 0x0d, 0x0013 + window_template 0x00, 0x16, 0x07, 0x06, 0x04, 0x0d, 0x004c + + .align 2 +gUnknown_082F7BE4_UnrefDupe:: @ 82F448C + window_template 0x00, 0x04, 0x06, 0x16, 0x05, 0x0d, 0x0013 + + .align 2 +gUnknown_082F7BEC_UnrefDupe:: @ 82F4494 + window_template 0x00, 0x05, 0x08, 0x13, 0x03, 0x0d, 0x0013 diff --git a/data/berry_powder_vendor.s b/data/berry_powder_vendor.s deleted file mode 100755 index 22e40771f..000000000 --- a/data/berry_powder_vendor.s +++ /dev/null @@ -1,35 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 -gUnknown_082F7BA4_UnrefDupe:: @ 82F444C struct BgTemplate - .4byte 0x000001e0 - .4byte 0x000012c9 - .4byte 0x000012ea - .4byte 0x000021ff - .4byte 0x000000ff - .4byte 0x00000000 - - .align 2 -gUnknown_082F7BBC_UnrefDupe:: @ 82F4464 - window_template 0x00, 0x01, 0x01, 0x1c, 0x02, 0x0d, 0x0013 - window_template 0x00, 0x01, 0x05, 0x1c, 0x0e, 0x0d, 0x004b - - .align 2 -gUnknown_082F7BCC_UnrefDupe:: @ 82F4474 - window_template 0x00, 0x01, 0x05, 0x1c, 0x07, 0x0d, 0x004b - - .align 2 -gUnknown_082F7BD4_UnrefDupe:: @ 82F447C - window_template 0x00, 0x01, 0x08, 0x13, 0x03, 0x0d, 0x0013 - window_template 0x00, 0x16, 0x07, 0x06, 0x04, 0x0d, 0x004c - - .align 2 -gUnknown_082F7BE4_UnrefDupe:: @ 82F448C - window_template 0x00, 0x04, 0x06, 0x16, 0x05, 0x0d, 0x0013 - - .align 2 -gUnknown_082F7BEC_UnrefDupe:: @ 82F4494 - window_template 0x00, 0x05, 0x08, 0x13, 0x03, 0x0d, 0x0013 diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 1830c3f00..88bcb2e6c 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -732,11 +732,11 @@ SlateportCity_EventScript_1DD36E:: @ 81DD36E SlateportCity_EventScript_1DD39A:: @ 81DD39A setvar VAR_0x8004, 1 - specialvar VAR_RESULT, sub_80246D4 + specialvar VAR_RESULT, HasEnoughBerryPowder compare VAR_RESULT, 0 goto_if_eq SlateportCity_EventScript_1DD3C0 msgbox SlateportCity_Text_1DEE40, MSGBOX_DEFAULT - special sub_80248B0 + special DisplayBerryPowderVendorMenu goto SlateportCity_EventScript_1DD3CA end @@ -846,7 +846,7 @@ SlateportCity_EventScript_1DD536:: @ 81DD536 SlateportCity_EventScript_1DD54A:: @ 81DD54A msgbox SlateportCity_Text_1DEFBC, MSGBOX_DEFAULT - special sub_8024918 + special RemoveBerryPowderVendorMenu release end @@ -855,26 +855,26 @@ SlateportCity_EventScript_1DD557:: @ 81DD557 compare VAR_RESULT, 0 goto_if_eq SlateportCity_EventScript_1DD3CA copyvar VAR_0x8004, VAR_0x8009 - specialvar VAR_RESULT, sub_80246D4 + specialvar VAR_RESULT, HasEnoughBerryPowder compare VAR_RESULT, 0 goto_if_eq SlateportCity_EventScript_1DD5CE giveitem_std VAR_0x8008 compare VAR_RESULT, 0 goto_if_eq SlateportCity_EventScript_1DD5C1 copyvar VAR_0x8004, VAR_0x8009 - special sub_802477C - special sub_802488C + special TakeBerryPowder + special PrintPlayerBerryPowderAmount msgbox SlateportCity_Text_1DEEF7, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq SlateportCity_EventScript_1DD3CA msgbox SlateportCity_Text_1DEF79, MSGBOX_DEFAULT - special sub_8024918 + special RemoveBerryPowderVendorMenu release end SlateportCity_EventScript_1DD5C1:: @ 81DD5C1 msgbox gUnknown_08272A89, MSGBOX_DEFAULT - special sub_8024918 + special RemoveBerryPowderVendorMenu release end diff --git a/data/specials.inc b/data/specials.inc index 9364dcc46..5a812cffa 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -471,11 +471,11 @@ gSpecials:: @ 81DBA64 def_special sub_813AA04 def_special sub_813AA18 def_special sub_813AA44 - def_special sub_80248B0 - def_special sub_8024918 - def_special sub_80246D4 - def_special sub_802477C - def_special sub_802488C + def_special DisplayBerryPowderVendorMenu + def_special RemoveBerryPowderVendorMenu + def_special HasEnoughBerryPowder + def_special TakeBerryPowder + def_special PrintPlayerBerryPowderAmount def_special sub_813A820 def_special sub_813A854 def_special sub_813B7D8 -- cgit v1.2.3