implement game configuration file

this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
2024-09-30 21:13:58 -03:00
committed by veclavtalica
parent ec15d8ec4b
commit 57fe5e8946
165 changed files with 4797 additions and 92 deletions

View File

@ -9,7 +9,7 @@
typedef struct Context {
struct InputState input;
InputState input;
int64_t delta_time; /* preserves real time frame delta with no manipilation */
uint64_t tick_count;
@ -17,12 +17,14 @@ typedef struct Context {
/* set just once on startup */
uint64_t random_seed;
/* this should be a multiple of TICKS_PER_SECOND */
/* this should be a multiple of the current ticks per second */
/* use it to simulate low framerate (e.g. at 60 tps, set to 2 for 30 fps) */
/* it can be changed at runtime; any resulting logic anomalies are bugs */
unsigned int update_multiplicity;
int window_w;
int window_h;
int base_draw_w;
int base_draw_h;
/* you may read from and write to these from game code */
void *udata;