From cdacc2771426a8e4ec5ccc5d7ba0d8d7c4224c36 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Jun 2018 14:26:33 +0200 Subject: [PATCH] change for loop in fldeff_cut --- src/fldeff_cut.c | 7 ++++--- src/fldeff_strength.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index bdc9b7868..c2f5e7731 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -352,10 +352,11 @@ static void StartCutGrassFieldEffect(void) bool8 FldEff_CutGrass(void) { s16 x, y; - u8 tileBehavior; - u8 i; + u8 i = 0; - for (i = 0, PlaySE(SE_W015), PlayerGetDestCoords(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); i < CUT_HYPER_AREA; i++) + PlaySE(SE_W015); + PlayerGetDestCoords(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); + for (i = 0; i < CUT_HYPER_AREA; i++) { if (sHyperCutTiles[i] == TRUE) { diff --git a/src/fldeff_strength.c b/src/fldeff_strength.c index fb5aa5e95..ae7b557d8 100644 --- a/src/fldeff_strength.c +++ b/src/fldeff_strength.c @@ -6,6 +6,7 @@ #include "rom6.h" #include "script.h" #include "task.h" +#include "constants/event_objects.h" // static functions static void FldEff_UseStrength(void);