implement game configuration file

this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
wanp authored and veclavtalica committed 2024-10-01 12:48:42 +03:00
1 parent ec15d8ec4b
commit 57fe5e8946
165 files changed
+4797 -92

No files matched your search

+16 -2
View File
@@ -8,6 +8,7 @@
#include "rendering/twn_rendering_c.h"
#include <SDL2/SDL.h>
#include <toml.h>
#include <stdbool.h>
#include <stdint.h>
@@ -21,11 +22,24 @@ typedef struct EngineContext {
int argc;
char **argv;
struct Primitive2D *render_queue_2d;
/* configuration */
toml_table_t *config_table;
int64_t base_render_width;
int64_t base_render_height;
int64_t ticks_per_second;
int64_t keybind_slots;
int64_t texture_atlas_size;
int64_t font_texture_size;
int64_t font_oversampling;
TextureFilter font_filtering;
/* rendering */
Primitive2D *render_queue_2d;
MeshBatchItem *uncolored_mesh_batches;
struct TextCache text_cache;
TextCache text_cache;
TextureCache texture_cache;
/* audio */
AudioChannelItem *audio_channels;
SDL_AudioDeviceID audio_device;
int audio_stream_frequency;