mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 09:11:55 -05:00
daytime.h constants
This commit is contained in:
parent
5ca09dae29
commit
66d5183e5c
2 changed files with 7 additions and 3 deletions
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include "cglm/cglm.h"
|
||||
|
||||
#define DAY_TICK_MS 50
|
||||
#define DAY_LENGTH_TICKS 24000
|
||||
|
||||
float daytime_brightness(float time);
|
||||
float daytime_celestial_angle(float time);
|
||||
void daytime_sky_colors(float time, vec3 top_plane, vec3 bottom_plane,
|
||||
|
|
|
@ -113,9 +113,10 @@ int main(void) {
|
|||
|
||||
float daytime
|
||||
= (float)((gstate.world_time
|
||||
+ time_diff_ms(gstate.world_time_start, this_frame) / 50)
|
||||
% 24000)
|
||||
/ 24000.0F;
|
||||
+ time_diff_ms(gstate.world_time_start, this_frame)
|
||||
/ DAY_TICK_MS)
|
||||
% DAY_LENGTH_TICKS)
|
||||
/ (float)DAY_LENGTH_TICKS;
|
||||
|
||||
input_poll();
|
||||
|
||||
|
|
Loading…
Reference in a new issue