Put const data in bell

This commit is contained in:
Tal Hayon 2022-04-18 00:36:48 +03:00
parent b085c7c401
commit 589d80bc74
3 changed files with 8 additions and 12 deletions

View File

@ -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

View File

@ -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);

View File

@ -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) {