diff options
author | YamaArashi <shadow962@live.com> | 2017-05-09 20:39:43 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2017-05-09 20:39:43 -0700 |
commit | 242af849cb56ce0c4469c4e2be82a3ad5dbd3434 (patch) | |
tree | 468360415238c42c9eac3d489ed465cb7b52ec3e /src/clock.c | |
parent | b7efd72ac411800d709082dab220470544541c90 (diff) |
minutes, not seconds
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; } } |