about summary refs log tree commit diff
path: root/src/engine/config/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/config/config.h')
-rw-r--r--src/engine/config/config.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/engine/config/config.h b/src/engine/config/config.h
new file mode 100644
index 00000000..c1a356a5
--- /dev/null
+++ b/src/engine/config/config.h
@@ -0,0 +1,24 @@
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+struct configuration
+{ 
+    #define MACRO_CONFIG_INT(name,def,min,max) int name;
+    #define MACRO_CONFIG_STR(name,len,def) char name[len];
+    #include "config_define.h" 
+    #undef MACRO_CONFIG_INT 
+    #undef MACRO_CONFIG_STR 
+}; 
+
+extern configuration config;
+
+void config_reset();
+void config_load(const char *filename);
+
+#define MACRO_CONFIG_INT(name,def,min,max) void set_ ## name (configuration *c, int val);
+#define MACRO_CONFIG_STR(name,len,def) void set_ ## name (configuration *c, char *str);
+#include "config_define.h"
+#undef MACRO_CONFIG_INT
+#undef MACRO_CONFIG_STR
+
+#endif