From dcbdf53c113c46b477e419d51c747e7dd578cd8f Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Sun, 17 Apr 2022 20:33:32 +0300 Subject: [PATCH] Put const data in frozenFlower --- data/const/object/object31.s | 9 --------- linker.ld | 2 +- src/object/frozenFlower.c | 9 +++++++-- 3 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 data/const/object/object31.s diff --git a/data/const/object/object31.s b/data/const/object/object31.s deleted file mode 100644 index 4ddc687a..00000000 --- a/data/const/object/object31.s +++ /dev/null @@ -1,9 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0812119C:: @ 0812119C - .4byte sub_0808A9DC - .4byte nullsub_519 diff --git a/linker.ld b/linker.ld index bb948f8e..b7215ce3 100644 --- a/linker.ld +++ b/linker.ld @@ -1389,7 +1389,7 @@ SECTIONS { data/animations/object/pushableRock.o(.rodata); src/object/hittableLever.o(.rodata); src/object/object30.o(.rodata); - data/const/object/object31.o(.rodata); + src/object/frozenFlower.o(.rodata); src/object/pullableMushroom.o(.rodata); data/animations/object/pullableMushroom.o(.rodata); src/object/bollard.o(.rodata); diff --git a/src/object/frozenFlower.c b/src/object/frozenFlower.c index e576218b..73a85446 100644 --- a/src/object/frozenFlower.c +++ b/src/object/frozenFlower.c @@ -1,9 +1,14 @@ #include "object.h" -extern void (*const gUnk_0812119C[])(Entity*); +void sub_0808A9DC(Entity*); +void nullsub_519(Entity*); void FrozenFlower(Entity* this) { - gUnk_0812119C[this->action](this); + static void (*const actionFuncs[])(Entity*) = { + sub_0808A9DC, + nullsub_519, + }; + actionFuncs[this->action](this); } void sub_0808A9DC(Entity* this) {