conworlds
annotate 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 |
rev | line source |
---|---|
nuclear@7 | 1 #ifndef OPT_H_ |
nuclear@7 | 2 #define OPT_H_ |
nuclear@7 | 3 |
nuclear@7 | 4 enum opt_type { OTYPE_INT, OTYPE_FLOAT }; |
nuclear@7 | 5 |
nuclear@7 | 6 struct option { |
nuclear@7 | 7 enum opt_type type; |
nuclear@7 | 8 int ival; |
nuclear@7 | 9 float fval; |
nuclear@7 | 10 }; |
nuclear@7 | 11 |
nuclear@7 | 12 void *create_options(void); |
nuclear@7 | 13 void destroy_options(void *optdb); |
nuclear@7 | 14 |
nuclear@7 | 15 void set_option_int(void *optdb, const char *key, int val); |
nuclear@7 | 16 void set_option_float(void *optdb, const char *key, float val); |
nuclear@7 | 17 |
nuclear@7 | 18 int get_option_int(void *optdb, const char *key, int *val); |
nuclear@7 | 19 int get_option_float(void *optdb, const char *key, float *val); |
nuclear@7 | 20 |
nuclear@7 | 21 #endif /* OPT_H_ */ |