mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 23:14:37 +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
|
@ -229,7 +229,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
if (sp3F != 0) {
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_4, 0x3F);
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_1, 1);
|
||||
globalCtx->envCtx.unk_EE[0] = 20;
|
||||
globalCtx->envCtx.precipitation[PRECIP_RAIN_MAX] = 20;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -254,14 +254,14 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
break;
|
||||
case 7:
|
||||
if (sp3F != 0) {
|
||||
globalCtx->envCtx.unk_19 = 1;
|
||||
globalCtx->envCtx.unk_17 = 1;
|
||||
globalCtx->envCtx.unk_18 = 0;
|
||||
globalCtx->envCtx.unk_1A = 0x3C;
|
||||
globalCtx->envCtx.unk_21 = 1;
|
||||
globalCtx->envCtx.unk_1F = 0;
|
||||
globalCtx->envCtx.unk_20 = 1;
|
||||
globalCtx->envCtx.unk_22 = globalCtx->envCtx.unk_24 = 0x3C;
|
||||
globalCtx->envCtx.changeSkyboxState = CHANGE_SKYBOX_REQUESTED;
|
||||
globalCtx->envCtx.skyboxConfig = 1;
|
||||
globalCtx->envCtx.changeSkyboxNextConfig = 0;
|
||||
globalCtx->envCtx.changeSkyboxTimer = 60;
|
||||
globalCtx->envCtx.changeLightEnabled = true;
|
||||
globalCtx->envCtx.lightConfig = 0;
|
||||
globalCtx->envCtx.changeLightNextConfig = 1;
|
||||
globalCtx->envCtx.changeLightTimer = globalCtx->envCtx.changeDuration = 60;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
|
@ -270,7 +270,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
}
|
||||
break;
|
||||
case 9:
|
||||
globalCtx->envCtx.unk_EE[3] = 16;
|
||||
globalCtx->envCtx.precipitation[PRECIP_SNOW_MAX] = 16;
|
||||
break;
|
||||
case 10:
|
||||
Flags_SetEnv(globalCtx, 1);
|
||||
|
@ -325,13 +325,13 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
}
|
||||
break;
|
||||
case 18:
|
||||
globalCtx->envCtx.unk_EE[0] = 0;
|
||||
globalCtx->envCtx.gloomySkyMode = 2;
|
||||
if (gSaveContext.dayTime < 0x4AAB) {
|
||||
globalCtx->envCtx.precipitation[PRECIP_RAIN_MAX] = 0;
|
||||
globalCtx->envCtx.stormRequest = STORM_REQUEST_STOP;
|
||||
if (gSaveContext.dayTime < CLOCK_TIME(7, 0)) {
|
||||
gSaveContext.dayTime += 30;
|
||||
}
|
||||
if (globalCtx->envCtx.unk_EE[1] == 0) {
|
||||
gWeatherMode = 0;
|
||||
if (globalCtx->envCtx.precipitation[PRECIP_RAIN_CUR] == 0) {
|
||||
gWeatherMode = WEATHER_MODE_CLEAR;
|
||||
Audio_SetNatureAmbienceChannelIO(NATURE_CHANNEL_RAIN, CHANNEL_IO_PORT_1, 0);
|
||||
}
|
||||
break;
|
||||
|
@ -361,18 +361,19 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
break;
|
||||
case 25:
|
||||
gSaveContext.dayTime += 30;
|
||||
if ((gSaveContext.dayTime) > 0xCAAA) {
|
||||
gSaveContext.dayTime = 0xCAAA;
|
||||
if ((gSaveContext.dayTime) >= CLOCK_TIME(19, 0)) {
|
||||
gSaveContext.dayTime = CLOCK_TIME(19, 0) - 1;
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
if ((gSaveContext.dayTime < 0x3000) || (gSaveContext.dayTime >= 0x4555)) {
|
||||
if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xAAAB)) {
|
||||
globalCtx->envCtx.unk_BF = 1;
|
||||
} else if ((gSaveContext.dayTime >= 0xAAAB) && (gSaveContext.dayTime < 0xC556)) {
|
||||
globalCtx->envCtx.unk_BF = 2;
|
||||
if ((gSaveContext.dayTime < CLOCK_TIME(4, 30)) || (gSaveContext.dayTime >= CLOCK_TIME(6, 30))) {
|
||||
if ((gSaveContext.dayTime >= CLOCK_TIME(6, 30)) && (gSaveContext.dayTime < CLOCK_TIME(16, 0))) {
|
||||
globalCtx->envCtx.lightSettingOverride = 1;
|
||||
} else if ((gSaveContext.dayTime >= CLOCK_TIME(16, 0)) &&
|
||||
(gSaveContext.dayTime <= CLOCK_TIME(18, 30))) {
|
||||
globalCtx->envCtx.lightSettingOverride = 2;
|
||||
} else {
|
||||
globalCtx->envCtx.unk_BF = 3;
|
||||
globalCtx->envCtx.lightSettingOverride = 3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -414,9 +415,9 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
break;
|
||||
case 34:
|
||||
if (IS_DAY) {
|
||||
gSaveContext.dayTime -= gTimeIncrement;
|
||||
gSaveContext.dayTime -= gTimeSpeed;
|
||||
} else {
|
||||
gSaveContext.dayTime -= gTimeIncrement * 2;
|
||||
gSaveContext.dayTime -= gTimeSpeed * 2;
|
||||
}
|
||||
break;
|
||||
case 35:
|
||||
|
@ -429,8 +430,8 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
|
|||
// Command 4: Set Environment Lighting
|
||||
void Cutscene_Command_SetLighting(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdEnvLighting* cmd) {
|
||||
if (csCtx->frames == cmd->startFrame) {
|
||||
globalCtx->envCtx.unk_BF = cmd->setting - 1;
|
||||
globalCtx->envCtx.unk_D8 = 1.0f;
|
||||
globalCtx->envCtx.lightSettingOverride = cmd->setting - 1;
|
||||
globalCtx->envCtx.lightBlend = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1222,8 +1223,8 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
break;
|
||||
case 119:
|
||||
gSaveContext.dayTime = 0x8000;
|
||||
gSaveContext.skyboxTime = 0x8000;
|
||||
gSaveContext.dayTime = CLOCK_TIME(12, 0);
|
||||
gSaveContext.skyboxTime = CLOCK_TIME(12, 0);
|
||||
globalCtx->nextEntranceIndex = ENTR_NAKANIWA_1;
|
||||
globalCtx->transitionTrigger = TRANS_TRIGGER_START;
|
||||
globalCtx->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue