summaryrefslogtreecommitdiff
path: root/src/code/z_lights.c
diff options
context:
space:
mode:
authorpetrie911 <69443847+petrie911@users.noreply.github.com>2021-09-20 11:51:35 -0500
committerGitHub <noreply@github.com>2021-09-20 12:51:35 -0400
commite51f50f0ff9d79cd4c19fb6519183fd00445719c (patch)
tree2151497dd9464253f6f12f069256790e7eb5c37a /src/code/z_lights.c
parent50095d427c21465b7560d7178906a3dee3eea090 (diff)
Decompile z_kankyo (#956)
* working * start color switch * progress * progress * progress on bgm func * progress * game over matched (except the rodata meme) * start update * progress * lightning docs done * progress * progress * progress * progress * progress * can compile at least * suns state, progress on kankyo_update * some new names * progress * progress * progress * new functions * cleanup * more matches * another match * now functional * format * better match * hugely improved update * cleanup/review * remove old changes * review2 * review3 * missed one * review4 * change asm filenames * update doorwarp1 * review5 * Kankyo_ -> Environment_ * format * merge master and format functions.h Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com> Co-authored-by: fig <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Diffstat (limited to 'src/code/z_lights.c')
-rw-r--r--src/code/z_lights.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 8ea295524..3067b712b 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -198,29 +198,29 @@ s32 Lights_FreeNode(LightNode* light) {
void LightContext_Init(GlobalContext* globalCtx, LightContext* lightCtx) {
LightContext_InitList(globalCtx, lightCtx);
LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
- func_8007A698(lightCtx, 0, 0, 0, 0x3E4, 0x3200);
+ LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
bzero(&sLightsBuffer, sizeof(sLightsBuffer));
}
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
- lightCtx->ambient.r = r;
- lightCtx->ambient.g = g;
- lightCtx->ambient.b = b;
+ lightCtx->ambientColor[0] = r;
+ lightCtx->ambientColor[1] = g;
+ lightCtx->ambientColor[2] = b;
}
-void func_8007A698(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLights, s16 arg5) {
- lightCtx->unk_07 = arg1;
- lightCtx->unk_08 = arg2;
- lightCtx->unk_09 = arg3;
- lightCtx->unk_0A = numLights;
- lightCtx->unk_0C = arg5;
+void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 fogFar) {
+ lightCtx->fogColor[0] = r;
+ lightCtx->fogColor[1] = g;
+ lightCtx->fogColor[2] = b;
+ lightCtx->fogNear = fogNear;
+ lightCtx->fogFar = fogFar;
}
/**
* Allocate a new Lights group and initilize the ambient color with that provided by LightContext
*/
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx) {
- return Lights_New(gfxCtx, lightCtx->ambient.r, lightCtx->ambient.g, lightCtx->ambient.b);
+ return Lights_New(gfxCtx, lightCtx->ambientColor[0], lightCtx->ambientColor[1], lightCtx->ambientColor[2]);
}
void LightContext_InitList(GlobalContext* globalCtx, LightContext* lightCtx) {