techkaczynski.dev / code

summaryrefslogtreecommitdiff
path: root/env.h
diff options
context:
space:
mode:
Diffstat (limited to 'env.h')
-rw-r--r--env.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/env.h b/env.h
new file mode 100644
index 0000000..c62f884
--- /dev/null
+++ b/env.h
@@ -0,0 +1,46 @@
+#ifndef ENV_H
+#define ENV_H
+
+#include "common.h"
+#include "res.h"
+
+typedef struct {
+ cstr sky_sdr_key, ocean_sdr_key;
+
+ Vec3 sun_dir;
+ Vec3 moon_dir;
+
+ Color sun_col;
+ Color moon_col;
+ Color ambient_col;
+ Color horizon_col;
+ Color zenith_col;
+
+ f32 sun_intensity;
+ f32 moon_intensity;
+ f32 ambient_intensity;
+
+ f32 day_amount;
+ f32 twilight_amount;
+
+ f32 cycle;
+ f32 day_len;
+
+ /* sun/moon textures */
+ cstr sun_tex_key, moon_tex_key;
+ Color sun_tint, moon_tint;
+ f32 sun_sz, moon_sz;
+
+ f32 ocean_height, ocean_time;
+} Environment;
+
+extern Environment env;
+
+void env_init(void);
+void env_exit(void);
+void env_update(void);
+void env_draw_sky(Camera);
+void env_draw_ocean(Camera);
+
+#endif
+