From 8a66e11280dce2e2512639f6ef472aacf1ec8af0 Mon Sep 17 00:00:00 2001 From: Jakob Fries Date: Fri, 1 Jun 2007 11:12:48 +0000 Subject: --- src/engine/config.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/engine/config.h (limited to 'src/engine/config.h') diff --git a/src/engine/config.h b/src/engine/config.h new file mode 100644 index 00000000..c1a356a5 --- /dev/null +++ b/src/engine/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 -- cgit 1.4.1