Applied the enum for interactions (#647)

* Interactions enum applied

* Interactions enum applied
This commit is contained in:
Reinmmar 2023-12-11 01:21:31 +01:00 committed by GitHub
parent aaa4415746
commit b163ecafc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
71 changed files with 239 additions and 238 deletions

View File

@ -358,15 +358,15 @@ void sub_08028EDC(Entity* this) {
} }
void sub_08028F0C(Entity* this) { void sub_08028F0C(Entity* this) {
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 8; this->action = 8;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitializeNPCFusion(this); InitializeNPCFusion(this);
} else if (this->interactType != 0) { } else if (this->interactType != INTERACTION_NONE) {
u16 dialog; u16 dialog;
const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD; const struct SalesOffering* offer = (const struct SalesOffering*)this->field_0x7c.WORD;
this->interactType = 0; this->interactType = INTERACTION_NONE;
sub_0804AA1C(this); sub_0804AA1C(this);
this->direction = (GetAnimationState(this) << 3); this->direction = (GetAnimationState(this) << 3);
sub_080290E0(this, 3); sub_080290E0(this, 3);

View File

@ -23,9 +23,9 @@ void Anju(AnjuEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
return; return;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, (super->animIndex & -4) + GetAnimationStateForDirection4( InitializeAnimation(super, (super->animIndex & -4) + GetAnimationStateForDirection4(
GetFacingDirection(super, &gPlayerEntity))); GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -86,7 +86,7 @@ void Beedle_Action1(Entity* this) {
(animIndex = Beedle_GetAnimIndexFacingPlayer(this), this->animIndex != animIndex)) { (animIndex = Beedle_GetAnimIndexFacingPlayer(this), this->animIndex != animIndex)) {
InitializeAnimation(this, animIndex); InitializeAnimation(this, animIndex);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01)); MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01));
this->action++; this->action++;
} }

View File

@ -454,7 +454,7 @@ void sub_0806D638(Entity* this) {
void sub_0806D640(Entity* this) { void sub_0806D640(Entity* this) {
this->y.HALF.HI += 0x20; this->y.HALF.HI += 0x20;
this->interactType = 0; this->interactType = INTERACTION_NONE;
} }
void sub_0806D650(Entity* this) { void sub_0806D650(Entity* this) {

View File

@ -275,8 +275,8 @@ void sub_08068A4C(Entity* this) {
if (iVar2 == 0) { if (iVar2 == 0) {
GetNextFrame(this); GetNextFrame(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
this->action = 2; this->action = 2;
MessageFromTarget(0); MessageFromTarget(0);
} }
@ -311,9 +311,9 @@ void sub_08068AFC(BladeBrothersEntity* this) {
void sub_08068b2c(BladeBrothersEntity* this) { void sub_08068b2c(BladeBrothersEntity* this) {
u32 animationState; u32 animationState;
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
animationState = GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)); animationState = GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity));
InitAnimationForceUpdate(super, animationState); InitAnimationForceUpdate(super, animationState);
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -63,7 +63,7 @@ void sub_08063584(Entity* this) {
} }
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
InitAnimationForceUpdate(this, GetAnimationState(this) + 4); InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01)); MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01));
@ -88,9 +88,9 @@ void sub_0806362C(BroccoEntity* this) {
this->animIndex = 0; this->animIndex = 0;
sub_0807DD64(super); sub_0807DD64(super);
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4);

View File

@ -39,9 +39,9 @@ void Carpenter(CarpenterEntity* this) {
sub_0807DD64(super); sub_0807DD64(super);
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) +
4 + (super->type * 8)); 4 + (super->type * 8));

View File

@ -89,9 +89,9 @@ void sub_08064570(CastleMaidEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
case 1: case 1:
ExecuteScriptAndHandleAnimation(super, NULL); ExecuteScriptAndHandleAnimation(super, NULL);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action++; super->action++;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
if (this->dialogFunc != NULL) { if (this->dialogFunc != NULL) {
this->dialogFunc(); this->dialogFunc();

View File

@ -64,9 +64,9 @@ void sub_080673C0(Entity* this) {
} }
void sub_080673F4(Entity* this) { void sub_080673F4(Entity* this) {
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
} }
} }

View File

@ -373,7 +373,7 @@ void sub_08067C44(CatEntity* this) {
this->unk_69 = uVar5; this->unk_69 = uVar5;
if (super->interactType == 0) { if (super->interactType == INTERACTION_NONE) {
return; return;
} }
@ -403,7 +403,7 @@ void sub_08067C44(CatEntity* this) {
break; break;
} }
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 8; super->action = 8;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
@ -411,7 +411,7 @@ void sub_08067C44(CatEntity* this) {
sub_08067790(super); sub_08067790(super);
SetDefaultPriority(super, PRIO_MESSAGE); SetDefaultPriority(super, PRIO_MESSAGE);
} }
super->interactType = 0; super->interactType = INTERACTION_NONE;
SoundReq(SFX_VO_CAT); SoundReq(SFX_VO_CAT);
} }

View File

