]> icculus.org git repositories - btb/d2x.git/blob - main/cvar.h
move cvar to its own module
[btb/d2x.git] / main / cvar.h
1 /* Console variables */
2
3 #ifndef _CVAR_H
4 #define _CVAR_H 1
5
6 #include "pstypes.h"
7
8
9 typedef struct cvar_s
10 {
11         char *name;
12         char *string;
13         dboolean archive;
14         float value;
15         struct cvar_s *next;
16 } cvar_t;
17
18
19 /* Register a CVar with the name and string and optionally archive elements set */
20 void cvar_registervariable (cvar_t *cvar);
21
22 /* Equivalent to typing <var_name> <value> at the console */
23 void cvar_set(char *cvar_name, char *value);
24
25 /* Get a CVar's value */
26 float cvar(char *cvar_name);
27
28
29 #endif /* _CVAR_H_ */