Entropie git · main
Entropie festival game; first steps
C 88.5% Markdown 9.1% GLSL 2.3%git clone https://git.christianimmanuel.de/games/Entropie.gitwget https://git.christianimmanuel.de/games/Entropie/archive/Entropie.tar.gzentropie/src/world/daycycle.h raw
#ifndef WORLD_DAYCYCLE_H
#define WORLD_DAYCYCLE_H
/* In-game clock driving sun position and light colors. */
#include <stddef.h>
#include "render/renderer.h"
typedef struct {
float seconds; /* seconds since midnight, 0..86400 */
float time_scale; /* game seconds per real second */
float day_start; /* sunrise hour */
float day_end; /* sunset hour */
Lighting light; /* derived from the time of day */
} DayCycle;
void DayCycle_init(DayCycle *dc, float start_hour, float time_scale);
void DayCycle_update(DayCycle *dc, float dt);
/* Writes "HH:MM:SS". */
void DayCycle_format(const DayCycle *dc, char *out, size_t out_size);
#endif /* WORLD_DAYCYCLE_H */