diff options
Diffstat (limited to 'src/clock.c')
-rw-r--r-- | src/clock.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/clock.c b/src/clock.c index 48f937989..b263e99ae 100644 --- a/src/clock.c +++ b/src/clock.c @@ -18,7 +18,7 @@ extern void SetShoalItemFlag(u16); static void InitTimeBasedEvents(void); static void UpdatePerDay(struct Time *time); -static void UpdatePerSecond(struct Time *time); +static void UpdatePerMinute(struct Time *time); static void ReturnFromStartWallClock(void); static void InitTimeBasedEvents(void) @@ -35,7 +35,7 @@ void DoTimeBasedEvents(void) { RtcCalcLocalTime(); UpdatePerDay(&gLocalTime); - UpdatePerSecond(&gLocalTime); + UpdatePerMinute(&gLocalTime); } } @@ -61,20 +61,20 @@ static void UpdatePerDay(struct Time *time) } } -static void UpdatePerSecond(struct Time *time) +static void UpdatePerMinute(struct Time *time) { struct Time newTime; - s32 totalSeconds; + s32 minutes; CalcTimeDifference(&newTime, &gSaveBlock2.lastBerryTreeUpdate, time); - totalSeconds = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes; + minutes = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes; // there's no way to get the correct assembly other than with this nested if check. so dumb. - if (totalSeconds != 0) + if (minutes != 0) { - if (totalSeconds >= 0) + if (minutes >= 0) { - BerryTreeTimeUpdate(totalSeconds); + BerryTreeTimeUpdate(minutes); gSaveBlock2.lastBerryTreeUpdate = *time; } } |