@ -235,9 +235,9 @@ void sub_0806920C(CowEntity* this) {
// Check if player interacting // Check if player interacting
void sub_0806924C(CowEntity* this) { void sub_0806924C(CowEntity* this) {
s8 itype = super->interactType; s8 itype = super->interactType;
if (itype != 0) { if (itype != INTERACTION_NONE) {
if ((gPlayerState.flags & PL_MINISH) != 0) { if (gPlayerState.flags & PL_MINISH) {
if (itype == 2) { if (itype == INTERACTION_FUSE) {
super->action = 4; super->action = 4;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
@ -248,7 +248,7 @@ void sub_0806924C(CowEntity* this) {
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
SoundReq(SFX_VO_COW); SoundReq(SFX_VO_COW);
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
} }

View File

@ -107,9 +107,9 @@ void sub_0806E648(CuccoEntity* this) {
} }
void sub_0806E65C(Entity* this) { void sub_0806E65C(Entity* this) {
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
if ((gPlayerState.flags & PL_MINISH) != 0) { if (gPlayerState.flags & PL_MINISH) {
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 4; this->action = 4;
InitializeNPCFusion(this); InitializeNPCFusion(this);
} else { } else {
@ -119,7 +119,7 @@ void sub_0806E65C(Entity* this) {
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
SoundReq(SFX_VO_CUCCO_CALL); SoundReq(SFX_VO_CUCCO_CALL);
this->interactType = 0; this->interactType = INTERACTION_NONE;
} }
} }

View File

@ -86,9 +86,9 @@ void sub_0806E824(CuccoChickEntity* this) {
} }
void sub_0806E838(CuccoChickEntity* this) { void sub_0806E838(CuccoChickEntity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
if ((gPlayerState.flags & PL_MINISH) != 0) { if (gPlayerState.flags & PL_MINISH) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
@ -98,7 +98,7 @@ void sub_0806E838(CuccoChickEntity* this) {
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
SoundReq(SFX_VO_CHEEP); SoundReq(SFX_VO_CHEEP);
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
} }

View File

@ -27,9 +27,9 @@ void Dampe(Entity* this) {
InitScriptForNPC(this); InitScriptForNPC(this);
return; return;
case 1: case 1:
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(this, InitAnimationForceUpdate(this,
GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity)) + 4); GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity)) + 4);
InitializeNPCFusion(this); InitializeNPCFusion(this);

View File

@ -22,9 +22,9 @@ void Din(DinEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,

View File

@ -460,9 +460,9 @@ void sub_08069FE8(DogEntity* this) {
} }
void sub_0806A028(DogEntity* this) { void sub_0806A028(DogEntity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
if ((gPlayerState.flags & PL_MINISH) != 0) { if ((gPlayerState.flags & PL_MINISH) != 0) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 6; super->action = 6;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
@ -474,7 +474,7 @@ void sub_0806A028(DogEntity* this) {
SoundReq(SFX_VO_DOG); SoundReq(SFX_VO_DOG);
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
} }

View File

@ -94,9 +94,9 @@ void sub_08065A64(EponaEntity* this) {
} }
void sub_08065AA4(EponaEntity* this) { void sub_08065AA4(EponaEntity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
if (gPlayerState.flags & PL_MINISH) { if (gPlayerState.flags & PL_MINISH) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 4; super->action = 4;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
@ -110,7 +110,7 @@ void sub_08065AA4(EponaEntity* this) {
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
SoundReq(SFX_VO_EPONA); SoundReq(SFX_VO_EPONA);
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
} }

View File

@ -22,9 +22,9 @@ void Farore(FaroreEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,

View File

@ -44,9 +44,9 @@ void sub_0805FE10(FestariEntity* this) {
void sub_0805FE48(FestariEntity* this) { void sub_0805FE48(FestariEntity* this) {
u32 uVar4; u32 uVar4;
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {

View File

@ -532,9 +532,9 @@ void ForestMinish(ForestMinishEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
ExecuteScriptForEntity(super, NULL); ExecuteScriptForEntity(super, NULL);

View File

@ -24,9 +24,9 @@ void Gentari(GentariEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -78,9 +78,9 @@ void sub_08065C0C(GhostBrothersEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
@ -240,8 +240,8 @@ void sub_08065EDC(GhostBrothersEntity* this) {
void sub_08065F20(GhostBrothersEntity* this) { void sub_08065F20(GhostBrothersEntity* this) {
UpdateAnimationSingleFrame(super); UpdateAnimationSingleFrame(super);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
MessageFromTarget(0); MessageFromTarget(0);
super->animIndex++; super->animIndex++;
if (gSpriteAnimations_GhostBrothers[super->animIndex] == 0) { if (gSpriteAnimations_GhostBrothers[super->animIndex] == 0) {

View File

@ -25,9 +25,9 @@ void Gina(GinaEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -101,8 +101,8 @@ void sub_080697EC(Entity* this) {
this->subtimer--; this->subtimer--;
} }
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
sub_08069888(this); sub_08069888(this);
} }
} }
@ -118,8 +118,8 @@ void sub_08069838(GormanEntity* this) {
sub_0807DD64(super); sub_0807DD64(super);
} }
ExecuteScriptAndHandleAnimation(super, NULL); ExecuteScriptAndHandleAnimation(super, NULL);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
sub_08069888(super); sub_08069888(super);
} }
} }

View File

@ -62,7 +62,7 @@ void sub_08069328(Entity* this) {
if (this->animIndex != this->animationState) { if (this->animIndex != this->animationState) {
InitAnimationForceUpdate(this, this->animationState); InitAnimationForceUpdate(this, this->animationState);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
RequestPriority(this); RequestPriority(this);
InitAnimationForceUpdate(this, 8); InitAnimationForceUpdate(this, 8);
@ -74,7 +74,7 @@ void sub_08069390(Entity* this) {
UpdateAnimationSingleFrame(this); UpdateAnimationSingleFrame(this);
if ((gMessage.doTextBox & 0x7F) == 0) { if ((gMessage.doTextBox & 0x7F) == 0) {
this->action = 1; this->action = 1;
this->interactType = 0; this->interactType = INTERACTION_NONE;
RevokePriority(this); RevokePriority(this);
InitAnimationForceUpdate(this, this->animationState); InitAnimationForceUpdate(this, this->animationState);
} }

View File

@ -99,9 +99,9 @@ void sub_0806CC08(GregalEntity* this) {
SetDefaultPriority(super, PRIO_MESSAGE); SetDefaultPriority(super, PRIO_MESSAGE);
sub_0807DD64(super); sub_0807DD64(super);
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 8); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 8);

View File

@ -330,9 +330,9 @@ void sub_08063DC8(Entity* this) {
} else { } else {
GetNextFrame(this); GetNextFrame(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 3; this->action = 3;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitializeAnimation(this, GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity))); InitializeAnimation(this, GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity)));
sub_08064428(this); sub_08064428(this);
} }
@ -387,9 +387,9 @@ void sub_08063F20(GuardEntity* this) {
ExecuteScriptForEntity(super, 0); ExecuteScriptForEntity(super, 0);
HandleEntity0x82Actions(super); HandleEntity0x82Actions(super);
GetNextFrame(super); GetNextFrame(super);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action++; super->action++;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, InitializeAnimation(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + this->unk_70); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + this->unk_70);
sub_08064428(super); sub_08064428(super);

View File

@ -34,9 +34,9 @@ void HurdyGurdyMan(HurdyGurdyManEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->unk_69 = super->animIndex; this->unk_69 = super->animIndex;
InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
index = GetFuserId(super); index = GetFuserId(super);

View File

@ -238,7 +238,7 @@ void sub_080620F4(KidEntity* this) {
} }
void sub_08062130(KidEntity* this) { void sub_08062130(KidEntity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
InitAnimationForceUpdate(super, GetAnimationState(super)); InitAnimationForceUpdate(super, GetAnimationState(super));
} }
@ -258,7 +258,7 @@ void sub_08062130(KidEntity* this) {
void sub_08062194(KidEntity* this) { void sub_08062194(KidEntity* this) {
MessageFromTarget(0); MessageFromTarget(0);
super->action = 1; super->action = 1;
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
void sub_080621AC(KidEntity* this) { void sub_080621AC(KidEntity* this) {
@ -285,24 +285,24 @@ void sub_080621AC(KidEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
if ((s8)this->unk_68 != 0) { if ((s8)this->unk_68 != 0) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
} else { } else {
sub_080622F4(this); sub_080622F4(this);
return; return;
} }
} else { } else {
ExecuteScriptAndHandleAnimation(super, NULL); ExecuteScriptAndHandleAnimation(super, NULL);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
} else { } else {
return; return;
} }

View File

@ -35,8 +35,8 @@ void KingDaltus(KingDaltusEntity* this) {
sub_08066718, sub_08066718,
}; };
if ((super->flags & ENT_SCRIPTED) != 0) { if ((super->flags & ENT_SCRIPTED) != 0) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->action = 2; super->action = 2;
InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
@ -71,9 +71,9 @@ void sub_08066688(KingDaltusEntity* this) {
if (sub_0806F078(super, tmp) == 0) { if (sub_0806F078(super, tmp) == 0) {
UpdateAnimationSingleFrame(super); UpdateAnimationSingleFrame(super);
} }
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
} }
} }

View File

@ -26,9 +26,9 @@ void Librari(LibrariEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
ExecuteScriptForEntity(super, NULL); ExecuteScriptForEntity(super, NULL);

View File

@ -38,7 +38,7 @@ void sub_08063210(Entity* this) {
void sub_08063220(Entity* this) { void sub_08063220(Entity* this) {
u8 bVar1; u8 bVar1;
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
bVar1 = 8; bVar1 = 8;
} else { } else {

View File

@ -60,9 +60,9 @@ void sub_08065888(MalonEntity* this) {
} }
void sub_080658BC(MalonEntity* this) { void sub_080658BC(MalonEntity* this) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {

View File

@ -36,9 +36,9 @@ void Mama(MamaEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -29,9 +29,9 @@ void MayorHagen(MayorHagenEntity* this) {
break; break;
case 1: case 1:
v = super->interactType; v = super->interactType;
if (v == 2) { if (v == INTERACTION_FUSE) {
super->action = v; super->action = v;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
4 + GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); 4 + GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));

View File

@ -59,8 +59,8 @@ void sub_08068730(Entity* this) {
this->subtimer--; this->subtimer--;
} }
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
MessageFromTarget(this->timer + TEXT_INDEX(TEXT_MINISH2, 0x0)); MessageFromTarget(this->timer + TEXT_INDEX(TEXT_MINISH2, 0x0));
} }
} }
@ -82,9 +82,9 @@ void sub_08068780(Entity* this) {
InitScriptForNPC(this); InitScriptForNPC(this);
break; break;
case 1: case 1:
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitializeNPCFusion(this); InitializeNPCFusion(this);
} else { } else {
ExecuteScriptForEntity(this, NULL); ExecuteScriptForEntity(this, NULL);

View File

@ -57,9 +57,9 @@ void sub_08066808(Entity* this) {
if (sub_0806F078(this, tmp) == 0) { if (sub_0806F078(this, tmp) == 0) {
UpdateAnimationSingleFrame(this); UpdateAnimationSingleFrame(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
} }
} }
@ -76,9 +76,9 @@ void sub_08066864(MinisterPothoEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -92,8 +92,8 @@ void sub_08067E88(Entity* this) {
if (sub_0806F078(this, tmp) == 0) { if (sub_0806F078(this, tmp) == 0) {
GetNextFrame(this); GetNextFrame(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
this->action = 2; this->action = 2;
MessageFromTarget(this->timer + TEXT_INDEX(TEXT_MINISH2, 0x0)); MessageFromTarget(this->timer + TEXT_INDEX(TEXT_MINISH2, 0x0));
} }
@ -131,18 +131,18 @@ void sub_08067EF0(MountainMinishEntity* this) {
InitializeAnimation(super, gUnk_08111304[super->type2]); InitializeAnimation(super, gUnk_08111304[super->type2]);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); InitializeAnimation(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
ExecuteScriptForEntity(super, 0); ExecuteScriptForEntity(super, 0);
HandleEntity0x82Actions(super); HandleEntity0x82Actions(super);
if ((super->type2 == 3) && (super->interactType != 0)) { if ((super->type2 == 3) && (super->interactType != INTERACTION_NONE)) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, InitializeAnimation(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
sub_08068190(super); sub_08068190(super);

View File

@ -41,9 +41,9 @@ void Mutoh(MutohEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4);
InitializeNPCFusion(super); InitializeNPCFusion(super);

View File

@ -22,9 +22,9 @@ void Nayru(NayruEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,

View File

@ -59,8 +59,8 @@ void sub_080662F8(NPC23Entity* this) {
} }
void sub_08066358(NPC23Entity* this) { void sub_08066358(NPC23Entity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
MessageFromTarget(0); MessageFromTarget(0);
if ((super->type2 & 0x10) != 0) { if ((super->type2 & 0x10) != 0) {
super->action = 3; super->action = 3;

View File

@ -46,9 +46,9 @@ static void sub_080669DC(Entity* this) {
if (sVar2 == 0) { if (sVar2 == 0) {
UpdateAnimationSingleFrame(this); UpdateAnimationSingleFrame(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
} }
} }

View File

@ -912,10 +912,10 @@ void sub_08061B18(NPC5Entity* this) {
u16* puVar2; u16* puVar2;
switch (super->interactType) { switch (super->interactType) {
case 0: case INTERACTION_NONE:
break; break;
case 1: case INTERACTION_TALK:
super->interactType = 0; super->interactType = INTERACTION_NONE;
sub_08061AFC(this); sub_08061AFC(this);
puVar2 = this->unk_68; puVar2 = this->unk_68;
puVar2 += (super->timer++); puVar2 += (super->timer++);

View File

@ -33,8 +33,8 @@ void sub_08062AF0(Entity* this) {
void sub_08062B14(Entity* this) { void sub_08062B14(Entity* this) {
GetNextFrame(this); GetNextFrame(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
this->action++; this->action++;
InitializeAnimation(this, 1); InitializeAnimation(this, 1);
RequestPriority(this); RequestPriority(this);

View File

@ -58,8 +58,8 @@ void sub_0806B3CC(Entity* this) {
AddInteractableWhenBigObject(this); AddInteractableWhenBigObject(this);
} }
GetNextFrame(this); GetNextFrame(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
MessageFromTarget(0); MessageFromTarget(0);
} }
sub_0806ED78(this); sub_0806ED78(this);
@ -81,9 +81,9 @@ void sub_0806B41C(PercyEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, InitializeAnimation(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4);
idx = GetFuserId(super); idx = GetFuserId(super);

View File

@ -90,8 +90,8 @@ void PicolyteBottle_Action1(PicolyteBottleEntity* this) {
void PicolyteBottle_Action2(PicolyteBottleEntity* this) { void PicolyteBottle_Action2(PicolyteBottleEntity* this) {
Entity* obj; Entity* obj;
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->parent->timer = super->type2; super->parent->timer = super->type2;
super->parent->type2 = super->subtimer; super->parent->type2 = super->subtimer;
} else { } else {

View File

@ -65,7 +65,7 @@ void sub_08063AC0(Entity* this) {
} }
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
InitAnimationForceUpdate(this, GetAnimationState(this) + 4); InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01)); MessageFromTarget(this->timer + TEXT_INDEX(TEXT_EMPTY, 0x01));
@ -90,9 +90,9 @@ void sub_08063B68(PinaEntity* this) {
this->animIndex = 0; this->animIndex = 0;
sub_0807DD64(super); sub_0807DD64(super);
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 4);

View File

@ -195,8 +195,8 @@ void sub_0806045C(Entity* this) {
UpdateAnimationSingleFrame(this); UpdateAnimationSingleFrame(this);
sub_080604DC(this); sub_080604DC(this);
switch (this->interactType) { switch (this->interactType) {
case 1: case INTERACTION_TALK:
case 2: case INTERACTION_FUSE:
this->action = 2; this->action = 2;
MessageFromTarget(0); MessageFromTarget(0);
break; break;
@ -253,16 +253,16 @@ void sub_08060528(PostmanEntity* this) {
InitScriptForNPC(super); InitScriptForNPC(super);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
} else { } else {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
sub_080606D8(super); sub_080606D8(super);
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));

View File

@ -360,13 +360,13 @@ void sub_0806A958(Entity* this) {
void sub_0806A96C(Entity* this, ScriptExecutionContext* context) { void sub_0806A96C(Entity* this, ScriptExecutionContext* context) {
context->condition = 0; context->condition = 0;
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
if (this->action != 3) { if (this->action != 3) {
this->action = 3; this->action = 3;
this->subAction = 0; this->subAction = 0;
} else { } else {
if (this->subAction > 1) { if (this->subAction > 1) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
context->condition = 1; context->condition = 1;
gActiveScriptInfo.flags |= 1; gActiveScriptInfo.flags |= 1;
} }

View File

@ -148,9 +148,9 @@ void SittingPersion_Init(SittingPersonEntity* this) {
void sub_080637B8(SittingPersonEntity* this) { void sub_080637B8(SittingPersonEntity* this) {
u32 tmp; u32 tmp;
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
tmp = GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)); tmp = GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity));
tmp += super->spriteSettings.flipX ? 4 : 0; tmp += super->spriteSettings.flipX ? 4 : 0;

View File

@ -45,9 +45,9 @@ void Smith(SmithEntity* this) {
u32 index; u32 index;
if ((super->flags & ENT_SCRIPTED) != 0) { if ((super->flags & ENT_SCRIPTED) != 0) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 4; super->action = 4;
super->interactType = 0; super->interactType = INTERACTION_NONE;
index = (super->animIndex == 0xc) ? 8 : 0; index = (super->animIndex == 0xc) ? 8 : 0;
index += GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)); index += GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity));
InitAnimationForceUpdate(super, index); InitAnimationForceUpdate(super, index);
@ -109,7 +109,7 @@ void sub_08066118(SmithEntity* this) {
if (sub_0806F078(super, uVar1) == 0) { if (sub_0806F078(super, uVar1) == 0) {
UpdateAnimationSingleFrame(super); UpdateAnimationSingleFrame(super);
} }
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
MessageFromTarget(0); MessageFromTarget(0);
} }

View File

@ -46,8 +46,8 @@ void sub_08062BD4(Entity* this) {
void sub_08062BF8(Entity* this) { void sub_08062BF8(Entity* this) {
GetNextFrame(this); GetNextFrame(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
this->action++; this->action++;
RequestPriority(this); RequestPriority(this);
} }

View File

@ -81,7 +81,7 @@ void sub_080650CC(StockwellEntity* this) {
InitScriptExecutionContext(this->context, script_StockwellDogFood); InitScriptExecutionContext(this->context, script_StockwellDogFood);
} else { } else {
bVar2 = super->frame & 0x20; bVar2 = super->frame & 0x20;
if ((bVar2 == 0) && (super->interactType != 0)) { if ((bVar2 == 0) && (super->interactType != INTERACTION_NONE)) {
super->interactType = bVar2; super->interactType = bVar2;
super->action++; super->action++;
InitializeAnimation(super, 7); InitializeAnimation(super, 7);

View File

@ -62,9 +62,9 @@ void Sturgeon(SturgeonEntity* this) {
super->action = 1; super->action = 1;
} }
} else { } else {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = super->action | 0xff; super->action = super->action | 0xff;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(super, InitAnimationForceUpdate(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
InitializeNPCFusion(super); InitializeNPCFusion(super);
@ -93,7 +93,7 @@ void sub_08064B88(SturgeonEntity* this) {
s32 temp2; s32 temp2;
switch (super->interactType) { switch (super->interactType) {
case 0: case INTERACTION_NONE:
temp = sub_0806EE20(super); temp = sub_0806EE20(super);
super->animationState = super->knockbackDirection; super->animationState = super->knockbackDirection;
if (temp != 0) { if (temp != 0) {
@ -101,7 +101,7 @@ void sub_08064B88(SturgeonEntity* this) {
} }
GetNextFrame(super); GetNextFrame(super);
break; break;
case 2: case INTERACTION_FUSE:
super->action = 3; super->action = 3;
temp2 = GetAnimationState(super); temp2 = GetAnimationState(super);
if (temp2 < 0) { if (temp2 < 0) {
@ -109,10 +109,10 @@ void sub_08064B88(SturgeonEntity* this) {
} }
super->subtimer = super->animIndex; super->subtimer = super->animIndex;
InitializeAnimation(super, temp2); InitializeAnimation(super, temp2);
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
break; break;
case 1: case INTERACTION_TALK:
default: default:
super->action = 2; super->action = 2;
temp2 = GetAnimationState(super); temp2 = GetAnimationState(super);
@ -121,7 +121,7 @@ void sub_08064B88(SturgeonEntity* this) {
} }
super->subtimer = super->animIndex; super->subtimer = super->animIndex;
InitializeAnimation(super, temp2); InitializeAnimation(super, temp2);
super->interactType = 0; super->interactType = INTERACTION_NONE;
sub_08064CD8(super); sub_08064CD8(super);
} }
} }

View File

@ -84,8 +84,8 @@ void sub_0806559C(Entity* this) {
GetNextFrame(this); GetNextFrame(this);
} }
sub_0806ED78(this); sub_0806ED78(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
} }
} }
@ -101,10 +101,10 @@ void sub_08065608(TalonEntity* this) {
} }
void sub_08065648(TalonEntity* this) { void sub_08065648(TalonEntity* this) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
this->unk_69 = super->action; this->unk_69 = super->action;
super->action = 4; super->action = 4;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
ExecuteScriptAndHandleAnimation(super, NULL); ExecuteScriptAndHandleAnimation(super, NULL);
@ -127,20 +127,20 @@ void sub_080656A4(TalonEntity* this) {
} }
void sub_080656D4(TalonEntity* this) { void sub_080656D4(TalonEntity* this) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
this->unk_69 = super->action; this->unk_69 = super->action;
super->action = 4; super->action = 4;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
sub_0806574C(this); sub_0806574C(this);
} else { } else {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
if (GetInventoryValue(ITEM_QST_LONLON_KEY) != 0) { if (GetInventoryValue(ITEM_QST_LONLON_KEY) != 0) {
StartCutscene(super, (u16*)&script_TalonGotKey); StartCutscene(super, (u16*)&script_TalonGotKey);
} else { } else {
this->unk_69 = super->action; this->unk_69 = super->action;
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
MessageNoOverlap(*(u32*)(*(u32*)&this->unk_84 + 4), super); MessageNoOverlap(*(u32*)(*(u32*)&this->unk_84 + 4), super);
sub_0806574C(this); sub_0806574C(this);
return; return;

View File

@ -35,9 +35,9 @@ void Teachers(TeachersEntity* this) {
} }
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
this->animIndex = super->animIndex; this->animIndex = super->animIndex;
InitializeAnimation(super, (super->animIndex & -4) + GetAnimationStateForDirection4( InitializeAnimation(super, (super->animIndex & -4) + GetAnimationStateForDirection4(
GetFacingDirection(super, &gPlayerEntity))); GetFacingDirection(super, &gPlayerEntity)));

View File

@ -43,7 +43,7 @@ void sub_08064D90(Entity* this) {
void sub_08064DA0(Entity* this) { void sub_08064DA0(Entity* this) {
sub_08064EE8(this); sub_08064EE8(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->action = 2; this->action = 2;
InitAnimationForceUpdate(this, 6); InitAnimationForceUpdate(this, 6);
MessageFromTarget(0); MessageFromTarget(0);
@ -67,9 +67,9 @@ void sub_08064DE4(Entity* this) {
InitScriptForNPC(this); InitScriptForNPC(this);
break; break;
case 1: case 1:
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 2; this->action = 2;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitAnimationForceUpdate(this, InitAnimationForceUpdate(this,
GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity))); GetAnimationStateForDirection4(GetFacingDirection(this, &gPlayerEntity)));
InitializeNPCFusion(this); InitializeNPCFusion(this);

View File

@ -229,16 +229,16 @@ void sub_0806ACC4(TownMinishEntity* this) {
InitializeAnimation(super, (super->animationState / 2) + 8); InitializeAnimation(super, (super->animationState / 2) + 8);
break; break;
case 1: case 1:
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
} else { } else {
ExecuteScriptForEntity(super, NULL); ExecuteScriptForEntity(super, NULL);
sub_0806AEA8(this); sub_0806AEA8(this);
if (super->type2 == 10 && super->interactType) { if (super->type2 == 10 && super->interactType) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeAnimation(super, InitializeAnimation(super,
GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 8); GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)) + 8);
sub_0806AFE8(super, this->context); sub_0806AFE8(super, this->context);

View File

@ -73,8 +73,8 @@ void sub_08061C00(Entity* this) {
} }
sub_08061CB4(this, uVar1); sub_08061CB4(this, uVar1);
sub_0806ED78(this); sub_0806ED78(this);
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
MessageFromTarget(this->type2 + TEXT_INDEX(TEXT_EMPTY, 0x01)); MessageFromTarget(this->type2 + TEXT_INDEX(TEXT_EMPTY, 0x01));
} }
} }
@ -126,9 +126,9 @@ void sub_08061CEC(TownspersonEntity* this) {
} }
void sub_08061D64(TownspersonEntity* this) { void sub_08061D64(TownspersonEntity* this) {
if (super->interactType == 2) { if (super->interactType == INTERACTION_FUSE) {
super->action = 3; super->action = 3;
super->interactType = 0; super->interactType = INTERACTION_NONE;
InitializeNPCFusion(super); InitializeNPCFusion(super);
this->unk_69 = super->animIndex; this->unk_69 = super->animIndex;
InitializeAnimation(super, (super->animIndex & -4) + InitializeAnimation(super, (super->animIndex & -4) +
@ -140,9 +140,9 @@ void sub_08061D64(TownspersonEntity* this) {
super->frameDuration = gUnk_0810B680[super->type].unk2; super->frameDuration = gUnk_0810B680[super->type].unk2;
} }
GetNextFrame(super); GetNextFrame(super);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
super->interactType = 0; super->interactType = INTERACTION_NONE;
sub_08062048(super); sub_08062048(super);
this->unk_69 = super->animIndex; this->unk_69 = super->animIndex;
InitializeAnimation(super, (super->animIndex & -4) + InitializeAnimation(super, (super->animIndex & -4) +

View File

@ -63,9 +63,9 @@ void sub_0806C7D4(Entity* this) {
u32 iVar1; u32 iVar1;
u32 uVar2; u32 uVar2;
if (this->interactType == 2) { if (this->interactType == INTERACTION_FUSE) {
this->action = 3; this->action = 3;
this->interactType = 0; this->interactType = INTERACTION_NONE;
InitializeNPCFusion(this); InitializeNPCFusion(this);
} else { } else {
ExecuteScriptAndHandleAnimation(this, NULL); ExecuteScriptAndHandleAnimation(this, NULL);

View File

@ -83,7 +83,7 @@ void BossDoor_Init(BossDoorEntity* this) {
} }
void BossDoor_Action1(BossDoorEntity* this) { void BossDoor_Action1(BossDoorEntity* this) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 2; super->action = 2;
RemoveInteractableObject(super); RemoveInteractableObject(super);
SetFlag(this->unk_86); SetFlag(this->unk_86);

View File

@ -148,7 +148,7 @@ void ChestSpawner_Type2Action2(ChestSpawnerEntity* this) {
void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) { void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
sub_0800445C(super); sub_0800445C(super);
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->action = 4; super->action = 4;
super->subtimer = 30; super->subtimer = 30;
RemoveInteractableObject(super); RemoveInteractableObject(super);

View File

@ -395,8 +395,8 @@ void CutsceneMiscObject_Type6(CutsceneMiscObjectEntity* this) {
AddInteractableCheckableObject(super); AddInteractableCheckableObject(super);
break; break;
case 1: case 1:
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->action = 2; super->action = 2;
RemoveInteractableObject(super); RemoveInteractableObject(super);
gPlayerState.queued_action = PLAYER_EMPTYBOTTLE; gPlayerState.queued_action = PLAYER_EMPTYBOTTLE;
@ -449,8 +449,8 @@ void CutsceneMiscObject_Type7(CutsceneMiscObjectEntity* this) {
AddInteractableCheckableObject(super); AddInteractableCheckableObject(super);
break; break;
case 1: case 1:
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->action = 2; super->action = 2;
RemoveInteractableObject(super); RemoveInteractableObject(super);
CreateEzloHint(TEXT_INDEX(TEXT_BELARI, 0x1F), 0); CreateEzloHint(TEXT_INDEX(TEXT_BELARI, 0x1F), 0);

View File

@ -125,8 +125,8 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) {
AddInteractableCheckableObject(super); AddInteractableCheckableObject(super);
break; break;
case 1: case 1:
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
ResetPlayerAnimationAndAction(); ResetPlayerAnimationAndAction();
if (CheckLocalFlag(SHOP07_TANA)) { if (CheckLocalFlag(SHOP07_TANA)) {
this->unk_7a = 2; this->unk_7a = 2;

View File

@ -86,15 +86,15 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
gUnk_0200AF00.rActionPlayerState = 2; gUnk_0200AF00.rActionPlayerState = 2;
} else { } else {
if (super->type == 0x36) { if (super->type == 0x36) {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->action = 3; super->action = 3;
gRoomVars.animFlags = 1; gRoomVars.animFlags = 1;
gPlayerState.queued_action = PLAYER_08070E9C; gPlayerState.queued_action = PLAYER_08070E9C;
} }
} else { } else {
if (super->interactType != 0) { if (super->interactType != INTERACTION_NONE) {
super->interactType = 0; super->interactType = INTERACTION_NONE;
super->subAction = 1; super->subAction = 1;
sub_08078B48(); sub_08078B48();
ResetActiveItems(); ResetActiveItems();

View File

@ -230,7 +230,7 @@ void LockedDoor_Action7(LockedDoorEntity* this) {
} }
void LockedDoor_Action8(LockedDoorEntity* this) { void LockedDoor_Action8(LockedDoorEntity* this) {
if (super->interactType == 0 && !CheckFlags(this->unk_86)) if (super->interactType == INTERACTION_NONE && !CheckFlags(this->unk_86))
return; return;
super->action = 1; super->action = 1;
super->timer = 20; super->timer = 20;

View File

@ -44,7 +44,7 @@ void ObjectA(ObjectAEntity* this) {
} else { } else {
AddInteractableSmallKeyLock(super); AddInteractableSmallKeyLock(super);
} }
} else if (super->interactType != 0) { } else if (super->interactType != INTERACTION_NONE) {
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer); SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
SetFlag(this->unk_86); SetFlag(this->unk_86);
CreateDust(super); CreateDust(super);

View File

@ -7,6 +7,7 @@
#define NENT_DEPRECATED #define NENT_DEPRECATED
#include "entity.h" #include "entity.h"
#include "flags.h" #include "flags.h"
#include "player.h"
#include "room.h" #include "room.h"
extern void AddInteractableChest(Entity*); extern void AddInteractableChest(Entity*);
@ -21,7 +22,7 @@ void SpecialChest(Entity* this) {
this->collisionLayer = 1; this->collisionLayer = 1;
AddInteractableChest(this); AddInteractableChest(this);
} }
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
OpenSmallChest(COORD_TO_TILE(this), 2); OpenSmallChest(COORD_TO_TILE(this), 2);
DeleteThisEntity(); DeleteThisEntity();
} }

View File

@ -36,8 +36,8 @@ void SwordsmanNewsletter_Action1(Entity* this) {
TEXT_INDEX(TEXT_NEWSLETTER, 4), TEXT_INDEX(TEXT_NEWSLETTER, 5), TEXT_INDEX(TEXT_NEWSLETTER, 6), TEXT_INDEX(TEXT_NEWSLETTER, 4), TEXT_INDEX(TEXT_NEWSLETTER, 5), TEXT_INDEX(TEXT_NEWSLETTER, 6),
TEXT_INDEX(TEXT_NEWSLETTER, 7), TEXT_INDEX(TEXT_NEWSLETTER, 8), TEXT_INDEX(TEXT_NEWSLETTER, 7), TEXT_INDEX(TEXT_NEWSLETTER, 8),
}; };
if (this->interactType != 0) { if (this->interactType != INTERACTION_NONE) {
this->interactType = 0; this->interactType = INTERACTION_NONE;
MessageNoOverlap(messageIndices[this->type], this); MessageNoOverlap(messageIndices[this->type], this);
} }
} }

View File

@ -1012,7 +1012,7 @@ void DetermineRButtonInteraction(void) {
rAction = gUnk_0200AF00.rActionInteractTile; rAction = gUnk_0200AF00.rActionInteractTile;
} else { } else {
interaction = sub_080784E4(); interaction = sub_080784E4();
if (interaction->entity->interactType == 0) { if (interaction->entity->interactType == INTERACTION_NONE) {
switch (interaction->type) { switch (interaction->type) {
case INTERACTION_TALK: case INTERACTION_TALK:
@ -1115,10 +1115,10 @@ bool32 sub_080782C0(void) {
AddKinstoneToBag(KINSTONE_NONE); AddKinstoneToBag(KINSTONE_NONE);
if (gSave.kinstoneAmounts[0] != 0) { if (gSave.kinstoneAmounts[0] != 0) {
gPossibleInteraction.kinstoneId = gPossibleInteraction.currentObject->kinstoneId; gPossibleInteraction.kinstoneId = gPossibleInteraction.currentObject->kinstoneId;
gPossibleInteraction.currentObject->entity->interactType = 2; gPossibleInteraction.currentObject->entity->interactType = INTERACTION_FUSE;
gPlayerState.queued_action = PLAYER_08070E9C; gPlayerState.queued_action = PLAYER_08070E9C;
} else { } else {
CreateEzloHint(TEXT_INDEX(TEXT_EZLO, 0x65), 0); CreateEzloHint(TEXT_INDEX(TEXT_EZLO, 0x65), 0); // "Hey, you don't have any Kinstone Pieces! ..."
} }
ForceSetPlayerState(PL_STATE_TALKEZLO); ForceSetPlayerState(PL_STATE_TALKEZLO);
return TRUE; return TRUE;
@ -1139,12 +1139,12 @@ bool32 sub_080782C0(void) {
case INTERACTION_OPEN_CHEST: case INTERACTION_OPEN_CHEST:
case INTERACTION_USE_SMALL_KEY: case INTERACTION_USE_SMALL_KEY:
case INTERACTION_TALK_MINISH: case INTERACTION_TALK_MINISH:
entity->interactType = 1; entity->interactType = INTERACTION_TALK;
gPossibleInteraction.kinstoneId = KINSTONE_NONE; gPossibleInteraction.kinstoneId = KINSTONE_NONE;
return TRUE; return TRUE;
case INTERACTION_LIFT_SHOP_ITEM: case INTERACTION_LIFT_SHOP_ITEM:
if (gRoomVars.shopItemType == 0) { if (gRoomVars.shopItemType == 0) {
entity->interactType = 1; entity->interactType = INTERACTION_TALK;
gRoomVars.shopItemType = entity->type; gRoomVars.shopItemType = entity->type;
gRoomVars.shopItemType2 = entity->type2; gRoomVars.shopItemType2 = entity->type2;
return TRUE; return TRUE;
@ -1161,7 +1161,7 @@ void ResetPossibleInteraction(void) {
// determines which (if any) object the player is currently able to interact with // determines which (if any) object the player is currently able to interact with
InteractableObject* sub_080784E4(void) { InteractableObject* sub_080784E4(void) {
u8 uVar1; u8 frameState;
PlayerFlags r7; PlayerFlags r7;
s32 r3; s32 r3;
PlayerFlags PVar4; PlayerFlags PVar4;
@ -1183,16 +1183,16 @@ InteractableObject* sub_080784E4(void) {
} }
if (gPlayerState.framestate == 0) { if (gPlayerState.framestate == 0) {
uVar1 = gPlayerState.framestate_last; frameState = gPlayerState.framestate_last;
} else { } else {
uVar1 = gPlayerState.framestate; frameState = gPlayerState.framestate;
} }
switch (uVar1) { switch (frameState) {
case 2: case PL_STATE_SWORD:
case 3: case PL_STATE_GUSTJAR:
case 0x12: case PL_STATE_DIE:
case 0x15: case PL_STATE_ITEMGET:
case 0x16: case PL_STATE_DROWN:
l: l:
gPossibleInteraction.currentIndex = 0xFF; gPossibleInteraction.currentIndex = 0xFF;
gPossibleInteraction.currentObject = (InteractableObject*)&gNoInteraction; gPossibleInteraction.currentObject = (InteractableObject*)&gNoInteraction;
@ -1200,7 +1200,7 @@ InteractableObject* sub_080784E4(void) {
return gPossibleInteraction.currentObject; return gPossibleInteraction.currentObject;
} }
if ((gPlayerState.flags & PL_MINISH) == 0) { if (!(gPlayerState.flags & PL_MINISH)) {
r7 = HasDungeonSmallKey() ? PL_BUSY : 0; r7 = HasDungeonSmallKey() ? PL_BUSY : 0;
if (HasDungeonBigKey()) { if (HasDungeonBigKey()) {
r7 |= PL_FLAGS2; r7 |= PL_FLAGS2;
@ -1221,41 +1221,41 @@ InteractableObject* sub_080784E4(void) {
continue; continue;
if (entity->interactType < 0) if (entity->interactType < 0)
break; break;
if ((((iObject->ignoreLayer & 1) == 0) && ((gPlayerEntity.collisionLayer & entity->collisionLayer) == 0)) || if (((iObject->ignoreLayer & 1) == 0 && (gPlayerEntity.collisionLayer & entity->collisionLayer) == 0) ||
((iObject->interactDirections >> (gPlayerEntity.animationState >> 1) & 1) != 0)) (iObject->interactDirections >> (gPlayerEntity.animationState >> 1) & 1) != 0)
continue; continue;
switch (iObject->type) { switch (iObject->type) {
case 0: case INTERACTION_NONE:
continue; continue;
case 1: case INTERACTION_TALK:
case 3: case INTERACTION_OPEN_CHEST:
case 4: case INTERACTION_UNUSED:
case 8: case INTERACTION_LIFT_SHOP_ITEM:
case 9: case INTERACTION_CHECK:
if ((gPlayerState.flags & PL_MINISH) != 0) if (gPlayerState.flags & PL_MINISH)
continue; continue;
break; break;
case 7: case INTERACTION_TALK_MINISH:
PVar4 = gPlayerState.flags & PL_MINISH; PVar4 = gPlayerState.flags & PL_MINISH;
if (PVar4 == 0) if (!PVar4)
continue; continue;
break; break;
case 2: case INTERACTION_FUSE:
PVar4 = (PlayerFlags)iObject->kinstoneId; PVar4 = (PlayerFlags)iObject->kinstoneId;
if (PVar4 == 0) if (PVar4 == 0)
continue; continue;
break; break;
case 5: case INTERACTION_USE_SMALL_KEY:
PVar4 = PL_BUSY & r7; PVar4 = PL_BUSY & r7;
if (PVar4 == 0) if (!PVar4)
continue; continue;
break; break;
case 6: case INTERACTION_USE_BIG_KEY:
PVar4 = PL_FLAGS2 & r7; PVar4 = PL_FLAGS2 & r7;
if (PVar4 == 0) if (!PVar4)
continue; continue;
break; break;
case 10: case INTERACTION_DROP_PEDESTAL:
default: default:
break; break;
} }
@ -1364,7 +1364,7 @@ void SetInteractableObjectCollision(Entity* arg0, u32 ignoreLayer, u32 interactD
s32 AddInteractableObject(Entity* entity, InteractionType type, KinstoneId kinstoneId) { s32 AddInteractableObject(Entity* entity, InteractionType type, KinstoneId kinstoneId) {
s32 index; s32 index;
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
index = GetInteractableObjectIndex(entity); index = GetInteractableObjectIndex(entity);
if (index < 0) { if (index < 0) {
index = GetInteractableObjectIndex(0); index = GetInteractableObjectIndex(0);

View File

@ -792,7 +792,7 @@ void ScriptCommand_CheckPlayerInRegion2(Entity* entity, ScriptExecutionContext*
void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContext* context) { void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContext* context) {
if (entity->interactType) { if (entity->interactType) {
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
context->condition = 1; context->condition = 1;
} else { } else {
context->condition = 0; context->condition = 0;
@ -807,7 +807,7 @@ void ScriptCommand_FacePlayerAndCheckDist(Entity* entity, ScriptExecutionContext
} }
context->unk_1A++; context->unk_1A++;
if (entity->interactType) { if (entity->interactType) {
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
context->condition = 1; context->condition = 1;
entity->animationState = GetAnimationStateForDirection8(GetFacingDirection(entity, &gPlayerEntity)); entity->animationState = GetAnimationStateForDirection8(GetFacingDirection(entity, &gPlayerEntity));
} else { } else {
@ -1108,7 +1108,7 @@ void ScriptCommand_SetAnimation(Entity* entity, ScriptExecutionContext* context)
void ScriptCommand_TriggerInteract(Entity* entity, ScriptExecutionContext* context) { void ScriptCommand_TriggerInteract(Entity* entity, ScriptExecutionContext* context) {
if (entity->interactType) { if (entity->interactType) {
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
gActiveScriptInfo.flags |= 1; gActiveScriptInfo.flags |= 1;
} else { } else {
gActiveScriptInfo.commandSize = 0; gActiveScriptInfo.commandSize = 0;
@ -1124,7 +1124,7 @@ void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context) {
case 0: case 0:
if (!entity->interactType) if (!entity->interactType)
break; break;
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
context->unk_18++; context->unk_18++;
MessageFromTarget(context->scriptInstructionPointer[1]); MessageFromTarget(context->scriptInstructionPointer[1]);
break; break;
@ -1177,9 +1177,9 @@ void ScriptCommand_UpdateFusion(Entity* entity, ScriptExecutionContext* context)
} }
void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context) { void ScriptCommand_0807EA4C(Entity* entity, ScriptExecutionContext* context) {
if (entity->interactType == 2) { if (entity->interactType == INTERACTION_FUSE) {
InitializeFuseInfo(entity, 0, 0, 0); InitializeFuseInfo(entity, 0, 0, 0);
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
gActiveScriptInfo.flags |= 1; gActiveScriptInfo.flags |= 1;
} else { } else {
gActiveScriptInfo.commandSize = 0; gActiveScriptInfo.commandSize = 0;
@ -1719,12 +1719,12 @@ void LoadMenu(Entity* entity, ScriptExecutionContext* context) {
void CheckInteractType(Entity* entity, ScriptExecutionContext* context) { void CheckInteractType(Entity* entity, ScriptExecutionContext* context) {
switch (entity->interactType) { switch (entity->interactType) {
case 1: case INTERACTION_TALK:
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
context->intVariable = 1; context->intVariable = 1;
break; break;
case 2: case INTERACTION_FUSE:
entity->interactType = 0; entity->interactType = INTERACTION_NONE;
context->intVariable = 2; context->intVariable = 2;
break; break;
default: default: