summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-11-02 00:00:38 +0100
committerGitHub <noreply@github.com>2022-11-01 19:00:38 -0400
commitd2191a5d48b21472a2c46bec32ee9bc758abc367 (patch)
tree57e7e3533d515bde1799f9f4b792f69de2091224 /src
parent451e855dbc91578ac4a6a06280c7c812a0c0007b (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/code/z_demo.c4
-rw-r--r--src/code/z_kankyo.c133
-rw-r--r--src/code/z_lights.c6
-rw-r--r--src/code/z_play.c2
-rw-r--r--src/code/z_room.c2
-rw-r--r--src/overlays/actors/ovl_Boss_Va/z_boss_va.c58
-rw-r--r--src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c6
-rw-r--r--src/overlays/actors/ovl_Fishing/z_fishing.c4
8 files changed, 111 insertions, 104 deletions
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index de50eeaa3..4a7f344ab 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -248,8 +248,8 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
}
break;
case 6:
- if (play->envCtx.adjFogFar < 12800) {
- play->envCtx.adjFogFar += 35;
+ if (play->envCtx.adjZFar < ENV_ZFAR_MAX) {
+ play->envCtx.adjZFar += 35;
}
break;
case 7:
diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c
index 1b6ce5b4c..dee1f13e9 100644
--- a/src/code/z_kankyo.c
+++ b/src/code/z_kankyo.c
@@ -319,7 +319,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
envCtx->adjAmbientColor[0] = envCtx->adjAmbientColor[1] = envCtx->adjAmbientColor[2] = envCtx->adjLight1Color[0] =
envCtx->adjLight1Color[1] = envCtx->adjLight1Color[2] = envCtx->adjFogColor[0] = envCtx->adjFogColor[1] =
- envCtx->adjFogColor[2] = envCtx->adjFogNear = envCtx->adjFogFar = 0;
+ envCtx->adjFogColor[2] = envCtx->adjFogNear = envCtx->adjZFar = 0;
envCtx->sunPos.x = -(Math_SinS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f;
envCtx->sunPos.y = +(Math_CosS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f;
@@ -873,8 +873,8 @@ void Environment_UpdateRain(PlayState* play);
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx, PauseContext* pauseCtx,
MessageContext* msgCtx, GameOverContext* gameOverCtx, GraphicsContext* gfxCtx) {
- f32 sp8C;
- f32 sp88 = 0.0f;
+ f32 timeChangeBlend;
+ f32 configChangeBlend = 0.0f;
u16 i;
u16 j;
u16 time;
@@ -986,16 +986,18 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
u8 blend8[2];
s16 blend16[2];
- sp8C = Environment_LerpWeight(sTimeBasedLightConfigs[envCtx->lightConfig][i].endTime,
- sTimeBasedLightConfigs[envCtx->lightConfig][i].startTime,
- ((void)0, gSaveContext.skyboxTime));
+ timeChangeBlend =
+ Environment_LerpWeight(sTimeBasedLightConfigs[envCtx->lightConfig][i].endTime,
+ sTimeBasedLightConfigs[envCtx->lightConfig][i].startTime,
+ ((void)0, gSaveContext.skyboxTime));
sSandstormColorIndex = sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting & 3;
sNextSandstormColorIndex = sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting & 3;
- sSandstormLerpScale = sp8C;
+ sSandstormLerpScale = timeChangeBlend;
if (envCtx->changeLightEnabled) {
- sp88 = ((f32)envCtx->changeDuration - envCtx->changeLightTimer) / envCtx->changeDuration;
+ configChangeBlend =
+ ((f32)envCtx->changeDuration - envCtx->changeLightTimer) / envCtx->changeDuration;
envCtx->changeLightTimer--;
if (envCtx->changeLightTimer <= 0) {
@@ -1011,15 +1013,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
.ambientColor[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
.ambientColor[j],
- sp8C);
+ timeChangeBlend);
blend8[1] = LERP(
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
.ambientColor[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
.nextLightSetting]
.ambientColor[j],
- sp8C);
- *(envCtx->lightSettings.ambientColor + j) = LERP(blend8[0], blend8[1], sp88);
+ timeChangeBlend);
+ *(envCtx->lightSettings.ambientColor + j) = LERP(blend8[0], blend8[1], configChangeBlend);
}
// set light1 direction for the sun
@@ -1042,15 +1044,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
.light1Color[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
.light1Color[j],
- sp8C);
+ timeChangeBlend);
blend8[1] = LERP(
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
.light1Color[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
.nextLightSetting]
.light1Color[j],
- sp8C);
- *(envCtx->lightSettings.light1Color + j) = LERP(blend8[0], blend8[1], sp88);
+ timeChangeBlend);
+ *(envCtx->lightSettings.light1Color + j) = LERP(blend8[0], blend8[1], configChangeBlend);
// blend light2Color
blend8[0] =
@@ -1058,15 +1060,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
.light2Color[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
.light2Color[j],
- sp8C);
+ timeChangeBlend);
blend8[1] = LERP(
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
.light2Color[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
.nextLightSetting]
.light2Color[j],
- sp8C);
- *(envCtx->lightSettings.light2Color + j) = LERP(blend8[0], blend8[1], sp88);
+ timeChangeBlend);
+ *(envCtx->lightSettings.light2Color + j) = LERP(blend8[0], blend8[1], configChangeBlend);
}
// blend fogColor
@@ -1076,47 +1078,49 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
.fogColor[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
.fogColor[j],
- sp8C);
+ timeChangeBlend);
blend8[1] = LERP(
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
.fogColor[j],
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
.nextLightSetting]
.fogColor[j],
- sp8C);
- *(envCtx->lightSettings.fogColor + j) = LERP(blend8[0], blend8[1], sp88);
+ timeChangeBlend);
+ *(envCtx->lightSettings.fogColor + j) = LERP(blend8[0], blend8[1], configChangeBlend);
}
blend16[0] = LERP16(
- (lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].fogNear &
- 0x3FF),
- (lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
- .fogNear &
- 0x3FF),
- sp8C);
+ ENV_LIGHT_SETTINGS_FOG_NEAR(
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting]
+ .blendRateAndFogNear),
+ ENV_LIGHT_SETTINGS_FOG_NEAR(
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
+ .blendRateAndFogNear),
+ timeChangeBlend);
blend16[1] = LERP16(
- lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
- .fogNear &
- 0x3FF,
- lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting]
- .fogNear &
- 0x3FF,
- sp8C);
+ ENV_LIGHT_SETTINGS_FOG_NEAR(
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
+ .blendRateAndFogNear),
+ ENV_LIGHT_SETTINGS_FOG_NEAR(
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
+ .nextLightSetting]
+ .blendRateAndFogNear),
+ timeChangeBlend);
- envCtx->lightSettings.fogNear = LERP16(blend16[0], blend16[1], sp88);
+ envCtx->lightSettings.fogNear = LERP16(blend16[0], blend16[1], configChangeBlend);
blend16[0] = LERP16(
- lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].fogFar,
- lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting].fogFar,
- sp8C);
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].zFar,
+ lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting].zFar,
+ timeChangeBlend);
blend16[1] = LERP16(
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
- .fogFar,
+ .zFar,
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting]
- .fogFar,
- sp8C);
+ .zFar,
+ timeChangeBlend);
- envCtx->lightSettings.fogFar = LERP16(blend16[0], blend16[1], sp88);
+ envCtx->lightSettings.zFar = LERP16(blend16[0], blend16[1], configChangeBlend);
if (sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting >=
envCtx->numLightSettings) {
@@ -1142,11 +1146,13 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
envCtx->lightSettings.fogColor[i] = lightSettingsList[envCtx->lightSetting].fogColor[i];
}
- envCtx->lightSettings.fogNear = lightSettingsList[envCtx->lightSetting].fogNear & 0x3FF;
- envCtx->lightSettings.fogFar = lightSettingsList[envCtx->lightSetting].fogFar;
+ envCtx->lightSettings.fogNear =
+ ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear);
+ envCtx->lightSettings.zFar = lightSettingsList[envCtx->lightSetting].zFar;
envCtx->lightBlend = 1.0f;
} else {
- u8 blendRate = (lightSettingsList[envCtx->lightSetting].fogNear >> 0xA) * 4;
+ u8 blendRate =
+ ENV_LIGHT_SETTINGS_BLEND_RATE_U8(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear);
if (blendRate == 0) {
blendRate++;
@@ -1184,12 +1190,13 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
LERP(lightSettingsList[envCtx->prevLightSetting].fogColor[i],
lightSettingsList[envCtx->lightSetting].fogColor[i], envCtx->lightBlend);
}
- envCtx->lightSettings.fogNear =
- LERP16(lightSettingsList[envCtx->prevLightSetting].fogNear & 0x3FF,
- lightSettingsList[envCtx->lightSetting].fogNear & 0x3FF, envCtx->lightBlend);
- envCtx->lightSettings.fogFar =
- LERP16(lightSettingsList[envCtx->prevLightSetting].fogFar,
- lightSettingsList[envCtx->lightSetting].fogFar, envCtx->lightBlend);
+ envCtx->lightSettings.fogNear = LERP16(
+ ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->prevLightSetting].blendRateAndFogNear),
+ ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear),
+ envCtx->lightBlend);
+ envCtx->lightSettings.zFar =
+ LERP16(lightSettingsList[envCtx->prevLightSetting].zFar,
+ lightSettingsList[envCtx->lightSetting].zFar, envCtx->lightBlend);
}
if (envCtx->lightSetting >= envCtx->numLightSettings) {
@@ -1254,18 +1261,18 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
// Adjust fog near and far if necessary
adjustment = envCtx->lightSettings.fogNear + envCtx->adjFogNear;
- if (adjustment <= 996) {
+ if (adjustment <= ENV_FOGNEAR_MAX) {
lightCtx->fogNear = adjustment;
} else {
- lightCtx->fogNear = 996;
+ lightCtx->fogNear = ENV_FOGNEAR_MAX;
}
- adjustment = envCtx->lightSettings.fogFar + envCtx->adjFogFar;
+ adjustment = envCtx->lightSettings.zFar + envCtx->adjZFar;
- if (adjustment <= 12800) {
- lightCtx->fogFar = adjustment;
+ if (adjustment <= ENV_ZFAR_MAX) {
+ lightCtx->zFar = adjustment;
} else {
- lightCtx->fogFar = 12800;
+ lightCtx->zFar = ENV_ZFAR_MAX;
}
// When environment debug is enabled, various environment related variables can be configured via the reg editor
@@ -1286,7 +1293,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
R_ENV_FOG_COLOR(1) = lightCtx->fogColor[1];
R_ENV_FOG_COLOR(2) = lightCtx->fogColor[2];
- R_ENV_FOG_FAR = lightCtx->fogFar;
+ R_ENV_Z_FAR = lightCtx->zFar;
R_ENV_FOG_NEAR = lightCtx->fogNear;
R_ENV_LIGHT1_DIR(0) = envCtx->dirLight1.params.dir.x;
@@ -1317,7 +1324,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
lightCtx->fogColor[1] = R_ENV_FOG_COLOR(1);
lightCtx->fogColor[2] = R_ENV_FOG_COLOR(2);
lightCtx->fogNear = R_ENV_FOG_NEAR;
- lightCtx->fogFar = R_ENV_FOG_FAR;
+ lightCtx->zFar = R_ENV_Z_FAR;
if (cREG(14)) {
R_ENV_LIGHT1_DIR(0) = Math_CosS(cREG(10)) * Math_CosS(cREG(11)) * 120.0f;
@@ -1593,7 +1600,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
alpha = alpha * lensFlareAlphas[i];
alpha = CLAMP_MIN(alpha, 0.0f);
- fogInfluence = (996 - play->lightCtx.fogNear) / 50.0f;
+ fogInfluence = (ENV_FOGNEAR_MAX - play->lightCtx.fogNear) / 50.0f;
fogInfluence = CLAMP_MAX(fogInfluence, 1.0f);
@@ -1640,7 +1647,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
alpha = alpha * glareStrength;
alpha = CLAMP_MIN(alpha, 0.0f);
- fogInfluence = (996 - play->lightCtx.fogNear) / 50.0f;
+ fogInfluence = (ENV_FOGNEAR_MAX - play->lightCtx.fogNear) / 50.0f;
fogInfluence = CLAMP_MAX(fogInfluence, 1.0f);
@@ -2233,8 +2240,8 @@ void Environment_FadeInGameOverLights(PlayState* play) {
play->envCtx.adjFogColor[i] = -255;
}
- if (play->envCtx.lightSettings.fogFar + play->envCtx.adjFogFar > 900) {
- play->envCtx.adjFogFar -= 100;
+ if (play->envCtx.lightSettings.zFar + play->envCtx.adjZFar > 900) {
+ play->envCtx.adjZFar -= 100;
}
if (play->envCtx.lightSettings.fogNear + play->envCtx.adjFogNear > 950) {
@@ -2277,7 +2284,7 @@ void Environment_FadeOutGameOverLights(PlayState* play) {
Math_SmoothStepToS(&play->envCtx.adjLight1Color[i], 0, 5, 12, 1);
play->envCtx.adjFogColor[i] = 0;
}
- play->envCtx.adjFogFar = 0;
+ play->envCtx.adjZFar = 0;
play->envCtx.adjFogNear = 0;
} else {
play->envCtx.fillScreen = true;
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 4d91bf462..b230100bc 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -195,7 +195,7 @@ s32 Lights_FreeNode(LightNode* light) {
void LightContext_Init(PlayState* play, LightContext* lightCtx) {
LightContext_InitList(play, lightCtx);
LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
- LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
+ LightContext_SetFog(lightCtx, 0, 0, 0, ENV_FOGNEAR_MAX, ENV_ZFAR_MAX);
bzero(&sLightsBuffer, sizeof(sLightsBuffer));
}
@@ -205,12 +205,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
lightCtx->ambientColor[2] = b;
}
-void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 fogFar) {
+void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 zFar) {
lightCtx->fogColor[0] = r;
lightCtx->fogColor[1] = g;
lightCtx->fogColor[2] = b;
lightCtx->fogNear = fogNear;
- lightCtx->fogFar = fogFar;
+ lightCtx->zFar = zFar;
}
/**
diff --git a/src/code/z_play.c b/src/code/z_play.c
index f768d7a9d..64a7387b5 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -1051,7 +1051,7 @@ void Play_Draw(PlayState* this) {
POLY_OPA_DISP = Play_SetFog(this, POLY_OPA_DISP);
POLY_XLU_DISP = Play_SetFog(this, POLY_XLU_DISP);
- View_SetPerspective(&this->view, this->view.fovy, this->view.zNear, this->lightCtx.fogFar);
+ View_SetPerspective(&this->view, this->view.fovy, this->view.zNear, this->lightCtx.zFar);
View_Apply(&this->view, VIEW_ALL);
// The billboard matrix temporarily stores the viewing matrix
diff --git a/src/code/z_room.c b/src/code/z_room.c
index 8447a0460..c43a093cf 100644
--- a/src/code/z_room.c
+++ b/src/code/z_room.c
@@ -153,7 +153,7 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
entryBoundsNearZ = projectedPos.z - roomShapeCullableEntry->boundsSphereRadius;
// If the entry bounding sphere isn't fully beyond the rendered depth range
- if (entryBoundsNearZ < play->lightCtx.fogFar) {
+ if (entryBoundsNearZ < play->lightCtx.zFar) {
// This entry will be rendered
insert->entry = roomShapeCullableEntry;
diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
index 6f753d732..c99958ee2 100644
--- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
+++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
@@ -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;
}
}
diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
index 3786f85b3..f391631c9 100644
--- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
+++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
@@ -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);
}
}
diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c
index 2231c310b..ac33818dd 100644
--- a/src/overlays/actors/ovl_Fishing/z_fishing.c
+++ b/src/overlays/actors/ovl_Fishing/z_fishing.c
@@ -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);