diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-11-27 20:04:54 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-27 20:04:54 +1100 |
| commit | c04aaab6a1d0bdaf6071fadc649385fd3e71e774 (patch) | |
| tree | 0ecf2ff0bd2282cc6b2844665dd527f60e2eca68 /src/code/z_sub_s.c | |
| parent | 6dd16009361b2561f77b7933981611a9b975fa21 (diff) | |
Use `CURRENT_TIME` Macro (#1514)
* use CURRENT_TIME macro
* add comment
* cleanup brackets
Diffstat (limited to 'src/code/z_sub_s.c')
| -rw-r--r-- | src/code/z_sub_s.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index f5a233ede..9e19c1dad 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -588,9 +588,9 @@ s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex) { Path* SubS_GetDayDependentPath(PlayState* play, u8 pathIndex, u8 pathIndexNone, s32* startPointIndex) { Path* path = NULL; s32 found = false; - s32 time = (((s16)TIME_TO_MINUTES_F(gSaveContext.save.time) % 60) + - ((s16)TIME_TO_MINUTES_F(gSaveContext.save.time) / 60) * 60) / - 30; + s16 time1 = TIME_TO_MINUTES_F(CURRENT_TIME); + s16 time2 = TIME_TO_MINUTES_F(CURRENT_TIME); + s32 time = ((time1 % 60) + (time2 / 60) * 60) / 30; s32 day = CURRENT_DAY; if (pathIndex == pathIndexNone) { |
