summaryrefslogtreecommitdiff
path: root/src/code/z_lights.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2023-01-14 07:18:13 -0800
committerGitHub <noreply@github.com>2023-01-14 12:18:13 -0300
commitab8d34b8dc2ccd28ae4224d8500decff0fa25a1c (patch)
tree6cc53d451407b073e7c53349a2564a8062887312 /src/code/z_lights.c
parente2b61f88e46efc994db334ac5f03e1174de67058 (diff)
Play (2 NON_MATCHINGS) (#1109)
* Bring over progress from another branch Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com> * cleanup, fake match Play_Init * small fixes * Some small cleanup * Match func_80165460 (from debug) * Match func_80165658 * Match func_80165DB8, func_80165DCC, func_80165DF0, func_80165E04 * Match func_80167DE4 (from debug) * Match func_80167F0C * Match func_80168DAC * Matched func_80169100 * Matched func_801691F0 * import D_801DFA18 * match Play_Main thanks to debug * cleanup * synray does it again * add docs from debug * fix func_801656A4 * more docs and cleanup * Match func_80166B30 and diff fake match in Init * import transition docs from OoT * Play Update, sort of * cleanup Play_Update * more cleanup * slightly more docs * small docs * Play_Draw WIP Thanks @petrie911 * progress? * two more matches * format * misc play docs * transitions cleanup * Motion Blur * Transitions * Fog * Bombers notebook + small cleanup * bss * Camera Functions * Picto functions * Init * MotionBlur Clean up * Floor Surface * Pictographs some more * regs * fix circular dependency problem * Cleanup PR commits outside play * namefixer * PR picto * PR audio * PR small clean ups * debug strings * Picto defines * bss * enums * remove void * typedefs * Hireso -> BombersNotebook * bss comments * bss and I8/I5 functions * Smaller PR comments * Transitions * Combine enums * Revert "Combine enums" This reverts commit 0da1ebcaed69a3ce0fbd5942460b67f80f0e15e7. * Fix Transition defines * RGBA16 macros * Unname * worldCoverAlpha * Rename Update and Draw * PR review, plus annotate bug * Clean up nonmatchings with a closer DrawGame * Format * New macros * UpdateMain and DrawMain * Fix merge * Small cleanups from PR * zFar * Intensity macros * Format * Remove bss comments * Compression/decompression * Small cleanup * Format * More PR cleanup * Cleanup picto stuff * format * Fix compression comments * Play processes state enums DONE -> READY * cutscene comment * fix bss Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu> Co-authored-by: angie <angheloalf95@gmail.com>
Diffstat (limited to 'src/code/z_lights.c')
-rw-r--r--src/code/z_lights.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index e3e732eb3..6a31c7e94 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -251,7 +251,7 @@ void Lights_FreeNode(LightNode* light) {
void LightContext_Init(PlayState* play, LightContext* lightCtx) {
LightContext_InitList(play, lightCtx);
LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
- func_80102544(lightCtx, 0, 0, 0, 0x3E4, 0x3200);
+ LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
bzero(&sLightsBuffer, sizeof(LightsBuffer));
}
@@ -261,12 +261,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
lightCtx->ambient.b = b;
}
-void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16) {
- lightCtx->unk7 = a1;
- lightCtx->unk8 = a2;
- lightCtx->unk9 = a3;
- lightCtx->unkA = numLights;
- lightCtx->unkC = sp16;
+void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) {
+ lightCtx->fogColor.r = r;
+ lightCtx->fogColor.g = g;
+ lightCtx->fogColor.b = b;
+ lightCtx->fogNear = near;
+ lightCtx->zFar = far;
}
/**