Name a lot of functions about interactable objects

This commit is contained in:
Catobat
2023-04-28 23:36:33 +02:00
parent 04f4272b14
commit d5afe1f2dd
174 changed files with 359 additions and 357 deletions
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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));
+2 -2
View File
@@ -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) {
+4 -4
View File
@@ -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;
}
}
+2 -2
View File
@@ -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);
}
+3 -3
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+4 -4
View File
@@ -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);
}
}
+2 -2
View File
@@ -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);
}
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -83,5 +83,5 @@ void sub_0806C09C(Entity* this) {
8,
12,
};
sub_08078850(this, 1, 0, &gUnk_081133B4);
SetInteractableObjectCollision(this, 1, 0, &gUnk_081133B4);
}
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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:
+3 -3
View File
@@ -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);
}
}
}
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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);
}
}
+4 -4
View File
@@ -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);
}
}
+4 -4
View File
@@ -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) {
+1 -1
View File
@@ -294,7 +294,7 @@ void sub_08063D44(Entity* this) {
ent->subtimer = 60;
break;
case 4 ... 5:
sub_08078778(this);
AddInteractableWhenBigObject(this);
break;
}
this->action++;
+2 -2
View File
@@ -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) {
+4 -4
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
}
+2 -2
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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) {
+3 -4
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+3 -3
View File
@@ -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;
+3 -3
View File
@@ -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) {
+6 -6
View File
@@ -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 {
+3 -3
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+4 -4
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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;
+4 -4
View File
@@ -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) {
+2 -2
View File
@@ -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);
}
}
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+3 -3
View File
@@ -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) {
+6 -6
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+3 -3
View File
@@ -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);
}
}
+3 -3
View File
@@ -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);
}
+6 -6
View File
@@ -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;
}
+3 -3
View File
@@ -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;
}
+6 -6
View File
@@ -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;
}
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+50 -47
View File
@@ -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 AddInteractableChest(Entity* ent) {
s32 iVar1;
iVar1 = AddInteractableObject(ent, 3, 0);
if (iVar1 >= 0) {
gPossibleInteraction.candidates[iVar1].interactDirections = 0xbe;
}
return iVar1;
}
s32 sub_08078828(Entity* ent) {
void SetInteractableObjectCollision(Entity* arg0, u32 ignoreLayer, u32 interactDirections, const void* customHitbox) {
s32 iVar1;
iVar1 = sub_0807887C(ent, 3, 0);
iVar1 = GetInteractableObjectIndex(arg0);
if (iVar1 >= 0) {
gPossibleInteraction.candidates[iVar1].interactDirections = 0xbe;
}
return iVar1;
}
void sub_08078850(Entity* arg0, u32 arg1, u32 arg2, const void* arg3) {
s32 iVar1;
iVar1 = sub_08078904(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) {
+22 -22
View File
@@ -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) {