Put const data into npc9

This commit is contained in:
Tal Hayon
2022-04-13 22:43:29 +03:00
parent eb7a55f464
commit 51ee1d7028
3 changed files with 12 additions and 14 deletions
-11
View File
@@ -1,11 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_0810C290:: @ 0810C290
.4byte sub_08062AF0
.4byte sub_08062B14
.4byte sub_08062B48
.4byte sub_08062B70
+1 -1
View File
@@ -1163,7 +1163,7 @@ SECTIONS {
data/animations/npc/townsperson.o(.rodata);
data/const/npc/kid.o(.rodata);
data/animations/npc/kid.o(.rodata);
data/const/npc/npc9.o(.rodata);
src/npc/npc9.o(.rodata);
data/animations/npc/npc9.o(.rodata);
data/const/npc/stamp.o(.rodata);
data/animations/npc/stamp.o(.rodata);
+11 -2
View File
@@ -3,10 +3,19 @@
#include "message.h"
#include "npc.h"
extern void (*const gUnk_0810C290[])(Entity*);
void sub_08062AF0(Entity*);
void sub_08062B14(Entity*);
void sub_08062B48(Entity*);
void sub_08062B70(Entity*);
void NPC9(Entity* this) {
gUnk_0810C290[this->action](this);
static void (*const actionFuncs[])(Entity*) = {
sub_08062AF0,
sub_08062B14,
sub_08062B48,
sub_08062B70,
};
actionFuncs[this->action](this);
}
void sub_08062AF0(Entity* this) {