techkaczynski.dev / code

summaryrefslogtreecommitdiff
path: root/env.c
diff options
context:
space:
mode:
authortech kaczynski <tk@techkaczynski.dev>2026-10-22 13:27:04 +1000
committertech kaczynski <tk@techkaczynski.dev>2026-10-22 13:27:04 +1000
commit038cb9646b920936f8f497f9a4ee5b873853424e (patch)
treea5df82a2e705c7f671ac9f2450dc88a68bbd25b0 /env.c
parentf5259b6c44b5902a0ca35de113fe16b9275ea13e (diff)
started work on command menu, added time of day editor.
Diffstat (limited to 'env.c')
-rw-r--r--env.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/env.c b/env.c
index 412dbea..20466f8 100644
--- a/env.c
+++ b/env.c
@@ -250,8 +250,11 @@ env_init(void) {
env.sky_sdr_key = "sky";
env.sun_tex_key = "res/tex/sun.png";
env.moon_tex_key = "res/tex/moon.png";
- env.cycle = 0.35;
- env.day_len = 240; // 600s = 5 min day/night cycle
+
+ env.day_cur = 0.35f;
+ env.day_len = 240.0f;
+ env.cycle = env.day_cur;
+
env.sun_sz = 14;
env.moon_sz = 4;
// env.sun_tint = (Color) { 255, 255, 255, 40 };
@@ -267,11 +270,6 @@ env_exit(void) {
void
env_update(void) {
- // if (env.day_len > 0.0f) {
- // env.cycle += GetFrameTime() / env.day_len;
- // env.cycle -= floorf(env.cycle);
- // }
-
sky_update_lighting();
env_update_shader("model");
env_update_shader("model_cutoff");