diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-11-02 00:00:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-01 19:00:38 -0400 |
| commit | d2191a5d48b21472a2c46bec32ee9bc758abc367 (patch) | |
| tree | 57e7e3533d515bde1799f9f4b792f69de2091224 /src/code/z_lights.c | |
| parent | 451e855dbc91578ac4a6a06280c7c812a0c0007b (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/code/z_lights.c')
| -rw-r--r-- | src/code/z_lights.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } /** |
