diff --git a/assets/assets.json b/assets/assets.json index fb18e760..f0837759 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -38904,16 +38904,6 @@ "size": 5, "type": "animation" }, - { - "path": "librari/gUnk_08112D48.bin", - "start": 1125704, - "size": 8 - }, - { - "path": "librari/gUnk_08112D50.bin", - "start": 1125712, - "size": 10 - }, { "path": "animations/gSpriteAnimations_Percy_0.bin", "start": 1125980, diff --git a/data/const/npc/librari.s b/data/const/npc/librari.s deleted file mode 100644 index d0e609a4..00000000 --- a/data/const/npc/librari.s +++ /dev/null @@ -1,11 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gUnk_08112D48:: @ 08112D48 - .incbin "librari/gUnk_08112D48.bin" - -gUnk_08112D50:: @ 08112D50 - .incbin "librari/gUnk_08112D50.bin" diff --git a/linker.ld b/linker.ld index 6a2126bc..1c5ec8e8 100644 --- a/linker.ld +++ b/linker.ld @@ -1251,7 +1251,7 @@ SECTIONS { data/animations/npc/rem.o(.rodata); data/const/npc/townMinish.o(.rodata); data/animations/npc/townMinish.o(.rodata); - data/const/npc/librari.o(.rodata); + src/npc/librari.o(.rodata); data/animations/npc/librari.o(.rodata); data/const/npc/percy.o(.rodata); data/animations/npc/percy.o(.rodata); diff --git a/src/npc/librari.c b/src/npc/librari.c index 98ef6450..fc7be731 100644 --- a/src/npc/librari.c +++ b/src/npc/librari.c @@ -3,8 +3,6 @@ #include "npc.h" #include "item.h" -extern u16 gUnk_08112D48[]; - void Librari(Entity* this) { switch (this->action) { case 0: @@ -35,6 +33,12 @@ void Librari(Entity* this) { } void sub_0806B260(Entity* this, ScriptExecutionContext* context) { + static const u16 messageIndices[] = { + 0x4a19, + 0x4a1a, + 0x4a22, + 0x4a27, + }; u32 index; context->condition = 0; @@ -51,12 +55,13 @@ void sub_0806B260(Entity* this, ScriptExecutionContext* context) { } else { index = 3; } - MessageNoOverlap(gUnk_08112D48[index], this); + MessageNoOverlap(messageIndices[index], this); } -extern u16 gUnk_08112D50[]; - void sub_0806B2B4(Entity* this) { + static const u16 messageIndices[] = { + 0xdad, 0xdae, 0xdaf, 0xdb0, 0xdb1, + }; u32 index; if (CheckLocalFlag(0xb3)) { @@ -78,7 +83,7 @@ void sub_0806B2B4(Entity* this) { } else { index = 0; } - MessageNoOverlap(gUnk_08112D50[index], this); + MessageNoOverlap(messageIndices[index], this); } void Librari_Fusion(Entity* this) {