diff --git a/assets/assets.json b/assets/assets.json index ce35da58..c89644bb 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -41029,11 +41029,6 @@ "size": 89, "type": "animation" }, - { - "path": "button/gUnk_0811EE50.bin", - "start": 1175120, - "size": 12 - }, { "path": "animations/gSpriteAnimations_MinishEmoticon_2.bin", "start": 1175140, diff --git a/data/const/object/button.s b/data/const/object/button.s deleted file mode 100644 index 0feeebf9..00000000 --- a/data/const/object/button.s +++ /dev/null @@ -1,16 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0811EE38:: @ 0811EE38 - .4byte sub_08081AE0 - .4byte sub_08081B84 - .4byte sub_08081BAC - .4byte sub_08081BE0 - .4byte sub_08081C30 - .4byte sub_08081C98 - -gUnk_0811EE50:: @ 0811EE50 - .incbin "button/gUnk_0811EE50.bin" diff --git a/linker.ld b/linker.ld index 63683160..026afaf7 100644 --- a/linker.ld +++ b/linker.ld @@ -1329,7 +1329,7 @@ SECTIONS { src/object/deathFx.o(.rodata); data/animations/object/deathFx.o(.rodata); src/object/itemForSale.o(.rodata); - data/const/object/button.o(.rodata); + src/object/button.o(.rodata); src/object/minishEmoticon.o(.rodata); data/animations/object/minishEmoticon.o(.rodata); data/const/object/pot.o(.rodata); diff --git a/src/object/button.c b/src/object/button.c index c16a1334..88068074 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -1,10 +1,18 @@ #include "object.h" #include "functions.h" -extern void (*const gUnk_0811EE38[])(Entity*); +void sub_08081AE0(Entity*); +void sub_08081B84(Entity*); +void sub_08081BAC(Entity*); +void sub_08081BE0(Entity*); +void sub_08081C30(Entity*); +void sub_08081C98(Entity*); void Button(Entity* this) { - gUnk_0811EE38[this->action](this); + static void (*const actionFuncs[])(Entity*) = { + sub_08081AE0, sub_08081B84, sub_08081BAC, sub_08081BE0, sub_08081C30, sub_08081C98, + }; + actionFuncs[this->action](this); } extern u32 sub_08081E3C(Entity*); @@ -172,10 +180,11 @@ u32 sub_08081E0C(Entity* this) { } } -extern u16 gUnk_0811EE50[]; - u32 sub_08081E3C(Entity* this) { - u16* tmp1; + static const u16 gUnk_0811EE50[] = { + 0x77, 0x78, 0x79, 0x7a, 0, 0, + }; + const u16* tmp1; int tmp2; tmp2 = GetTileType(this->field_0x74.HWORD, this->collisionLayer); tmp1 = gUnk_0811EE50;