mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-06 07:56:32 +00:00
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
This commit is contained in:
parent
d7bbe43ba7
commit
4f0018bf36
50 changed files with 1339 additions and 1087 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue