diff options
Diffstat (limited to 'src/code/z_parameter.c')
| -rw-r--r-- | src/code/z_parameter.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 9b6a48e66..62c8314f8 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -3829,7 +3829,7 @@ void Interface_Draw(GlobalContext* globalCtx) { void Interface_Update(GlobalContext* globalCtx) { static u8 D_80125B60 = false; - static s16 sPrevTimeIncrement = 0; + static s16 sPrevTimeSpeed = 0; MessageContext* msgCtx = &globalCtx->msgCtx; InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; Player* player = GET_PLAYER(globalCtx); @@ -4152,35 +4152,35 @@ void Interface_Update(GlobalContext* globalCtx) { } // handle suns song in areas where time moves - if (globalCtx->envCtx.timeIncrement != 0) { + if (globalCtx->envCtx.sceneTimeSpeed != 0) { if (gSaveContext.sunsSongState != SUNSSONG_SPEED_TIME) { D_80125B60 = false; - if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime <= 0xC001)) { + if ((gSaveContext.dayTime >= CLOCK_TIME(6, 30)) && (gSaveContext.dayTime <= CLOCK_TIME(18, 0) + 1)) { D_80125B60 = true; } gSaveContext.sunsSongState = SUNSSONG_SPEED_TIME; - sPrevTimeIncrement = gTimeIncrement; - gTimeIncrement = 400; + sPrevTimeSpeed = gTimeSpeed; + gTimeSpeed = 400; } else if (!D_80125B60) { - if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime <= 0xC001)) { + if ((gSaveContext.dayTime >= CLOCK_TIME(6, 30)) && (gSaveContext.dayTime <= CLOCK_TIME(18, 0) + 1)) { gSaveContext.sunsSongState = SUNSSONG_INACTIVE; - gTimeIncrement = sPrevTimeIncrement; + gTimeSpeed = sPrevTimeSpeed; globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04; } - } else if (gSaveContext.dayTime > 0xC001) { + } else if (gSaveContext.dayTime > CLOCK_TIME(18, 0) + 1) { gSaveContext.sunsSongState = SUNSSONG_INACTIVE; - gTimeIncrement = sPrevTimeIncrement; + gTimeSpeed = sPrevTimeSpeed; globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04; } } else if ((globalCtx->roomCtx.curRoom.unk_03 != 1) && (interfaceCtx->restrictions.sunsSong != 3)) { - if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xC001)) { - gSaveContext.nextDayTime = 0; + if ((gSaveContext.dayTime >= CLOCK_TIME(6, 30)) && (gSaveContext.dayTime < CLOCK_TIME(18, 0) + 1)) { + gSaveContext.nextDayTime = NEXT_TIME_NIGHT; globalCtx->transitionType = TRANS_TYPE_FADE_BLACK_FAST; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK; globalCtx->unk_11DE9 = true; } else { - gSaveContext.nextDayTime = 0x8001; + gSaveContext.nextDayTime = NEXT_TIME_DAY; globalCtx->transitionType = TRANS_TYPE_FADE_WHITE_FAST; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE; globalCtx->unk_11DE9 = true; |
