mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +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
|
@ -769,7 +769,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
s16 sp150;
|
||||
|
||||
if (this->fogMode == 0) {
|
||||
globalCtx->envCtx.unk_D8 = 0;
|
||||
globalCtx->envCtx.lightBlend = 0;
|
||||
}
|
||||
this->fogMode = 0xA;
|
||||
|
||||
|
@ -1081,36 +1081,36 @@ void BossFd_Effects(BossFd* this, GlobalContext* globalCtx) {
|
|||
if (1) {} // Needed for match
|
||||
|
||||
if (this->fogMode == 0) {
|
||||
globalCtx->envCtx.unk_BF = 0;
|
||||
globalCtx->envCtx.unk_D8 = 0.5f + 0.5f * Math_SinS(this->work[BFD_VAR_TIMER] * 0x500);
|
||||
globalCtx->envCtx.unk_DC = 2;
|
||||
globalCtx->envCtx.unk_BD = 1;
|
||||
globalCtx->envCtx.unk_BE = 0;
|
||||
globalCtx->envCtx.lightSettingOverride = 0;
|
||||
globalCtx->envCtx.lightBlend = 0.5f + 0.5f * Math_SinS(this->work[BFD_VAR_TIMER] * 0x500);
|
||||
globalCtx->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_FULL_CONTROL;
|
||||
globalCtx->envCtx.lightSetting = 1;
|
||||
globalCtx->envCtx.prevLightSetting = 0;
|
||||
} else if (this->fogMode == 3) {
|
||||
globalCtx->envCtx.unk_BF = 0;
|
||||
globalCtx->envCtx.unk_DC = 2;
|
||||
globalCtx->envCtx.unk_BD = 2;
|
||||
globalCtx->envCtx.unk_BE = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 1.0f, 1.0f, 0.05f);
|
||||
globalCtx->envCtx.lightSettingOverride = 0;
|
||||
globalCtx->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_FULL_CONTROL;
|
||||
globalCtx->envCtx.lightSetting = 2;
|
||||
globalCtx->envCtx.prevLightSetting = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.lightBlend, 1.0f, 1.0f, 0.05f);
|
||||
} else if (this->fogMode == 2) {
|
||||
this->fogMode--;
|
||||
globalCtx->envCtx.unk_BF = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 0.55f + 0.05f * Math_SinS(this->work[BFD_VAR_TIMER] * 0x3E00), 1.0f,
|
||||
0.15f);
|
||||
globalCtx->envCtx.unk_DC = 2;
|
||||
globalCtx->envCtx.unk_BD = 3;
|
||||
globalCtx->envCtx.unk_BE = 0;
|
||||
globalCtx->envCtx.lightSettingOverride = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.lightBlend, 0.55f + 0.05f * Math_SinS(this->work[BFD_VAR_TIMER] * 0x3E00),
|
||||
1.0f, 0.15f);
|
||||
globalCtx->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_FULL_CONTROL;
|
||||
globalCtx->envCtx.lightSetting = 3;
|
||||
globalCtx->envCtx.prevLightSetting = 0;
|
||||
} else if (this->fogMode == 10) {
|
||||
this->fogMode = 1;
|
||||
globalCtx->envCtx.unk_BF = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 0.21f + 0.07f * Math_SinS(this->work[BFD_VAR_TIMER] * 0xC00), 1.0f,
|
||||
0.05f);
|
||||
globalCtx->envCtx.unk_DC = 2;
|
||||
globalCtx->envCtx.unk_BD = 3;
|
||||
globalCtx->envCtx.unk_BE = 0;
|
||||
globalCtx->envCtx.lightSettingOverride = 0;
|
||||
Math_ApproachF(&globalCtx->envCtx.lightBlend, 0.21f + 0.07f * Math_SinS(this->work[BFD_VAR_TIMER] * 0xC00),
|
||||
1.0f, 0.05f);
|
||||
globalCtx->envCtx.lightBlendOverride = LIGHT_BLEND_OVERRIDE_FULL_CONTROL;
|
||||
globalCtx->envCtx.lightSetting = 3;
|
||||
globalCtx->envCtx.prevLightSetting = 0;
|
||||
} else if (this->fogMode == 1) {
|
||||
Math_ApproachF(&globalCtx->envCtx.unk_D8, 0.0f, 1.0f, 0.03f);
|
||||
if (globalCtx->envCtx.unk_D8 <= 0.01f) {
|
||||
Math_ApproachF(&globalCtx->envCtx.lightBlend, 0.0f, 1.0f, 0.03f);
|
||||
if (globalCtx->envCtx.lightBlend <= 0.01f) {
|
||||
this->fogMode = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1164,7 +1164,7 @@ void BossFd_Effects(BossFd* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.colChkInfo.health == 0) ||
|
||||
((this->introState == BFD_CS_EMERGE) && (this->actor.world.rot.x > 0x3000))) {
|
||||
if ((u8)this->fogMode == 0) {
|
||||
globalCtx->envCtx.unk_D8 = 0.0f;
|
||||
globalCtx->envCtx.lightBlend = 0.0f;
|
||||
}
|
||||
this->fogMode = 2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue