conworlds

diff src/vr/opt.h @ 7:bd8202d6d28d

some progress...
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 22 Aug 2014 16:55:16 +0300
parents
children 90abf4b93cc9
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/vr/opt.h	Fri Aug 22 16:55:16 2014 +0300
     1.3 @@ -0,0 +1,21 @@
     1.4 +#ifndef OPT_H_
     1.5 +#define OPT_H_
     1.6 +
     1.7 +enum opt_type { OTYPE_INT, OTYPE_FLOAT };
     1.8 +
     1.9 +struct option {
    1.10 +	enum opt_type type;
    1.11 +	int ival;
    1.12 +	float fval;
    1.13 +};
    1.14 +
    1.15 +void *create_options(void);
    1.16 +void destroy_options(void *optdb);
    1.17 +
    1.18 +void set_option_int(void *optdb, const char *key, int val);
    1.19 +void set_option_float(void *optdb, const char *key, float val);
    1.20 +
    1.21 +int get_option_int(void *optdb, const char *key, int *val);
    1.22 +int get_option_float(void *optdb, const char *key, float *val);
    1.23 +
    1.24 +#endif	/* OPT_H_ */
    1.25 \ No newline at end of file