diff --git a/data/const/npc/malon.s b/data/const/npc/malon.s deleted file mode 100644 index 41570e1b..00000000 --- a/data/const/npc/malon.s +++ /dev/null @@ -1,14 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_0810FF5C:: @ 0810FF5C - .4byte sub_08065864 - .4byte sub_08065880 - -gUnk_0810FF64:: @ 0810FF64 - .4byte sub_08065888 - .4byte sub_080658BC - .4byte sub_08065900 diff --git a/linker.ld b/linker.ld index dcab069a..c6862972 100644 --- a/linker.ld +++ b/linker.ld @@ -1201,7 +1201,7 @@ SECTIONS { data/animations/npc/stockwell.o(.rodata); src/npc/talon.o(.rodata); data/animations/npc/talon.o(.rodata); - data/const/npc/malon.o(.rodata); + src/npc/malon.o(.rodata); data/animations/npc/malon.o(.rodata); data/const/npc/epona.o(.rodata); data/animations/npc/epona.o(.rodata); diff --git a/src/npc/malon.c b/src/npc/malon.c index 2a3b2fa1..d38be5aa 100644 --- a/src/npc/malon.c +++ b/src/npc/malon.c @@ -3,14 +3,26 @@ #include "script.h" #include "npc.h" -extern void (*gUnk_0810FF5C[])(Entity* this); -extern void (*gUnk_0810FF64[])(Entity* this); +void sub_08065864(Entity* this); +void sub_08065880(Entity* this); +void sub_08065888(Entity* this); +void sub_080658BC(Entity* this); +void sub_08065900(Entity* this); void Malon(Entity* this) { + static void (*const actionFuncs[])(Entity * this) = { + sub_08065864, + sub_08065880, + }; + static void (*const scriptedActionFuncs[])(Entity * this) = { + sub_08065888, + sub_080658BC, + sub_08065900, + }; if (this->flags & ENT_SCRIPTED) { - gUnk_0810FF64[this->action](this); + scriptedActionFuncs[this->action](this); } else { - gUnk_0810FF5C[this->action](this); + actionFuncs[this->action](this); if (this->action != 0) { sub_0806ED78(this); }