summaryrefslogtreecommitdiff
path: root/src/code/z_parameter.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2022-05-20 14:40:13 -0400
committerGitHub <noreply@github.com>2022-05-20 14:40:13 -0400
commit4f0018bf368fb1304e3c758745296d28c4e58c9c (patch)
treeb13eee38c6cdf996d659441ebb7c15b6a8bfd2e8 /src/code/z_parameter.c
parentd7bbe43ba7734da2e28614debeaf521b4bcb5013 (diff)
Environment documentation pass (#1115)
* some docs, start introducing time macro * most usages of CLOCK_TIME * finish up clock time defines, format * saving incase i need to revert * more docs * more docs progress * some more docs * format with 11 * change sos to storm * update functions.h * some depth stuff * review 1 and 2 * whoops * update zbuf stuff * most of review 3 * enum name * storm state enum * review 4 * fix enum * add comment to skyboxischanging * review * things dont match, committing so i can change branches * revert struct changes * define for override_full_control * new clock_time macro * fill alpha -> glare strength * update comment * remove indoor/outdoor, new name for underwater light variable * remove copy pasted comment * fix comments * remove whitespave * review
Diffstat (limited to 'src/code/z_parameter.c')
-rw-r--r--src/code/z_parameter.c24
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;