mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
Some doc on env light settings (#1307)
* remove `LightSettings` struct, typedef for zapd * more decimal * fog far -> z far * `LIGHTCTX_FOGNEAR_MAX`, `LIGHTCTX_ZFAR_MAX` * name sp88,sp8C in `Environment_Update` * `EnvLightSettings.fogNear` -> `blendRateAndFogNear` and macros * A different struct for `EnvironmentContext.lightSettings` * Uniform zapd compat typedefs todos * `LIGHTCTX_` -> `ENV_` * Comment on `blendRateAndFogNear` + "fogFar" * Move fogFar~1000 comment to zFar * comment rewrite attempt * move relevant macros down Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
451e855dbc
commit
d2191a5d48
14 changed files with 151 additions and 125 deletions
|
@ -507,33 +507,33 @@ void BossVa_Tumor(PlayState* play, BossVa* this, s32 count, s16 scale, f32 xzSpr
|
|||
}
|
||||
|
||||
void BossVa_SetSparkEnv(PlayState* play) {
|
||||
play->envCtx.adjAmbientColor[0] = 0xA;
|
||||
play->envCtx.adjAmbientColor[1] = 0xA;
|
||||
play->envCtx.adjAmbientColor[2] = 0xA;
|
||||
play->envCtx.adjLight1Color[0] = 0x73;
|
||||
play->envCtx.adjLight1Color[1] = 0x41;
|
||||
play->envCtx.adjLight1Color[2] = 0x64;
|
||||
play->envCtx.adjFogColor[0] = 0x78;
|
||||
play->envCtx.adjFogColor[1] = 0x78;
|
||||
play->envCtx.adjFogColor[2] = 0x46;
|
||||
play->envCtx.adjAmbientColor[0] = 10;
|
||||
play->envCtx.adjAmbientColor[1] = 10;
|
||||
play->envCtx.adjAmbientColor[2] = 10;
|
||||
play->envCtx.adjLight1Color[0] = 115;
|
||||
play->envCtx.adjLight1Color[1] = 65;
|
||||
play->envCtx.adjLight1Color[2] = 100;
|
||||
play->envCtx.adjFogColor[0] = 120;
|
||||
play->envCtx.adjFogColor[1] = 120;
|
||||
play->envCtx.adjFogColor[2] = 70;
|
||||
}
|
||||
|
||||
void BossVa_SetDeathEnv(PlayState* play) {
|
||||
play->envCtx.adjFogColor[0] = 0xDC;
|
||||
play->envCtx.adjFogColor[1] = 0xDC;
|
||||
play->envCtx.adjFogColor[2] = 0x96;
|
||||
play->envCtx.adjFogNear = -0x3E8;
|
||||
play->envCtx.adjFogFar = -0x384;
|
||||
play->envCtx.adjAmbientColor[0] = 0xC8;
|
||||
play->envCtx.adjAmbientColor[1] = 0xC8;
|
||||
play->envCtx.adjAmbientColor[2] = 0xC8;
|
||||
play->envCtx.adjLight1Color[0] = 0xD7;
|
||||
play->envCtx.adjLight1Color[1] = 0xA5;
|
||||
play->envCtx.adjLight1Color[2] = 0xC8;
|
||||
play->envCtx.screenFillColor[0] = 0xDC;
|
||||
play->envCtx.screenFillColor[1] = 0xDC;
|
||||
play->envCtx.screenFillColor[2] = 0x96;
|
||||
play->envCtx.screenFillColor[3] = 0x64;
|
||||
play->envCtx.adjFogColor[0] = 220;
|
||||
play->envCtx.adjFogColor[1] = 220;
|
||||
play->envCtx.adjFogColor[2] = 150;
|
||||
play->envCtx.adjFogNear = -1000;
|
||||
play->envCtx.adjZFar = -900;
|
||||
play->envCtx.adjAmbientColor[0] = 200;
|
||||
play->envCtx.adjAmbientColor[1] = 200;
|
||||
play->envCtx.adjAmbientColor[2] = 200;
|
||||
play->envCtx.adjLight1Color[0] = 215;
|
||||
play->envCtx.adjLight1Color[1] = 165;
|
||||
play->envCtx.adjLight1Color[2] = 200;
|
||||
play->envCtx.screenFillColor[0] = 220;
|
||||
play->envCtx.screenFillColor[1] = 220;
|
||||
play->envCtx.screenFillColor[2] = 150;
|
||||
play->envCtx.screenFillColor[3] = 100;
|
||||
}
|
||||
|
||||
EnBoom* BossVa_FindBoomerang(PlayState* play) {
|
||||
|
@ -3185,16 +3185,16 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
|
|||
switch (this->actor.params) {
|
||||
case BOSSVA_BODY:
|
||||
if (play->envCtx.adjFogNear != 0) {
|
||||
play->envCtx.adjFogNear += 0x15E;
|
||||
play->envCtx.adjFogNear += 350;
|
||||
if (play->envCtx.adjFogNear > 0) {
|
||||
play->envCtx.adjFogNear = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (play->envCtx.adjFogFar != 0) {
|
||||
play->envCtx.adjFogFar += 0x15E;
|
||||
if (play->envCtx.adjFogFar > 0) {
|
||||
play->envCtx.adjFogFar = 0;
|
||||
if (play->envCtx.adjZFar != 0) {
|
||||
play->envCtx.adjZFar += 350;
|
||||
if (play->envCtx.adjZFar > 0) {
|
||||
play->envCtx.adjZFar = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -291,11 +291,11 @@ void EnWeatherTag_SetSandstormIntensity(EnWeatherTag* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Actor_WorldDistXZToActor(&player->actor, &this->actor) < WEATHER_TAG_RANGE100(this->actor.params)) {
|
||||
Math_SmoothStepToS(&play->envCtx.adjFogNear, -0x50, 1, 2, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjFogFar, -0x7D0, 1, 50, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjFogNear, -80, 1, 2, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjZFar, -2000, 1, 50, 1);
|
||||
} else {
|
||||
Math_SmoothStepToS(&play->envCtx.adjFogNear, 0, 1, 1, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjFogFar, 0, 1, 25, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjZFar, 0, 1, 25, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5516,9 +5516,9 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
if (sSubCamEye.y <= (WATER_SURFACE_Y(play) + 1.0f)) {
|
||||
Environment_EnableUnderwaterLights(play, 1);
|
||||
if (D_80B7E076 != 0) {
|
||||
play->envCtx.adjFogNear = -0xB2;
|
||||
play->envCtx.adjFogNear = -178;
|
||||
} else {
|
||||
play->envCtx.adjFogNear = -0x2E;
|
||||
play->envCtx.adjFogNear = -46;
|
||||
}
|
||||
} else {
|
||||
Environment_EnableUnderwaterLights(play, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue