From 589d80bc7418c9e953e3f7f6bc0917a5b37e8dc2 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Mon, 18 Apr 2022 00:36:48 +0300 Subject: [PATCH] Put const data in bell --- data/const/object/bell.s | 9 --------- linker.ld | 2 +- src/object/bell.c | 9 +++++++-- 3 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 data/const/object/bell.s diff --git a/data/const/object/bell.s b/data/const/object/bell.s deleted file mode 100644 index e6862702..00000000 --- a/data/const/object/bell.s +++ /dev/null @@ -1,9 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08123384:: @ 08123384 - .4byte sub_08097D90 - .4byte sub_08097DCC diff --git a/linker.ld b/linker.ld index b05744f4..862bd35c 100644 --- a/linker.ld +++ b/linker.ld @@ -1473,7 +1473,7 @@ SECTIONS { src/object/stoneTablet.o(.rodata); src/object/lilypadSmall.o(.rodata); src/object/object74.o(.rodata); - data/const/object/bell.o(.rodata); + src/object/bell.o(.rodata); data/animations/object/bell.o(.rodata); src/object/macroDecorations.o(.rodata); src/object/object79.o(.rodata); diff --git a/src/object/bell.c b/src/object/bell.c index 135584c3..da1043c3 100644 --- a/src/object/bell.c +++ b/src/object/bell.c @@ -1,9 +1,14 @@ #include "object.h" -extern void (*gUnk_08123384[])(Entity*); +void sub_08097D90(Entity*); +void sub_08097DCC(Entity*); void Bell(Entity* ent) { - gUnk_08123384[ent->action](ent); + static void (*const actionFuncs[])(Entity*) = { + sub_08097D90, + sub_08097DCC, + }; + actionFuncs[ent->action](ent); } void sub_08097D90(Entity* ent) {