diff --git a/assets/assets.json b/assets/assets.json index c5b10da5..f37de2d5 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -40793,11 +40793,6 @@ "size": 76, "type": "sprite_frame" }, - { - "path": "itemBomb/gUnk_0811BDAC.bin", - "start": 1162668, - "size": 8 - }, { "path": "itemMoleMitts/gUnk_0811BE14.bin", "start": 1162772, diff --git a/data/const/item/itemBomb.s b/data/const/item/itemBomb.s deleted file mode 100644 index b0aaa822..00000000 --- a/data/const/item/itemBomb.s +++ /dev/null @@ -1,15 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0811BD98:: @ 0811BD98 - .4byte sub_08075FF8 - .4byte 00000000 - .4byte sub_08076488 - .4byte sub_08076518 - .4byte sub_080765E0 - -gUnk_0811BDAC:: @ 0811BDAC - .incbin "itemBomb/gUnk_0811BDAC.bin" diff --git a/linker.ld b/linker.ld index 19d4e077..39c18d79 100644 --- a/linker.ld +++ b/linker.ld @@ -1311,7 +1311,7 @@ SECTIONS { src/item/itemLantern.o(.rodata); src/item/itemBoomerang.o(.rodata); src/item/itemBow.o(.rodata); - data/const/item/itemBomb.o(.rodata); + src/item/itemBomb.o(.rodata); data/const/item/itemTryPickupObject.o(.rodata); src/item/itemPegasusBoots.o(.rodata); data/const/item/itemOcarina.o(.rodata); diff --git a/src/item/itemBomb.c b/src/item/itemBomb.c index e284a9e0..fb7ba4fc 100644 --- a/src/item/itemBomb.c +++ b/src/item/itemBomb.c @@ -5,19 +5,26 @@ #include "playeritem.h" #include "functions.h" -extern void (*const gUnk_0811BD98[])(ItemBehavior*, u32); - -extern s8 gUnk_0811BDAC[]; +void sub_08075FF8(ItemBehavior*, u32); +void sub_08076488(ItemBehavior*, u32); +void sub_08076518(ItemBehavior*, u32); +void sub_080765E0(ItemBehavior*, u32); void ItemBomb(ItemBehavior* this, u32 idx) { - gUnk_0811BD98[this->stateID](this, idx); + static void (*const stateFuncs[])(ItemBehavior*, u32) = { + sub_08075FF8, NULL, sub_08076488, sub_08076518, sub_080765E0, + }; + stateFuncs[this->stateID](this, idx); } void sub_08075FF8(ItemBehavior* this, u32 idx) { + static const s8 gUnk_0811BDAC[] = { + 0, -8, 4, -1, 0, 2, -4, -1, + }; Entity* entity; u32 maxBombs; u32 bombCount; - s8* pos; + const s8* pos; s32 x; s32 y;