diff --git a/assets/assets.json b/assets/assets.json index c48b731a..4551fdc2 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -35784,11 +35784,6 @@ "size": 7, "type": "animation" }, - { - "path": "stamp/gUnk_0810C2E4.bin", - "start": 1098468, - "size": 16 - }, { "path": "animations/gSpriteAnimations_Marcy_0.bin", "start": 1098592, diff --git a/data/const/npc/stamp.s b/data/const/npc/stamp.s deleted file mode 100644 index b2d1d2ca..00000000 --- a/data/const/npc/stamp.s +++ /dev/null @@ -1,18 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2 - -gStampBehaviors1:: @ 0810C2CC - .4byte sub_08062BD4 - .4byte sub_08062BF8 - .4byte sub_08062C24 - .4byte sub_08062C54 - -gStampBehaviors2:: @ 0810C2DC - .4byte sub_08062C7C - .4byte sub_08062CA4 - -gUnk_0810C2E4:: @ 0810C2E4 - .incbin "stamp/gUnk_0810C2E4.bin" diff --git a/include/npc.h b/include/npc.h index 43c399fe..20e66117 100644 --- a/include/npc.h +++ b/include/npc.h @@ -30,7 +30,7 @@ u32 sub_0806EE20(Entity* ent); s32 sub_0806F078(Entity* ent, s32 a2); void sub_0806F118(Entity* ent); void sub_0806F188(Entity* ent); -void ShowNPCDialogue(Entity* ent, Dialog* dia); +void ShowNPCDialogue(Entity* ent, const Dialog* dia); Entity* CreateNPC(u32 subtype, u32 form, u32 parameter); u32 UpdateFuseInteraction(Entity*); diff --git a/linker.ld b/linker.ld index 88c5aa40..c5b6f7a9 100644 --- a/linker.ld +++ b/linker.ld @@ -1165,7 +1165,7 @@ SECTIONS { data/animations/npc/kid.o(.rodata); src/npc/npc9.o(.rodata); data/animations/npc/npc9.o(.rodata); - data/const/npc/stamp.o(.rodata); + src/npc/stamp.o(.rodata); data/animations/npc/stamp.o(.rodata); data/const/npc/marcy.o(.rodata); data/animations/npc/marcy.o(.rodata); diff --git a/src/npc/stamp.c b/src/npc/stamp.c index 2390a2a9..aedc91c6 100644 --- a/src/npc/stamp.c +++ b/src/npc/stamp.c @@ -5,18 +5,28 @@ #include "effects.h" #include "npc.h" -extern void sub_08062CA4(Entity*); - -extern void (*gStampBehaviors1[4])(Entity*); -extern void (*gStampBehaviors2[2])(Entity*); - -extern Dialog gUnk_0810C2E4[2]; +void sub_08062CA4(Entity*); +void sub_08062BD4(Entity*); +void sub_08062BF8(Entity*); +void sub_08062C24(Entity*); +void sub_08062C54(Entity*); +void sub_08062C7C(Entity*); void Stamp(Entity* ent) { + static void (*const actionFuncs[4])(Entity*) = { + sub_08062BD4, + sub_08062BF8, + sub_08062C24, + sub_08062C54, + }; + static void (*const scriptedActionFuncs[2])(Entity*) = { + sub_08062C7C, + sub_08062CA4, + }; if ((ent->flags & ENT_SCRIPTED) != 0) { - gStampBehaviors2[ent->action](ent); + scriptedActionFuncs[ent->action](ent); } else { - gStampBehaviors1[ent->action](ent); + actionFuncs[ent->action](ent); } } @@ -69,8 +79,17 @@ void sub_08062CA4(Entity* ent) { } void sub_08062CBC(Entity* ent) { - u32 uVar1 = CheckKinstoneFused(44); - ShowNPCDialogue(ent, &gUnk_0810C2E4[(-uVar1 | uVar1) >> 31]); + static const Dialog gUnk_0810C2E4[2] = { + { 0, 0, 0x3, 1, { 0x4001, 0x4000 } }, + { 0, 0, 0x3, 1, { 0x4003, 0x4002 } }, + }; + u32 uVar1; + if (CheckKinstoneFused(44)) { + uVar1 = 1; + } else { + uVar1 = 0; + } + ShowNPCDialogue(ent, &gUnk_0810C2E4[uVar1]); } void sub_08062CE0(Entity* ent) { diff --git a/src/npcUtils.c b/src/npcUtils.c index c6cf4c74..3bbc8db0 100644 --- a/src/npcUtils.c +++ b/src/npcUtils.c @@ -336,7 +336,7 @@ void sub_0806F188(Entity* ent) { gSave.unk1C1[idx] = 0xF3; } -void ShowNPCDialogue(Entity* ent, Dialog* dia) { +void ShowNPCDialogue(Entity* ent, const Dialog* dia) { u32 uVar1; s32 temp; u32 uVar2; diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c index b8cf0c60..fe7b88a8 100644 --- a/src/object/greatFairy.c +++ b/src/object/greatFairy.c @@ -21,7 +21,6 @@ extern void (*const GreatFairy_Form1Behaviors[])(Entity*); extern void (*const GreatFairy_Form2Behaviors[])(Entity*); extern void (*const gUnk_081207A4[])(Entity*); -extern u32 gUnk_0810C2E4; extern const s16 GreatFairy_RippleOffsets[10]; extern u8 gUnk_0812079C[8]; extern s8 gUnk_081207AC[];