mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 04:14:34 +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
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue