1 #include "client/client_config.h"
2 #include "common/config.h"
4 struct ClientConfig client_config = {
7 .view_distance = 255.0,
10 .swap_mouse_buttons = true,
11 .texture_batching = true,
14 static ConfigEntry config_entries[] = {
17 .key = "antialiasing",
18 .value = &client_config.antialiasing,
23 .value = &client_config.mipmap,
27 .key = "view_distance",
28 .value = &client_config.view_distance,
33 .value = &client_config.vsync,
37 .key = "meshgen_threads",
38 .value = &client_config.meshgen_threads,
42 .key = "swap_mouse_buttons",
43 .value = &client_config.meshgen_threads,
47 .key = "texture_batching",
48 .value = &client_config.texture_batching,
52 __attribute__((constructor)) static void client_config_init()
54 config_read("client.conf", config_entries, sizeof config_entries / sizeof *config_entries);
57 __attribute__((destructor)) static void client_config_deinit()
59 config_free(config_entries, sizeof config_entries / sizeof *config_entries);