diff --git a/assets/assets.json b/assets/assets.json index 2ec7c93a..34b21704 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -39766,11 +39766,6 @@ "size": 7, "type": "animation" }, - { - "path": "gregal/gUnk_08113D84.bin", - "start": 1129860, - "size": 8 - }, { "path": "animations/gSpriteAnimations_MayorHagen_0.bin", "start": 1130432, diff --git a/data/const/npc/gregal.s b/data/const/npc/gregal.s deleted file mode 100644 index 0ffb2446..00000000 --- a/data/const/npc/gregal.s +++ /dev/null @@ -1,14 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08113D84:: @ 08113D84 - .incbin "gregal/gUnk_08113D84.bin" - -gUnk_08113D8C:: @ 08113D8C - .4byte sub_0806CAF4 - .4byte sub_0806CB80 - .4byte sub_0806CBB4 - .4byte sub_0806CC08 diff --git a/linker.ld b/linker.ld index 56024d48..18c9bf42 100644 --- a/linker.ld +++ b/linker.ld @@ -1278,7 +1278,7 @@ SECTIONS { data/animations/npc/teachers.o(.rodata); data/const/npc/windTribespeople.o(.rodata); data/animations/npc/windTribespeople.o(.rodata); - data/const/npc/gregal.o(.rodata); + src/npc/gregal.o(.rodata); data/animations/npc/gregal.o(.rodata); data/const/npc/mayorHagen.o(.rodata); data/animations/npc/mayorHagen.o(.rodata); diff --git a/src/npc/gregal.c b/src/npc/gregal.c index 7dfd3ada..66ca8b4b 100644 --- a/src/npc/gregal.c +++ b/src/npc/gregal.c @@ -3,12 +3,24 @@ #include "functions.h" #include "npc.h" -extern void (*gUnk_08113D8C[])(Entity*); +static const u32 gUnk_08113D84[] = { + 0x100c0200, + 0x4, +}; -extern u32 gUnk_08113D84[]; +void sub_0806CAF4(Entity*); +void sub_0806CB80(Entity*); +void sub_0806CBB4(Entity*); +void sub_0806CC08(Entity*); void Gregal(Entity* this) { - gUnk_08113D8C[this->type](this); + static void (*const actionFuncs[])(Entity*) = { + sub_0806CAF4, + sub_0806CB80, + sub_0806CBB4, + sub_0806CC08, + }; + actionFuncs[this->type](this); } void sub_0806CAF4(Entity* this) {