implement game configuration file
this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user