diff options
| author | Reinmmar <31139601+Reinmmar@users.noreply.github.com> | 2023-12-11 01:21:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-10 16:21:31 -0800 |
| commit | b163ecafc9e3fed2bf91ec19ae5cd8c0e80c1b5c (patch) | |
| tree | 1624539c80ff4bb13e0d54c7edb7266f41f46bd5 /src/script.c | |
| parent | aaa441574668f5472662951437c8e4b69acae9c2 (diff) | |
Applied the enum for interactions (#647)
* Interactions enum applied
* Interactions enum applied
Diffstat (limited to 'src/script.c')
| -rw-r--r-- | src/script.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/script.c b/src/script.c index 29579d77..33fcbcf2 100644 --- a/src/script.c +++ b/src/script.c @@ -792,7 +792,7 @@ void ScriptCommand_CheckPlayerInRegion2(Entity* entity, ScriptExecutionContext* void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContext* context) { if (entity->interactType) { - entity->interactType = 0; + entity->interactType = INTERACTION_NONE; context->condition = 1; } else { context->condition = 0; @@ -807,7 +807,7 @@ void ScriptCommand_FacePlayerAndCheckDist(Entity* entity, ScriptExecutionContext } context->unk_1A++; if (entity->interactType) { - entity->interactType = 0; + entity->interactType = INTERACTION_NONE; context->condition = 1; entity->animationState = GetAnimationStateForDirection8(GetFacingDirection(entity, &gPlayerEntity)); } else { @@ -1108,7 +1108,7 @@ void ScriptCommand_SetAnimation(Entity* entity, ScriptExecutionContext* context) void ScriptCommand_TriggerInteract(Entity* entity, ScriptExecutionContext* context) { if (entity->interactType) { - entity->interactType = 0; + entity->interactType = INTERACTION_NONE; gActiveScriptInfo.flags |= 1; } else { gActiveScriptInfo.commandSize = 0; @@ -1124,7 +1124,7 @@ void ScriptCommand_0807E974(Entity* entity, ScriptExecutionContext* context) { case 0: if (!entity->interactType) break; - entity->interactType = 0; + entity->interactType = INTERACTION_NONE; context->unk_18++; MessageFromTarget(context->scriptInstructionPointer[1]); break; @@ -1177,9 +1177,9 @@ void ScriptCommand_UpdateFusion(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); - entity->interactType = 0; + entity->interactType = INTERACTION_NONE; gActiveScriptInfo.flags |= 1; } else { gActiveScriptInfo.commandSize = 0; @@ -1719,12 +1719,12 @@ void LoadMenu(Entity* entity, ScriptExecutionContext* context) { void CheckInteractType(Entity* entity, ScriptExecutionContext* context) { switch (entity->interactType) { - case 1: - entity->interactType = 0; + case INTERACTION_TALK: + entity->interactType = INTERACTION_NONE; context->intVariable = 1; break; - case 2: - entity->interactType = 0; + case INTERACTION_FUSE: + entity->interactType = INTERACTION_NONE; context->intVariable = 2; break; default: |
