summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-10-23 20:13:31 -0400
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-10-23 20:13:31 -0400
commite28049651fb7f9f5aa6cbb70961d18e54f9e1721 (patch)
treed5ab50b359b1ab73d04337b4a3b3173148f95797 /src
parentcc7ee35fe3cb3cd4135c1c2fbd4e275018cff27a (diff)
fix bad label
Diffstat (limited to 'src')
-rw-r--r--src/engine/clock.c10
-rw-r--r--src/field/berry.c7
2 files changed, 8 insertions, 9 deletions
diff --git a/src/engine/clock.c b/src/engine/clock.c
index 12b82018d..cb8af64a8 100644
--- a/src/engine/clock.c
+++ b/src/engine/clock.c
@@ -61,17 +61,17 @@ static void UpdatePerDay(struct Time *time)
static void UpdatePerMinute(struct Time *time)
{
struct Time newTime;
- s32 totalMinutes;
+ s32 minutesPassed;
CalcTimeDifference(&newTime, &gSaveBlock2.lastBerryTreeUpdate, time);
- totalMinutes = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes;
+ minutesPassed = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes;
- if (totalMinutes == 0) // do not do the update for the first minute.
+ if (minutesPassed == 0) // do not do the update for the first minute.
return;
- if (totalMinutes > -1) // do not perform an update on invalid totalMinutes.
+ if (minutesPassed > -1) // do not perform an update on invalid minutesPassed.
{
- BerryTreeTimeUpdate(totalMinutes);
+ BerryTreeTimeUpdate(minutesPassed);
gSaveBlock2.lastBerryTreeUpdate = *time;
}
}
diff --git a/src/field/berry.c b/src/field/berry.c
index 16a4d2762..bbb643b10 100644
--- a/src/field/berry.c
+++ b/src/field/berry.c
@@ -1163,8 +1163,7 @@ static bool32 BerryTreeGrow(struct BerryTree *tree)
return TRUE;
}
-// totalMinutes is how long its been since the last berry tree update.
-void BerryTreeTimeUpdate(s32 totalMinutes)
+void BerryTreeTimeUpdate(s32 minutesPassed)
{
int i;
struct BerryTree *tree;
@@ -1176,14 +1175,14 @@ void BerryTreeTimeUpdate(s32 totalMinutes)
if (tree->berry != BERRY_NONE && tree->stage != BERRY_STAGE_NO_BERRY && tree->growthSparkle == FALSE)
{
// the player has waited too long to water the berry. Reset the tree. This is because if the berry state is not in the unwatered state, the tree will grow anyway despite this check, which means BerryTreeGrow will handle the regrow process for this, removing the need for this check. This only handles the unwatered soil state.
- if (totalMinutes >= GetStageDurationByBerryType(tree->berry) * 71)
+ if (minutesPassed >= GetStageDurationByBerryType(tree->berry) * 71)
{
*tree = gBlankBerryTree;
}
else
{
// because time is altered below, perhaps they thought it was unsafe to change it, even though that is not how passed arguments behave.
- s32 time = totalMinutes;
+ s32 time = minutesPassed;
while (time != 0)
{