From 08cb8d6a585dd552b69a488d9db1be123f01467a Mon Sep 17 00:00:00 2001 From: tech kaczynski Date: Tue, 22 Sep 2026 22:38:57 +1000 Subject: initial commit. --- env.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 env.h (limited to 'env.h') 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 + -- cgit v1.2.3