diff options
| author | Catobat <69204835+Catobat@users.noreply.github.com> | 2023-04-28 23:36:33 +0200 |
|---|---|---|
| committer | Catobat <69204835+Catobat@users.noreply.github.com> | 2023-04-28 23:36:33 +0200 |
| commit | d5afe1f2dd8721791779bfa790eaefd7c5bc42ab (patch) | |
| tree | 41dd7e6ff83e81ebbe7cc90049a6ec0831223000 /src | |
| parent | 04f4272b14eaa9401f37af791065e81b3bdc222d (diff) | |
Name a lot of functions about interactable objects
Diffstat (limited to 'src')
75 files changed, 237 insertions, 235 deletions
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c index d1333784..97f67813 100644 --- a/src/enemy/businessScrub.c +++ b/src/enemy/businessScrub.c @@ -547,7 +547,7 @@ void sub_0802922C(Entity* this) { } void sub_0802925C(Entity* this) { - sub_08078784(this, GetFusionToOffer(this)); + AddInteractableWhenBigFuser(this, GetFusionToOffer(this)); } void sub_08029270(Entity* this) { diff --git a/src/entity.c b/src/entity.c index 18f11f75..2ac2b37f 100644 --- a/src/entity.c +++ b/src/entity.c @@ -351,7 +351,7 @@ void DeleteEntity(Entity* ent) { UnloadGFXSlots(ent); UnloadOBJPalette(ent); UnloadOBJPalette2(ent); - sub_080788E0(ent); + RemoveInteractableObject(ent); FreeCarryEntity(ent); sub_0805EC60(ent); sub_08017744(ent); diff --git a/src/gameUtils.c b/src/gameUtils.c index 8f9e9ace..eb2eb7fb 100644 --- a/src/gameUtils.c +++ b/src/gameUtils.c @@ -108,7 +108,7 @@ void InitializePlayer(void) { Entity* pl; - sub_080784C8(); + ResetPossibleInteraction(); MemClear(&gActiveItems, sizeof(gActiveItems)); MemClear(&gPlayerState, sizeof(gPlayerState)); MemFill32(0xffffffff, &gPlayerState.path_memory, sizeof(gPlayerState.path_memory)); diff --git a/src/npc/anju.c b/src/npc/anju.c index 59fa7ce1..fa66f537 100644 --- a/src/npc/anju.c +++ b/src/npc/anju.c @@ -28,9 +28,9 @@ void Anju(Entity* this) { } } -void sub_0806C354(Entity* this) { +void Anju_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Anju_Fusion(Entity* this) { diff --git a/src/npc/beedle.c b/src/npc/beedle.c index 351a53fb..28e124c6 100644 --- a/src/npc/beedle.c +++ b/src/npc/beedle.c @@ -72,7 +72,7 @@ void sub_080632C8(Entity* this) { void sub_080632E0(Entity* this) { if (LoadExtraSpriteData(this, gUnk_0810C8D4)) { InitializeAnimation(this, 0); - sub_08078778(this); + AddInteractableWhenBigObject(this); this->spriteSettings.draw = 1; this->action = 1; } @@ -103,7 +103,7 @@ void sub_08063390(Entity* this) { if (this->frame & ANIM_DONE) { this->action = 1; InitializeAnimation(this, GetAnimationState(this)); - sub_08078778(this); + AddInteractableWhenBigObject(this); } sub_0806ED78(this); } @@ -136,7 +136,7 @@ void sub_08063410(Entity* this) { this->type2 = 0; } sub_0807DD64(this); - sub_08078778(this); + AddInteractableWhenBigObject(this); } if (this->type != 0) { sub_0806346C(this); @@ -217,7 +217,7 @@ void sub_0806346C(Entity* this) { bVar1 = gUnk_0810C8F0[iVar2][iVar3][gPlayerEntity.animationState >> 1]; if (bVar1 != this->type2) { const gUnk_0810C89C_struct* temp = &gUnk_0810C89C[bVar1]; - sub_08078850(this, 1, temp->unk_04, temp); + SetInteractableObjectCollision(this, 1, temp->unk_04, temp); this->type2 = bVar1; } } diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c index 93dbfccc..4532cfaf 100644 --- a/src/npc/bladeBrothers.c +++ b/src/npc/bladeBrothers.c @@ -235,7 +235,7 @@ void sub_08068A1C(Entity* this) { bVar1 = 3; } else { - sub_08078778(this); + AddInteractableWhenBigObject(this); offset = 2; bVar1 = 1; } @@ -292,7 +292,7 @@ void sub_08068AFC(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); } diff --git a/src/npc/brocco.c b/src/npc/brocco.c index 28edb9a2..e02ca622 100644 --- a/src/npc/brocco.c +++ b/src/npc/brocco.c @@ -30,7 +30,7 @@ void sub_0806355C(Entity* this) { this->action = this->action + 1; this->spriteSettings.draw = 1; InitAnimationForceUpdate(this, 4); - sub_08078778(this); + AddInteractableWhenBigObject(this); } void sub_08063584(Entity* this) { @@ -114,9 +114,9 @@ void sub_080636D8(Entity* this) { ShowNPCDialogue(this, &gUnk_0810CAAC[gSave.global_progress]); } -void sub_080636F4(Entity* this) { +void Brocco_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Brocco_Fusion(Entity* this) { diff --git a/src/npc/carpenter.c b/src/npc/carpenter.c index e7781a50..f54795e0 100644 --- a/src/npc/carpenter.c +++ b/src/npc/carpenter.c @@ -91,9 +91,9 @@ void sub_08067304(Entity* this) { ShowNPCDialogue(this, &dialog); } -void sub_08067314(Entity* this) { +void Carpenter_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Carpenter_Fusion(Entity* this) { diff --git a/src/npc/cat.c b/src/npc/cat.c index 7eebb148..33586cb9 100644 --- a/src/npc/cat.c +++ b/src/npc/cat.c @@ -281,7 +281,7 @@ void sub_08067AAC(Entity* this) { this->spriteSettings.flipX = this->direction >> 4 ^ 1; sub_08067DCC(this, 3); - sub_08078850(this, 0, gUnk_0811110C[2], gUnk_0811110F); + SetInteractableObjectCollision(this, 0, gUnk_0811110C[2], gUnk_0811110F); } void sub_08067B08(Entity* this) { @@ -293,7 +293,7 @@ void sub_08067B08(Entity* this) { void sub_08067B34(Entity* this) { sub_08067DCC(this, 0); this->frameDuration = (Random() & 0x30) + 0xb4; - sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.flipX], gUnk_0811110F); + SetInteractableObjectCollision(this, 0, gUnk_0811110C[this->spriteSettings.flipX], gUnk_0811110F); } void sub_08067B70(Entity* this) { @@ -350,9 +350,9 @@ void sub_08067C44(Entity* this) { if (uVar5 != this->field_0x68.HALF.HI) { if (uVar5 == 0) { - sub_08078778(this); + AddInteractableWhenBigObject(this); } else { - sub_080787A8(this, this->field_0x68.HALF.LO); + AddInteractableAsMinishFuser(this, this->field_0x68.HALF.LO); } } diff --git a/src/npc/cow.c b/src/npc/cow.c index 7c99efb9..e74ed30a 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -209,9 +209,9 @@ void sub_0806920C(Entity* ent) { if (var1 != ent->field_0x6c.HALF.HI) { if (var1 == 0) { - sub_08078778(ent); + AddInteractableWhenBigObject(ent); } else { - sub_080787A8(ent, ent->field_0x6c.HALF.LO); + AddInteractableAsMinishFuser(ent, ent->field_0x6c.HALF.LO); } } diff --git a/src/npc/cucco.c b/src/npc/cucco.c index 5710d40a..7f1ad66a 100644 --- a/src/npc/cucco.c +++ b/src/npc/cucco.c @@ -16,7 +16,7 @@ void Cucco(Entity* this) { void Cucco_Init(Entity* this) { this->action++; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_080787A8(this, this->field_0x68.HALF.LO); + AddInteractableAsMinishFuser(this, this->field_0x68.HALF.LO); SetDefaultPriority(this, PRIO_MESSAGE); this->subAction = 0; sub_0806E4EC(this); diff --git a/src/npc/cuccoChick.c b/src/npc/cuccoChick.c index 22d29486..75ccdce3 100644 --- a/src/npc/cuccoChick.c +++ b/src/npc/cuccoChick.c @@ -24,7 +24,7 @@ void CuccoChick(Entity* this) { void CuccoChick_Init(Entity* this) { this->action++; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_080787A8(this, this->field_0x68.HALF.LO); + AddInteractableAsMinishFuser(this, this->field_0x68.HALF.LO); SetDefaultPriority(this, PRIO_MESSAGE); this->subAction = 0; sub_0806E764(this); diff --git a/src/npc/dampe.c b/src/npc/dampe.c index 6c587232..fad25893 100644 --- a/src/npc/dampe.c +++ b/src/npc/dampe.c @@ -33,9 +33,9 @@ void Dampe(Entity* this) { } } -void sub_0806BE3C(Entity* this) { +void Dampe_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Dampe_Fusion(Entity* this) { diff --git a/src/npc/din.c b/src/npc/din.c index b803d9a2..735f4282 100644 --- a/src/npc/din.c +++ b/src/npc/din.c @@ -29,12 +29,12 @@ void Din(Entity* this) { } } -void sub_08064828(Entity* this) { +void Din_MakeInteractable(Entity* this) { u32 tmp = GetFusionToOffer(this); if ((gSave.fuserProgress[GetFuserId(this)] != 0) && (gSave.global_progress < 7)) { tmp = 0; } - sub_08078784(this, tmp); + AddInteractableWhenBigFuser(this, tmp); } void Din_Fusion(Entity* this) { diff --git a/src/npc/dog.c b/src/npc/dog.c index e3c287d9..10427419 100644 --- a/src/npc/dog.c +++ b/src/npc/dog.c @@ -351,7 +351,7 @@ void sub_08069E50(Entity* this) { if (GetInventoryValue(ITEM_QST_DOGFOOD) == 2) { this->action = 7; InitAnimationForceUpdate(this, 0x29); - sub_080788E0(this); + RemoveInteractableObject(this); EnqueueSFX(SFX_VO_DOG); EnqueueSFX(SFX_TASK_COMPLETE); } @@ -432,9 +432,9 @@ void sub_08069FE8(Entity* this) { if (tmp != this->field_0x6a.HALF.LO) { if (tmp == 0) { - sub_08078778(this); + AddInteractableWhenBigObject(this); } else { - sub_080787A8(this, this->field_0x74.HALF.LO); + AddInteractableAsMinishFuser(this, this->field_0x74.HALF.LO); } } this->field_0x6a.HALF.LO = tmp; diff --git a/src/npc/drLeft.c b/src/npc/drLeft.c index d991340e..f8398668 100644 --- a/src/npc/drLeft.c +++ b/src/npc/drLeft.c @@ -83,5 +83,5 @@ void sub_0806C09C(Entity* this) { 8, 12, }; - sub_08078850(this, 1, 0, &gUnk_081133B4); + SetInteractableObjectCollision(this, 1, 0, &gUnk_081133B4); } diff --git a/src/npc/epona.c b/src/npc/epona.c index 544a749d..b06a7777 100644 --- a/src/npc/epona.c +++ b/src/npc/epona.c @@ -73,9 +73,9 @@ void sub_08065A64(Entity* this) { if (uVar2 != this->field_0x68.HALF.HI) { if (uVar2 == 0) { - sub_08078778(this); + AddInteractableWhenBigObject(this); } else { - sub_080787A8(this, this->field_0x68.HALF.LO); + AddInteractableAsMinishFuser(this, this->field_0x68.HALF.LO); } } this->field_0x68.HALF.HI = uVar2; diff --git a/src/npc/farmers.c b/src/npc/farmers.c index 1fa4357c..d3ccf5fd 100644 --- a/src/npc/farmers.c +++ b/src/npc/farmers.c @@ -59,8 +59,8 @@ void sub_0806BCC0(Entity* this) { } } -void sub_0806BCD4(Entity* this) { - sub_08078784(this, GetFusionToOffer(this)); +void Farmers_MakeInteractable(Entity* this) { + AddInteractableWhenBigFuser(this, GetFusionToOffer(this)); } void sub_0806BCE8(Entity* this) { diff --git a/src/npc/farore.c b/src/npc/farore.c index fa5f25c3..fc68d782 100644 --- a/src/npc/farore.c +++ b/src/npc/farore.c @@ -29,12 +29,12 @@ void Farore(Entity* this) { } } -void sub_08064A28(Entity* this) { +void Farore_MakeInteractable(Entity* this) { u32 tmp = GetFusionToOffer(this); if ((gSave.fuserProgress[GetFuserId(this)] != 0) && (gSave.global_progress < 7)) { tmp = 0; } - sub_08078784(this, tmp); + AddInteractableWhenBigFuser(this, tmp); } void Farore_Fusion(Entity* this) { diff --git a/src/npc/festari.c b/src/npc/festari.c index 781cc9cf..f9e0cb57 100644 --- a/src/npc/festari.c +++ b/src/npc/festari.c @@ -22,7 +22,7 @@ void sub_0805FE10(Entity* this) { this->spriteSettings.draw = TRUE; SetDefaultPriority(this, PRIO_MESSAGE); this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); } diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c index 9a898c67..b002d976 100644 --- a/src/npc/forestMinish.c +++ b/src/npc/forestMinish.c @@ -534,9 +534,9 @@ void ForestMinish(Entity* this) { } } -void sub_08060090(Entity* this) { +void ForestMinish_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void ForestMinish_Head(Entity* this) { diff --git a/src/npc/gentari.c b/src/npc/gentari.c index 3ba91821..d2d36028 100644 --- a/src/npc/gentari.c +++ b/src/npc/gentari.c @@ -9,7 +9,7 @@ void Gentari(Entity* this) { this->spriteSettings.draw = TRUE; SetDefaultPriority(this, PRIO_MESSAGE); this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); break; case 1: diff --git a/src/npc/ghostBrothers.c b/src/npc/ghostBrothers.c index afcb7f2b..2fe80a97 100644 --- a/src/npc/ghostBrothers.c +++ b/src/npc/ghostBrothers.c @@ -110,9 +110,9 @@ void sub_08065CCC(Entity* this) { gScreen.controls.alphaBlend = 0x10; } -void sub_08065D00(Entity* this) { +void GhostBrothers_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void sub_08065D18(Entity* this) { @@ -219,7 +219,7 @@ void sub_08065EDC(Entity* this) { *(u16**)&this->field_0x6c = (++puVar3); } else { this->action++; - sub_08078778(this); + AddInteractableWhenBigObject(this); } } } diff --git a/src/npc/gina.c b/src/npc/gina.c index 0bb49f92..0095f7b3 100644 --- a/src/npc/gina.c +++ b/src/npc/gina.c @@ -10,7 +10,7 @@ void Gina(Entity* this) { this->spriteSettings.draw = 1; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); break; case 1: diff --git a/src/npc/gorman.c b/src/npc/gorman.c index bec184f5..abec9aae 100644 --- a/src/npc/gorman.c +++ b/src/npc/gorman.c @@ -70,7 +70,7 @@ void sub_080697C4(Entity* this) { if (LoadExtraSpriteData(this, gUnk_08111C3C)) { this->action = 1; InitializeAnimation(this, 2); - sub_08078778(this); + AddInteractableWhenBigObject(this); } } diff --git a/src/npc/goron.c b/src/npc/goron.c index 8056bf52..ce2fb731 100644 --- a/src/npc/goron.c +++ b/src/npc/goron.c @@ -30,7 +30,7 @@ void Goron(Entity* this) { } void sub_08069310(Entity* this) { - sub_08078778(this); + AddInteractableWhenBigObject(this); this->action = 1; InitAnimationForceUpdate(this, 2); } @@ -113,12 +113,12 @@ void sub_0806948C(Entity* this, ScriptExecutionContext* context) { gActiveScriptInfo.flags |= 1; } -void sub_080694B0(Entity* this) { +void Goron_MakeInteractable(Entity* this) { u32 kinstone = (u8)sub_08069480(this); if (CheckKinstoneFused(kinstone)) { - sub_08078778(this); + AddInteractableWhenBigObject(this); } else { - sub_08078784(this, kinstone); + AddInteractableWhenBigFuser(this, kinstone); } } diff --git a/src/npc/gregal.c b/src/npc/gregal.c index 7d867bf0..8a279a06 100644 --- a/src/npc/gregal.c +++ b/src/npc/gregal.c @@ -42,8 +42,8 @@ void sub_0806CAF4(Entity* this) { SortEntityAbove(this, npc); } sub_0807DD64(this); - sub_08078778(this); - sub_08078850(this, 1, (u8)gUnk_08113D84[1], gUnk_08113D84); + AddInteractableWhenBigObject(this); + SetInteractableObjectCollision(this, 1, (u8)gUnk_08113D84[1], gUnk_08113D84); } ExecuteScriptForEntity(this, NULL); HandleEntity0x82Actions(this); @@ -154,9 +154,9 @@ void sub_0806CD4C(Entity* this) { ChangeObjPalette(this, 0x110); } -void sub_0806CD58(Entity* this) { +void Gregal_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Gregal_Fusion(Entity* this) { diff --git a/src/npc/guard.c b/src/npc/guard.c index 661739ee..834c2f1b 100644 --- a/src/npc/guard.c +++ b/src/npc/guard.c @@ -294,7 +294,7 @@ void sub_08063D44(Entity* this) { ent->subtimer = 60; break; case 4 ... 5: - sub_08078778(this); + AddInteractableWhenBigObject(this); break; } this->action++; diff --git a/src/npc/hurdyGurdyMan.c b/src/npc/hurdyGurdyMan.c index 46ee55f0..1c45bbf3 100644 --- a/src/npc/hurdyGurdyMan.c +++ b/src/npc/hurdyGurdyMan.c @@ -100,9 +100,9 @@ void sub_0806E418(Entity* this) { ShowNPCDialogue(this, &dialogs[tmp]); } -void sub_0806E440(Entity* this) { +void HurdyGurdyMan_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void HurdyGurdyMan_Fusion(Entity* this) { diff --git a/src/npc/kid.c b/src/npc/kid.c index c9ddc000..fe03c2ef 100644 --- a/src/npc/kid.c +++ b/src/npc/kid.c @@ -208,7 +208,7 @@ void sub_080620F4(Entity* this) { this->field_0x68.HALF.LO = 0; this->action = 1; InitAnimationForceUpdate(this, 2); - sub_08078778(this); + AddInteractableWhenBigObject(this); } } @@ -313,7 +313,7 @@ void sub_08062500(Entity* this) { this->myHeap = zMalloc(sizeof(KidHeap)); if (this->myHeap != NULL) { this->field_0x68.HALF.LO = 1; - sub_080788E0(this); + RemoveInteractableObject(this); this->hitbox = NULL; sub_0806252C(this); } @@ -596,9 +596,9 @@ void sub_08062948(Entity* this, ScriptExecutionContext* context) { } } -void sub_08062A48(Entity* this, ScriptExecutionContext* context) { +void Kid_MakeInteractable(Entity* this, ScriptExecutionContext* context) { this->field_0x6a.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x6a.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x6a.HALF.LO); } void Kid_Fusion(Entity* this) { diff --git a/src/npc/kingDaltus.c b/src/npc/kingDaltus.c index 2d9c2989..3bdf60a2 100644 --- a/src/npc/kingDaltus.c +++ b/src/npc/kingDaltus.c @@ -40,7 +40,7 @@ void sub_08066654(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); InitAnimationForceUpdate(this, 2); } @@ -86,8 +86,8 @@ void sub_08066718(Entity* this) { } } -void sub_0806672C(Entity* this) { - sub_08078784(this, this->field_0x68.HALF.LO); +void KingDaltus_MakeInteractable(Entity* this) { + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void sub_0806673C(Entity* this) { diff --git a/src/npc/librari.c b/src/npc/librari.c index 819b5a61..e725b669 100644 --- a/src/npc/librari.c +++ b/src/npc/librari.c @@ -10,7 +10,7 @@ void Librari(Entity* this) { this->spriteSettings.draw = TRUE; this->animationState = this->timer; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); SetDefaultPriority(this, PRIO_MESSAGE); sub_0807DD50(this); break; diff --git a/src/npc/malon.c b/src/npc/malon.c index 0270006d..1ab967c0 100644 --- a/src/npc/malon.c +++ b/src/npc/malon.c @@ -44,7 +44,7 @@ void sub_08065888(Entity* this) { this->spriteSettings.draw = 1; this->animationState = 4; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); } diff --git a/src/npc/mama.c b/src/npc/mama.c index 95758b1c..0e2b7620 100644 --- a/src/npc/mama.c +++ b/src/npc/mama.c @@ -92,9 +92,9 @@ void sub_0806C4DC(Entity* this) { ShowNPCDialogue(this, &dialogs[gSave.global_progress]); } -void sub_0806C4F8(Entity* this) { +void Mama_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Mama_Fusion(Entity* this) { diff --git a/src/npc/mayorHagen.c b/src/npc/mayorHagen.c index 1cef31bc..f2d8b0ee 100644 --- a/src/npc/mayorHagen.c +++ b/src/npc/mayorHagen.c @@ -37,15 +37,15 @@ void MayorHagen(Entity* this) { } } -void sub_0806CE5C(Entity* this) { +void MayorHagen_MakeInteractable(Entity* this) { static const u8 gUnk_08113F44[] = { 0, 8, 8, 16, }; - sub_08078784(this, GetFusionToOffer(this)); - sub_08078850(this, 1, 0, gUnk_08113F44); + AddInteractableWhenBigFuser(this, GetFusionToOffer(this)); + SetInteractableObjectCollision(this, 1, 0, gUnk_08113F44); } void sub_0806CE80(Entity* this) { diff --git a/src/npc/melari.c b/src/npc/melari.c index 5c72230b..59760a78 100644 --- a/src/npc/melari.c +++ b/src/npc/melari.c @@ -29,7 +29,7 @@ void sub_08068708(Entity* this) { if (LoadExtraSpriteData(this, gUnk_08111520)) { this->action = 1; InitializeAnimation(this, 0); - sub_08078778(this); + AddInteractableWhenBigObject(this); } } @@ -100,9 +100,9 @@ void sub_08068780(Entity* this) { } } -void sub_08068884(Entity* this) { +void Melari_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Melari_Head(Entity* this) { diff --git a/src/npc/ministerPotho.c b/src/npc/ministerPotho.c index 9ee87713..fe5806c1 100644 --- a/src/npc/ministerPotho.c +++ b/src/npc/ministerPotho.c @@ -27,7 +27,7 @@ void sub_080667E4(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; InitAnimationForceUpdate(this, 2); - sub_08078778(this); + AddInteractableWhenBigObject(this); } void sub_08066808(Entity* this) { @@ -81,8 +81,8 @@ void sub_08066864(Entity* this) { } } -void sub_080668F0(Entity* this) { - sub_08078784(this, GetFusionToOffer(this)); +void MinisterPotho_MakeInteractable(Entity* this) { + AddInteractableWhenBigFuser(this, GetFusionToOffer(this)); } void sub_08066904(Entity* this) { diff --git a/src/npc/mountainMinish.c b/src/npc/mountainMinish.c index ca0d3574..bfa0e17c 100644 --- a/src/npc/mountainMinish.c +++ b/src/npc/mountainMinish.c @@ -57,7 +57,7 @@ void MountainMinish(Entity* this) { void sub_08067E60(Entity* this) { if (LoadExtraSpriteData(this, gUnk_08111358)) { this->action = 1; - sub_08078778(this); + AddInteractableWhenBigObject(this); InitializeAnimation(this, 2); } } @@ -179,9 +179,9 @@ void sub_08067EF0(Entity* this) { } } -void sub_08068104(Entity* this) { +void MountainMinish_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void sub_0806811C(Entity* this) { diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c index 5cb1691e..a93b7258 100644 --- a/src/npc/mutoh.c +++ b/src/npc/mutoh.c @@ -82,9 +82,9 @@ void sub_080670E4(Entity* this) { ShowNPCDialogue(this, &dialogs[gSave.global_progress]); } -void sub_08067100(Entity* this) { +void Mutoh_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Mutoh_Fusion(Entity* this) { diff --git a/src/npc/nayru.c b/src/npc/nayru.c index 35176f0b..f0949f24 100644 --- a/src/npc/nayru.c +++ b/src/npc/nayru.c @@ -29,12 +29,12 @@ void Nayru(Entity* this) { } } -void sub_08064928(Entity* this) { +void Nayru_MakeInteractable(Entity* this) { u32 tmp = GetFusionToOffer(this); if ((gSave.fuserProgress[GetFuserId(this)] != 0) && (gSave.global_progress < 7)) { tmp = 0; } - sub_08078784(this, tmp); + AddInteractableWhenBigFuser(this, tmp); } void Nayru_Fusion(Entity* this) { diff --git a/src/npc/npc23.c b/src/npc/npc23.c index eccd933c..a07b14b1 100644 --- a/src/npc/npc23.c +++ b/src/npc/npc23.c @@ -38,7 +38,7 @@ void sub_080662F8(Entity* this) { this->parent = &gPlayerEntity; this->cutsceneBeh.HWORD = 0; sub_08066490(this, this->parent); - sub_08078778(this); + AddInteractableWhenBigObject(this); } void sub_08066358(Entity* this) { @@ -56,7 +56,7 @@ void sub_08066358(Entity* this) { this->speed = 0x80; this->cutsceneBeh.HWORD = 1; gPauseMenuOptions.disabled = 1; - sub_080788E0(this); + RemoveInteractableObject(this); } } else { sub_08066490(this, this->parent); diff --git a/src/npc/npc26.c b/src/npc/npc26.c index a9c19cf2..fddbf460 100644 --- a/src/npc/npc26.c +++ b/src/npc/npc26.c @@ -18,7 +18,7 @@ static void sub_080669B8(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; InitAnimationForceUpdate(this, 2); - sub_08078778(this); + AddInteractableWhenBigObject(this); } static void sub_080669DC(Entity* this) { diff --git a/src/npc/npc4E.c b/src/npc/npc4E.c index 8baf84d3..18caefb0 100644 --- a/src/npc/npc4E.c +++ b/src/npc/npc4E.c @@ -46,14 +46,13 @@ void sub_0806DA04(Entity* this, ScriptExecutionContext* context) { // TODO gUnk_0811415C should be a gUnk_0810C89C_struct[], but then a lot of bytes everywhere are wrong? gUnk_0810C89C_struct* a = (gUnk_0810C89C_struct*)&( (gUnk_0810C89C_struct*)gUnk_0811415C)[context->intVariable]; // cast necessary to no longer make it a const* ? - sub_08078850(this, 1, (u8)a->unk_04, a); + SetInteractableObjectCollision(this, 1, (u8)a->unk_04, a); } void NPC4E_DoScreenTransition(Entity* this, ScriptExecutionContext* context) { sub_0808091C(gNpc4ETransitions[context->intVariable], gNpc4ETransitionTypes[context->intVariable]); } -// Returns the kinstone id? u8 NPC4E_GetKinstoneId(Entity* this) { u32 result; @@ -97,8 +96,8 @@ void sub_0806DAAC(Entity* this, ScriptExecutionContext* context) { } // maybe actually execute the kinstone fusion? -void sub_0806DAD0(Entity* this) { - sub_08078790(this, NPC4E_GetKinstoneId(this)); +void NPC4E_MakeFuserInteractable(Entity* this) { + AddInteractableFuser(this, NPC4E_GetKinstoneId(this)); } void sub_0806DAE8(Entity* this) { diff --git a/src/npc/npc5.c b/src/npc/npc5.c index 2a78cc26..f8e6707e 100644 --- a/src/npc/npc5.c +++ b/src/npc/npc5.c @@ -875,7 +875,7 @@ void sub_08061ACC(Entity* this) { this->subAction = 0xff; this->timer = 0; this->followerFlag = this->followerFlag & 0xfe; - sub_08078778(this); + AddInteractableWhenBigObject(this); sub_08061AFC(this); } diff --git a/src/npc/npc9.c b/src/npc/npc9.c index 76a69b93..a8361648 100644 --- a/src/npc/npc9.c +++ b/src/npc/npc9.c @@ -22,7 +22,7 @@ void sub_08062AF0(Entity* this) { this->action = 1; this->spriteSettings.draw = TRUE; InitializeAnimation(this, 0); - sub_08078778(this); + AddInteractableWhenBigObject(this); } void sub_08062B14(Entity* this) { diff --git a/src/npc/percy.c b/src/npc/percy.c index 22753a85..21a205f4 100644 --- a/src/npc/percy.c +++ b/src/npc/percy.c @@ -41,7 +41,7 @@ void sub_0806B3CC(Entity* this) { } this->action = 1; InitializeAnimation(this, 0); - sub_08078778(this); + AddInteractableWhenBigObject(this); } GetNextFrame(this); if (this->interactType != 0) { @@ -161,9 +161,9 @@ void sub_0806B540(Entity* this) { gActiveScriptInfo.commandSize = 0; } -void sub_0806B60C(Entity* this) { +void Percy_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Percy_Fusion(Entity* this) { diff --git a/src/npc/picolyteBottle.c b/src/npc/picolyteBottle.c index be49c2f3..80ebfc0a 100644 --- a/src/npc/picolyteBottle.c +++ b/src/npc/picolyteBottle.c @@ -26,7 +26,7 @@ void PicolyteBottle_Action1(PicolyteBottleEntity* this); void PicolyteBottle_Action2(PicolyteBottleEntity* this); void nullsub_111(PicolyteBottleEntity* this); -extern void sub_08078828(Entity*); +extern void AddInteractableChest(Entity*); void PicolyteBottle(Entity* this) { static void (*const PicolyteBottle_Actions[])(PicolyteBottleEntity*) = { @@ -97,7 +97,7 @@ void PicolyteBottle_Action2(PicolyteBottleEntity* this) { super->child = obj; CopyPosition(super, obj); } - sub_080788E0(super); + RemoveInteractableObject(super); sub_0807B7D8(0x74, this->unk76, 2); } } @@ -149,7 +149,7 @@ void sub_0806E0DC(PicolyteBottleEntity* this) { DeleteEntity(super->child); super->child = NULL; } - sub_08078828(super); + AddInteractableChest(super); sub_0807B7D8(0x73, this->unk76, 2); } else { super->action = 3; diff --git a/src/npc/pina.c b/src/npc/pina.c index 00d73a13..f11cbdd9 100644 --- a/src/npc/pina.c +++ b/src/npc/pina.c @@ -32,7 +32,7 @@ void sub_08063A98(Entity* this) { this->action++; this->spriteSettings.draw = 1; InitAnimationForceUpdate(this, 4); - sub_08078778(this); + AddInteractableWhenBigObject(this); } void sub_08063AC0(Entity* this) { @@ -150,9 +150,9 @@ void sub_08063C90(Entity* this) { ShowNPCDialogue(this, &gUnk_0810CE04[gSave.global_progress]); } -void sub_08063CAC(Entity* this) { +void Pina_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Pina_Fusion(Entity* this) { diff --git a/src/npc/postman.c b/src/npc/postman.c index 06fa095c..9e7ce529 100644 --- a/src/npc/postman.c +++ b/src/npc/postman.c @@ -8,7 +8,7 @@ extern void sub_08060528(Entity*); extern void sub_080604DC(Entity*); extern void sub_080606D8(Entity*); -extern void sub_080606C0(Entity*); +extern void Postman_MakeInteractable(Entity*); const Coords gUnk_0810A66C[] = { { .HALF = { 0x0, 0x0 } }, { .HALF = { 0x48, 0xa8 } }, { .HALF = { 0x0, 0xf0 } }, @@ -274,7 +274,7 @@ void sub_08060528(Entity* this) { this->field_0x6a.HWORD = 0; this->zVelocity = Q_16_16(2.0); this->field_0x6c.HALF.HI = 1; - sub_080788E0(this); + RemoveInteractableObject(this); EnqueueSFX(SFX_PLY_JUMP); } else { this->field_0x6a.HWORD--; @@ -283,7 +283,7 @@ void sub_08060528(Entity* this) { GravityUpdate(this, Q_8_8(24.0)); if (((this->field_0x6c.HALF.HI != 0) && (this->zVelocity == 0)) && this->z.WORD == 0) { this->field_0x6c.HALF.HI = 0; - sub_080606C0(this); + Postman_MakeInteractable(this); } if (this->z.WORD >= 0 && ((gPlayerEntity.collisionLayer == 0 || (this->collisionLayer == gPlayerEntity.collisionLayer)))) { @@ -292,9 +292,9 @@ void sub_08060528(Entity* this) { sub_0800451C(this); } -void sub_080606C0(Entity* this) { +void Postman_MakeInteractable(Entity* this) { this->field_0x6c.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x6c.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x6c.HALF.LO); } void sub_080606D8(Entity* this) { @@ -336,7 +336,7 @@ void sub_0806076C(Entity* this, ScriptExecutionContext* context) { } this->field_0x68.HALF.HI++; this->collisionLayer = 1; - sub_080606C0(this); + Postman_MakeInteractable(this); pbVar10 = gUnk_0810A918[(s8)this->field_0x68.HALF.LO]; pbVar10 += (s8)this->field_0x68.HALF.HI; do { diff --git a/src/npc/rem.c b/src/npc/rem.c index c8834192..b9b5f61e 100644 --- a/src/npc/rem.c +++ b/src/npc/rem.c @@ -328,10 +328,10 @@ void sub_0806A914(Entity* this) { } } -void sub_0806A93C(Entity* this) { +void Rem_MakeInteractable(Entity* this) { static const u8 gUnk_0811229C[] = { 0, 6, 10, 16 }; - sub_08078778(this); - sub_08078850(this, 0, 0, &gUnk_0811229C); + AddInteractableWhenBigObject(this); + SetInteractableObjectCollision(this, 0, 0, &gUnk_0811229C); } void sub_0806A958(Entity* this) { diff --git a/src/npc/sittingPerson.c b/src/npc/sittingPerson.c index b7f7af0c..c5f63d07 100644 --- a/src/npc/sittingPerson.c +++ b/src/npc/sittingPerson.c @@ -235,9 +235,9 @@ void SittingPerson_Head(Entity* this) { sub_0807000C(this); } -void sub_080639D0(Entity* this) { +void SittingPerson_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void SittingPerson_Fusion(Entity* this) { diff --git a/src/npc/smallTownMinish.c b/src/npc/smallTownMinish.c index 96e4d1b4..7c35917d 100644 --- a/src/npc/smallTownMinish.c +++ b/src/npc/smallTownMinish.c @@ -14,7 +14,7 @@ void SmallTownMinish(Entity* this) { this->action++; this->hitbox = (Hitbox*)&gUnk_081142FC; sub_0807DD50(this); - sub_08078850(this, 1, 0, gUnk_08114304); + SetInteractableObjectCollision(this, 1, 0, gUnk_08114304); } else { sub_0807DD94(this, NULL); } diff --git a/src/npc/smith.c b/src/npc/smith.c index 08013aa7..df3bf7c4 100644 --- a/src/npc/smith.c +++ b/src/npc/smith.c @@ -205,18 +205,18 @@ void sub_08066258(void) { SoundReq(hammerSounds[Random() & 7]); } -void sub_08066274(Entity* this) { +void Smith_ChangeInteractableHitbox(Entity* this) { static const u8 gUnk_081103E0[] = { 0, 6, 8, 12, }; - sub_08078850(this, 1, 0, &gUnk_081103E0); + SetInteractableObjectCollision(this, 1, 0, &gUnk_081103E0); } -void sub_08066288(Entity* this) { - sub_08078784(this, this->field_0x68.HALF.LO); +void Smith_MakeInteractable(Entity* this) { + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Smith_Fusion(Entity* this) { diff --git a/src/npc/stamp.c b/src/npc/stamp.c index 3c932d97..0ac805ec 100644 --- a/src/npc/stamp.c +++ b/src/npc/stamp.c @@ -35,7 +35,7 @@ void sub_08062BD4(Entity* ent) { ent->action = 1; ent->spriteSettings.draw = 1; InitializeAnimation(ent, 0); - sub_08078778(ent); + AddInteractableWhenBigObject(ent); } void sub_08062BF8(Entity* ent) { diff --git a/src/npc/stockwell.c b/src/npc/stockwell.c index d7187ee3..b3480117 100644 --- a/src/npc/stockwell.c +++ b/src/npc/stockwell.c @@ -48,9 +48,9 @@ void sub_08065080(Entity* this) { this->spriteSettings.draw = 1; SetDefaultPriority(this, PRIO_MESSAGE); InitializeAnimation(this, 4); - sub_08078778(this); + AddInteractableWhenBigObject(this); #ifndef EU - sub_08078850(this, 0, 0, &gUnk_0810FDA0); + SetInteractableObjectCollision(this, 0, 0, &gUnk_0810FDA0); #endif context = StartCutscene(this, &script_Stockwell); *(ScriptExecutionContext**)&this->cutsceneBeh = context; diff --git a/src/npc/sturgeon.c b/src/npc/sturgeon.c index d4902142..05416de9 100644 --- a/src/npc/sturgeon.c +++ b/src/npc/sturgeon.c @@ -28,7 +28,7 @@ extern const u16 gUnk_0810FA54[]; // }; extern u32 gUnk_0810FA5A; // TODO second parameter of sub_0806EE04 -void sub_08064CC0(Entity* this); +void Sturgeon_MakeInteractable(Entity* this); void sub_08064C9C(Entity* this); void sub_08064CD8(Entity* this); @@ -68,7 +68,7 @@ void sub_08064B44(Entity* this) { if (LoadExtraSpriteData(this, gUnk_0810FA38)) { InitializeAnimation(this, 2); sub_0806EE04(this, &gUnk_0810FA5A, 0); - sub_08064CC0(this); + Sturgeon_MakeInteractable(this); this->action = 1; this->subAction = 0; this->spriteSettings.draw = 1; @@ -140,9 +140,9 @@ void sub_08064C9C(Entity* this) { } } -void sub_08064CC0(Entity* this) { +void Sturgeon_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void sub_08064CD8(Entity* this) { diff --git a/src/npc/talon.c b/src/npc/talon.c index b2d99ca8..dc86ba85 100644 --- a/src/npc/talon.c +++ b/src/npc/talon.c @@ -37,7 +37,7 @@ void Talon(Entity* this) { void sub_08065570(Entity* this) { if (LoadExtraSpriteData(this, gUnk_0810FEB0)) { InitializeAnimation(this, 0); - sub_08078778(this); + AddInteractableWhenBigObject(this); this->action = 1; this->subtimer = 1; this->animationState = 2; @@ -79,7 +79,7 @@ void sub_08065608(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); sub_0807DD50(this); } } diff --git a/src/npc/teachers.c b/src/npc/teachers.c index 763bf448..05e0d3f6 100644 --- a/src/npc/teachers.c +++ b/src/npc/teachers.c @@ -42,9 +42,9 @@ void Teachers(Entity* this) { } } -void sub_0806C674(Entity* this) { +void Teachers_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void Teachers_Head(Entity* this) { diff --git a/src/npc/tingleSiblings.c b/src/npc/tingleSiblings.c index cb22cf1d..1d5cfabf 100644 --- a/src/npc/tingleSiblings.c +++ b/src/npc/tingleSiblings.c @@ -83,7 +83,7 @@ void sub_08064DE4(Entity* this) { } } -void sub_08064EA4(Entity* this) { +void TingleSiblings_MakeInteractable(Entity* this) { this->field_0x68.HALF.LO = GetFusionToOffer(this); switch (this->type) { case 0: @@ -99,7 +99,7 @@ void sub_08064EA4(Entity* this) { default: break; } - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void sub_08064EE8(Entity* this) { diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c index 69f729d7..6cf3aa45 100644 --- a/src/npc/townMinish.c +++ b/src/npc/townMinish.c @@ -228,7 +228,7 @@ void sub_0806ACC4(Entity* this) { } if (this->type == 1) { u8 idx = gPlayerEntity.animationState >> 1; - sub_08078850(this, 1, gUnk_081126E4[idx], gUnk_081126D4[idx]); + SetInteractableObjectCollision(this, 1, gUnk_081126E4[idx], gUnk_081126D4[idx]); } } break; @@ -250,8 +250,8 @@ void sub_0806ACC4(Entity* this) { } } -void sub_0806ADFC(Entity* this) { - sub_08078784(this, this->field_0x68.HALF.LO); +void TownMinish_MakeInteractable(Entity* this) { + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void TownMinish_Head(Entity* this) { diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c index 862e00f5..adb973cb 100644 --- a/src/npc/townsperson.c +++ b/src/npc/townsperson.c @@ -15,8 +15,8 @@ extern void sub_08062048(Entity*); extern struct_0810B680 gUnk_0810B680[]; extern SpriteLoadData* gUnk_0810B6EC[]; -extern u32 gUnk_0810B740[]; // TODO fourth parameter of sub_08078850 -extern u8 gUnk_0810B748[]; // TODO third parameter of sub_08078850 +extern u32 gUnk_0810B740[]; // TODO fourth parameter of SetInteractableObjectCollision +extern u8 gUnk_0810B748[]; // TODO third parameter of SetInteractableObjectCollision extern u16 gUnk_0810B74A[]; extern void (*const gUnk_0810B774[])(Entity*); extern void (*const gUnk_0810B77C[])(Entity*); @@ -150,11 +150,11 @@ void sub_08061E50(Entity* this) { } } -void sub_08061E70(Entity* this) { +void Townsperson_MakeInteractable(Entity* this) { if (this->id == 6) { - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } else { - sub_08078778(this); + AddInteractableWhenBigObject(this); } } @@ -236,7 +236,7 @@ void sub_08061FB0(Entity* this) { void sub_08061FB8(Entity* this, ScriptExecutionContext* context) { u8* temp = gUnk_0810B748; - sub_08078850(this, 1, temp[context->intVariable], &gUnk_0810B740[context->intVariable]); + SetInteractableObjectCollision(this, 1, temp[context->intVariable], &gUnk_0810B740[context->intVariable]); } void sub_08061FD8(Entity* this) { diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c index d60e0b37..aa4f9b31 100644 --- a/src/npc/windTribespeople.c +++ b/src/npc/windTribespeople.c @@ -78,12 +78,12 @@ void sub_0806C85C(Entity* this) { } } -void sub_0806C870(Entity* this) { +void WindTribespeople_MakeInteractable(Entity* this) { u8 bVar1; bVar1 = GetFusionToOffer(this); this->field_0x68.HALF.LO = bVar1; - sub_08078784(this, this->field_0x68.HALF.LO); + AddInteractableWhenBigFuser(this, this->field_0x68.HALF.LO); } void WindTribespeople_Head(Entity* this) { diff --git a/src/npc/zeldaFollower.c b/src/npc/zeldaFollower.c index ae67fcba..38a89062 100644 --- a/src/npc/zeldaFollower.c +++ b/src/npc/zeldaFollower.c @@ -42,7 +42,7 @@ void sub_0806854C(Entity* this, u32* none) { this->myHeap = zMalloc(sizeof(ZeldaFollowerHeap)); if (this->myHeap != NULL) { this->field_0x68.HALF.LO = 1; - sub_080788E0(this); + RemoveInteractableObject(this); this->hitbox = NULL; sub_08068578(this); } diff --git a/src/object/bossDoor.c b/src/object/bossDoor.c index 62ce4aeb..c1b3bcff 100644 --- a/src/object/bossDoor.c +++ b/src/object/bossDoor.c @@ -69,8 +69,8 @@ void BossDoor_Init(BossDoorEntity* this) { super->action = 1; super->spriteSettings.draw = 1; sub_0808C500(this); - sub_08078800(super); - sub_08078850(super, 0, gLockedDoorInteractDirections[this->unk_76], 0); + AddInteractableBossDoor(super); + SetInteractableObjectCollision(super, 0, gLockedDoorInteractDirections[this->unk_76], NULL); break; case 1: super->action = 4; @@ -87,7 +87,7 @@ void BossDoor_Init(BossDoorEntity* this) { void BossDoor_Action1(BossDoorEntity* this) { if (super->interactType != 0) { super->action = 2; - sub_080788E0(super); + RemoveInteractableObject(super); SetFlag(this->unk_86); } } diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c index dfe03a92..8a721a58 100644 --- a/src/object/chestSpawner.c +++ b/src/object/chestSpawner.c @@ -26,7 +26,7 @@ extern const Hitbox gUnk_0811F8A8; extern const Hitbox gUnk_0811F8B0; void sub_080842D8(ChestSpawnerEntity*); -void sub_08078828(ChestSpawnerEntity*); +void AddInteractableChest(ChestSpawnerEntity*); void sub_08083E20(ChestSpawnerEntity*); void sub_08084074(u32); void sub_080840A8(s32, s32); @@ -76,7 +76,7 @@ void sub_08083E20(ChestSpawnerEntity* this) { super->spriteSettings.draw = 1; super->spriteRendering.alphaBlend = 0; sub_080842D8(this); - sub_08078828(this); + AddInteractableChest(this); } void ChestSpawner_Type2Init(ChestSpawnerEntity* this) { super->hitbox = (Hitbox*)&gUnk_0811F8B0; @@ -153,7 +153,7 @@ void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) { if (super->interactType != 0) { super->action = 4; super->subtimer = 30; - sub_080788E0(super); + RemoveInteractableObject(super); RequestPriorityDuration(super, 60); SoundReq(SFX_CHEST_OPEN); } diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c index 75911fe8..54423cc0 100644 --- a/src/object/cutsceneMiscObject.c +++ b/src/object/cutsceneMiscObject.c @@ -22,7 +22,7 @@ extern u16 gUnk_08122B1E[]; extern Coords8 gUnk_08122B2E[]; // TODO struct xy typedef struct { Hitbox hit; - u8 _8[4]; // TODO fourth param of sub_08078850 + u8 _8[4]; // TODO fourth param of SetInteractableObjectCollision u8 _c; } HitboxCfg; extern HitboxCfg gUnk_08122B3C[]; @@ -395,13 +395,13 @@ void sub_08094FA8(CutsceneMiscObjectEntity* this) { super->action = 1; super->frameIndex = 0; super->spritePriority.b0 = 7; - sub_080787B4(super); + AddInteractableCheckableObject(super); break; case 1: if (super->interactType != 0) { super->interactType = 0; super->action = 2; - sub_080788E0(super); + RemoveInteractableObject(super); gPlayerState.queued_action = PLAYER_EMPTYBOTTLE; gPlayerState.field_0x38 = 54; #ifndef EU @@ -449,13 +449,13 @@ void sub_08095088(CutsceneMiscObjectEntity* this) { DeleteThisEntity(); super->action = 1; super->spritePriority.b0 = 7; - sub_080787B4(super); + AddInteractableCheckableObject(super); break; case 1: if (super->interactType != 0) { super->interactType = 0; super->action = 2; - sub_080788E0(super); + RemoveInteractableObject(super); CreateEzloHint(TEXT_INDEX(TEXT_BELARI, 0x1F), 0); } break; @@ -1322,6 +1322,6 @@ void sub_080962E8(CutsceneMiscObjectEntity* this) { void sub_080962F8(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) { HitboxCfg* cfg = &gUnk_08122B3C[ctx->intVariable]; - sub_08078850(super, 1, cfg->_c, cfg->_8); + SetInteractableObjectCollision(super, 1, cfg->_c, cfg->_8); super->hitbox = &cfg->hit; } diff --git a/src/object/figurineDevice.c b/src/object/figurineDevice.c index d52ac049..bf406be3 100644 --- a/src/object/figurineDevice.c +++ b/src/object/figurineDevice.c @@ -79,7 +79,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) { case 0: if (CheckLocalFlag(SHOP07_TANA)) { this->unk_7a = 1; - sub_080787B4(super); + AddInteractableCheckableObject(super); } else { this->unk_7a = 0; } @@ -123,7 +123,7 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) { switch (this->unk_7a) { case 0: this->unk_7a = 1; - sub_080787B4(super); + AddInteractableCheckableObject(super); break; case 1: if (super->interactType != 0) { @@ -142,7 +142,7 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) { default: if (CheckRoomFlag(2) == 0) { this->unk_7a = 1; - sub_080787B4(super); + AddInteractableCheckableObject(super); } break; } diff --git a/src/object/itemForSale.c b/src/object/itemForSale.c index 342ba851..0f4b1fa5 100644 --- a/src/object/itemForSale.c +++ b/src/object/itemForSale.c @@ -27,14 +27,14 @@ typedef struct { // not match. } ModifiedParentEntity; -extern u32 sub_080787D8(Entity*); +extern u32 AddInteractableShopItem(Entity*); extern void* sub_080784E4(void); void ItemForSale_Init(ItemForSaleEntity*); void ItemForSale_Action1(ItemForSaleEntity*); void ItemForSale_Action2(ItemForSaleEntity*); void ItemForSale_Action3(ItemForSaleEntity*); -void sub_08081A5C(ItemForSaleEntity*); +void ItemForSale_MakeInteractable(ItemForSaleEntity*); void sub_080819B4(ItemForSaleEntity*); void sub_08081AB0(void); @@ -71,7 +71,7 @@ void ItemForSale_Init(ItemForSaleEntity* this) { SetDefaultPriority(super, 6); #endif super->child = super; - sub_08081A5C(this); + ItemForSale_MakeInteractable(this); switch (super->timer) { case 0: super->hitbox = (Hitbox*)&gUnk_080FD328; @@ -154,11 +154,11 @@ void sub_080819B4(ItemForSaleEntity* this) { super->collisionLayer = 1; super->spritePriority.b0 = 4; UpdateSpriteForCollisionLayer(super); - sub_08081A5C(this); + ItemForSale_MakeInteractable(this); } -void sub_08081A5C(ItemForSaleEntity* this) { - u32 tmp = sub_080787D8(super); +void ItemForSale_MakeInteractable(ItemForSaleEntity* this) { + u32 tmp = AddInteractableShopItem(super); if (super->timer == 1) { gPossibleInteraction.candidates[tmp].interactDirections = 0; } diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c index 91cc9ea7..c4d3d8bf 100644 --- a/src/object/lockedDoor.c +++ b/src/object/lockedDoor.c @@ -133,8 +133,8 @@ void LockedDoor_Init(Entity* this) { this->action = 5; } else { this->action = 8; - sub_080787CC(this); - sub_08078850(this, 0, gLockedDoorInteractDirections[this->field_0x7c.BYTES.byte2], 0); + AddInteractableSmallKeyLock(this); + SetInteractableObjectCollision(this, 0, gLockedDoorInteractDirections[this->field_0x7c.BYTES.byte2], NULL); } } else { DeleteThisEntity(); diff --git a/src/object/objectA.c b/src/object/objectA.c index f9db55e0..77622f1f 100644 --- a/src/object/objectA.c +++ b/src/object/objectA.c @@ -34,7 +34,7 @@ void ObjectA(Entity* this) { } DeleteThisEntity(); } else { - sub_080787CC(this); + AddInteractableSmallKeyLock(this); } } else if (this->interactType != 0) { SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); diff --git a/src/object/specialChest.c b/src/object/specialChest.c index 2d0264be..8d8fd2f1 100644 --- a/src/object/specialChest.c +++ b/src/object/specialChest.c @@ -9,7 +9,7 @@ #include "flags.h" #include "room.h" -extern void sub_08078828(Entity*); +extern void AddInteractableChest(Entity*); extern void OpenSmallChest(u32 pos, u32 layer); void SpecialChest(Entity* this) { @@ -19,7 +19,7 @@ void SpecialChest(Entity* this) { } this->action = 1; this->collisionLayer = 1; - sub_08078828(this); + AddInteractableChest(this); } if (this->interactType != 0) { OpenSmallChest(COORD_TO_TILE(this), 2); diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c index f296de5a..15f8eef5 100644 --- a/src/object/swordsmanNewsletter.c +++ b/src/object/swordsmanNewsletter.c @@ -8,7 +8,7 @@ #include "global.h" #include "message.h" -extern void sub_080787B4(Entity*); +extern void AddInteractableCheckableObject(Entity*); void SwordsmanNewsletter_Init(Entity*); void SwordsmanNewsletter_Action1(Entity*); @@ -27,7 +27,7 @@ void SwordsmanNewsletter_Init(Entity* this) { this->frameIndex = this->type; UpdateSpriteForCollisionLayer(this); this->hitbox = (Hitbox*)&gUnk_081228A8; - sub_080787B4(this); + AddInteractableCheckableObject(this); } void SwordsmanNewsletter_Action1(Entity* this) { diff --git a/src/object/windcrest.c b/src/object/windcrest.c index 56bc6459..e552126d 100644 --- a/src/object/windcrest.c +++ b/src/object/windcrest.c @@ -22,9 +22,9 @@ void Windcrest(Entity* this) { HandleEntity0x82Actions(this); } -void sub_080A2124(Entity* this) { +void Windcrest_ChangeInteractableHitbox(Entity* this) { static const u8 gUnk_08125010[] = { 0, 0, 12, 12 }; - sub_08078850(this, 1, 0xe, gUnk_08125010); + SetInteractableObjectCollision(this, 1, 0xe, gUnk_08125010); } void Windcrest_Unlock(Entity* this) { diff --git a/src/playerUtils.c b/src/playerUtils.c index f6745116..67555c86 100644 --- a/src/playerUtils.c +++ b/src/playerUtils.c @@ -995,7 +995,7 @@ void sub_08078180(void) { ptr = sub_080784E4(); if (ptr->entity->interactType == 0) { - switch (ptr->interactCondition) { + switch (ptr->type) { case 1: case 7: uVar1 = 7; @@ -1106,7 +1106,7 @@ bool32 sub_080782C0(void) { if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0) { return FALSE; } - switch (gPossibleInteraction.currentObject->interactCondition) { + switch (gPossibleInteraction.currentObject->type) { default: case 0: return TRUE; @@ -1134,99 +1134,102 @@ bool32 sub_080782C0(void) { return TRUE; } -void sub_080784C8(void) { +void ResetPossibleInteraction(void) { MemClear(&gPossibleInteraction, sizeof(gPossibleInteraction)); gPossibleInteraction.currentObject = (InteractableObject*)&gNoInteraction; } +// determines which (if any) object the player is currently able to interact with ASM_FUNC("asm/non_matching/playerUtils/sub_080784E4.inc", InteractableObject* sub_080784E4(void)) -void sub_08078778(Entity* ent) { - sub_0807887C(ent, 1, 0); +void AddInteractableWhenBigObject(Entity* ent) { + AddInteractableObject(ent, 1, 0); } -void sub_08078784(Entity* ent, u32 arg1) { - sub_0807887C(ent, 1, arg1); +void AddInteractableWhenBigFuser(Entity* ent, u32 kinstoneId) { + AddInteractableObject(ent, 1, kinstoneId); } -void sub_08078790(Entity* ent, u32 arg1) { - sub_0807887C(ent, 2, arg1); +void AddInteractableFuser(Entity* ent, u32 kinstoneId) { + AddInteractableObject(ent, 2, kinstoneId); } -void sub_0807879C(Entity* ent) { - sub_0807887C(ent, 7, 0); +void AddInteractableAsMinishObject(Entity* ent) { + AddInteractableObject(ent, 7, 0); } -void sub_080787A8(Entity* ent, u32 arg1) { - sub_0807887C(ent, 7, arg1); +void AddInteractableAsMinishFuser(Entity* ent, u32 kinstoneId) { + AddInteractableObject(ent, 7, kinstoneId); } -void sub_080787B4(Entity* ent) { - sub_0807887C(ent, 9, 0); +void AddInteractableCheckableObject(Entity* ent) { + AddInteractableObject(ent, 9, 0); } -void sub_080787C0(Entity* ent) { - sub_0807887C(ent, 10, 0); +void AddInteractablePedestal(Entity* ent) { + AddInteractableObject(ent, 10, 0); } -void sub_080787CC(Entity* ent) { - sub_0807887C(ent, 5, 0); +void AddInteractableSmallKeyLock(Entity* ent) { + AddInteractableObject(ent, 5, 0); } -s32 sub_080787D8(Entity* ent) { +s32 AddInteractableShopItem(Entity* ent) { s32 iVar1; - iVar1 = sub_0807887C(ent, 8, 0); + iVar1 = AddInteractableObject(ent, 8, 0); if (iVar1 >= 0) { gPossibleInteraction.candidates[iVar1].interactDirections = 0xbe; } return iVar1; } -s32 sub_08078800(Entity* ent) { +s32 AddInteractableBossDoor(Entity* ent) { s32 iVar1; - iVar1 = sub_0807887C(ent, 6, 0); + iVar1 = AddInteractableObject(ent, 6, 0); if (iVar1 >= 0) { + // weird, this line assumes it's a north door, and is unnecessary + // anyway because this is overwritten right after returning gPossibleInteraction.candidates[iVar1].interactDirections = 0xbe; } return iVar1; } -s32 sub_08078828(Entity* ent) { +s32 AddInteractableChest(Entity* ent) { s32 iVar1; - iVar1 = sub_0807887C(ent, 3, 0); + iVar1 = AddInteractableObject(ent, 3, 0); if (iVar1 >= 0) { gPossibleInteraction.candidates[iVar1].interactDirections = 0xbe; } return iVar1; } -void sub_08078850(Entity* arg0, u32 arg1, u32 arg2, const void* arg3) { +void SetInteractableObjectCollision(Entity* arg0, u32 ignoreLayer, u32 interactDirections, const void* customHitbox) { s32 iVar1; - iVar1 = sub_08078904(arg0); + iVar1 = GetInteractableObjectIndex(arg0); if (iVar1 >= 0) { - gPossibleInteraction.candidates[iVar1].ignoreLayer = arg1; - gPossibleInteraction.candidates[iVar1].interactDirections = arg2; - gPossibleInteraction.candidates[iVar1].customHitbox = arg3; + gPossibleInteraction.candidates[iVar1].ignoreLayer = ignoreLayer; + gPossibleInteraction.candidates[iVar1].interactDirections = interactDirections; + gPossibleInteraction.candidates[iVar1].customHitbox = customHitbox; } } -s32 sub_0807887C(Entity* entity, u32 param_2, u32 param_3) { +s32 AddInteractableObject(Entity* entity, u32 type, u32 kinstoneId) { s32 index; entity->interactType = 0; - index = sub_08078904(entity); + index = GetInteractableObjectIndex(entity); if (index < 0) { - index = sub_08078904(0); + index = GetInteractableObjectIndex(0); } if (index >= 0) { gPossibleInteraction.candidates[index].entity = entity; - gPossibleInteraction.candidates[index].interactCondition = param_2; - gPossibleInteraction.candidates[index].kinstoneId = param_3; + gPossibleInteraction.candidates[index].type = type; + gPossibleInteraction.candidates[index].kinstoneId = kinstoneId; } - if (param_3 != 0) { + if (kinstoneId != 0) { Entity* entity = FindEntityByID(OBJECT, CAMERA_TARGET, 6); if (entity == NULL) { CreateObject(CAMERA_TARGET, 0, 0); @@ -1236,15 +1239,15 @@ s32 sub_0807887C(Entity* entity, u32 param_2, u32 param_3) { } /** Clear entry for Entity. */ -void sub_080788E0(Entity* entity) { - s32 index = sub_08078904(entity); +void RemoveInteractableObject(Entity* entity) { + s32 index = GetInteractableObjectIndex(entity); if (index > -1) { MemClear(&gPossibleInteraction.candidates[index], sizeof(InteractableObject)); } } /** Find entry for Entity. */ -s32 sub_08078904(Entity* entity) { +s32 GetInteractableObjectIndex(Entity* entity) { u32 index; for (index = 0; index < 0x20; index++) { if (entity == gPossibleInteraction.candidates[index].entity) { diff --git a/src/script.c b/src/script.c index 91bc5e95..23387340 100644 --- a/src/script.c +++ b/src/script.c @@ -94,12 +94,12 @@ void ScriptCommand_SetVariableToFrame(Entity* entity, ScriptExecutionContext* co void ScriptCommand_SetAnimation(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_TriggerInteract(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_0807E9D4(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_0807E9DC(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_0807E9E4(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_AddInteractableWhenBigObject(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_RemoveInteractableObject(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_AddInteractableWhenBigFuser(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807E9F0(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context); -void ScriptCommand_0807EA88(Entity* entity, ScriptExecutionContext* context); +void ScriptCommand_AddInteractableFuser(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_WaitUntilTextboxCloses(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_MessageFromTarget(Entity* entity, ScriptExecutionContext* context); void ScriptCommand_MessageNoOverlap(Entity* entity, ScriptExecutionContext* context); @@ -543,12 +543,12 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) { ScriptCommand_SetAnimation, ScriptCommand_TriggerInteract, ScriptCommand_0807E974, - ScriptCommand_0807E9D4, - ScriptCommand_0807E9DC, - ScriptCommand_0807E9E4, + ScriptCommand_AddInteractableWhenBigObject, + ScriptCommand_RemoveInteractableObject, + ScriptCommand_AddInteractableWhenBigFuser, ScriptCommand_0807E9F0, ScriptCommand_0807EA4C, - ScriptCommand_0807EA88, + ScriptCommand_AddInteractableFuser, ScriptCommand_WaitUntilTextboxCloses, ScriptCommand_MessageFromTarget, ScriptCommand_MessageNoOverlap, @@ -1136,16 +1136,16 @@ void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context) { gActiveScriptInfo.commandSize = 0; } -void ScriptCommand_0807E9D4(Entity* entity, ScriptExecutionContext* context) { - sub_08078778(entity); +void ScriptCommand_AddInteractableWhenBigObject(Entity* entity, ScriptExecutionContext* context) { + AddInteractableWhenBigObject(entity); } -void ScriptCommand_0807E9DC(Entity* entity, ScriptExecutionContext* context) { - sub_080788E0(entity); +void ScriptCommand_RemoveInteractableObject(Entity* entity, ScriptExecutionContext* context) { + RemoveInteractableObject(entity); } -void ScriptCommand_0807E9E4(Entity* entity, ScriptExecutionContext* context) { - sub_08078784(entity, context->scriptInstructionPointer[1]); +void ScriptCommand_AddInteractableWhenBigFuser(Entity* entity, ScriptExecutionContext* context) { + AddInteractableWhenBigFuser(entity, context->scriptInstructionPointer[1]); } void ScriptCommand_0807E9F0(Entity* entity, ScriptExecutionContext* context) { @@ -1184,8 +1184,8 @@ void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context) { } } -void ScriptCommand_0807EA88(Entity* entity, ScriptExecutionContext* context) { - sub_08078790(entity, context->scriptInstructionPointer[1]); +void ScriptCommand_AddInteractableFuser(Entity* entity, ScriptExecutionContext* context) { + AddInteractableFuser(entity, context->scriptInstructionPointer[1]); } void ScriptCommand_WaitUntilTextboxCloses(Entity* entity, ScriptExecutionContext* context) { @@ -1966,16 +1966,16 @@ void PutItemAnySlot(Entity* entity, ScriptExecutionContext* context) { PutItemOnSlot(context->intVariable); } -void sub_0807F924(Entity* entity, ScriptExecutionContext* context) { - sub_0807879C(entity); +void MakeInteractableAsMinish(Entity* entity, ScriptExecutionContext* context) { + AddInteractableAsMinishObject(entity); } -void sub_0807F92C(Entity* entity, ScriptExecutionContext* context) { - sub_080787C0(entity); +void MakePedestalInteractable(Entity* entity, ScriptExecutionContext* context) { + AddInteractablePedestal(entity); } -void sub_0807F934(Entity* entity, ScriptExecutionContext* context) { - sub_080787B4(entity); +void MakeCheckableObjectInteractable(Entity* entity, ScriptExecutionContext* context) { + AddInteractableCheckableObject(entity); } void sub_0807F93C(Entity* entity, ScriptExecutionContext* context) { |
