]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - src/common/day.h
Rework structure
[dragonblocks_alpha.git] / src / common / day.h
diff --git a/src/common/day.h b/src/common/day.h
new file mode 100644 (file)
index 0000000..75cf3e9
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _DAY_H_
+#define _DAY_H_
+
+#include <stdbool.h>
+#include "types.h"
+
+#define MINUTES_PER_HOUR 60
+#define HOURS_PER_DAY 24
+#define MINUTES_PER_DAY (HOURS_PER_DAY * MINUTES_PER_HOUR)
+
+// 1 second in real life = 1 minute ingame
+
+f64 get_time_of_day();
+void set_time_of_day(f64 new_time);
+f64 get_sun_angle();
+f64 get_daylight();
+void split_time_of_day(int *hours, int *minutes);
+
+extern bool timelapse;
+
+#endif // _DAY_H_