]> icculus.org git repositories - btb/d2x.git/blob - include/console.h
joystick support
[btb/d2x.git] / include / console.h
1 /* Console */
2
3 #ifndef _CONSOLE_H_
4 #define _CONSOLE_H_ 1
5
6 /* Priority levels */
7 #define CON_CRITICAL -2
8 #define CON_URGENT   -1
9 #define CON_NORMAL    0
10 #define CON_VERBOSE   1
11 #define CON_DEBUG     2
12
13 int  con_init(void);
14 void con_printf(int level, char *fmt, ...);
15
16 void con_draw(void);
17 void con_update(void);
18
19
20 /* CVar stuff */
21 typedef struct cvar_s
22 {
23         char *name;
24         char *string;
25         dboolean archive;
26         float value;
27         struct cvar_s *next;
28 } cvar_t;
29
30 extern cvar_t *cvar_vars;
31
32 /* Register a CVar with the name and string and optionally archive elements set */
33 void cvar_registervariable (cvar_t *cvar);
34
35 /* Equivalent to typing <var_name> <value> at the console */
36 void cvar_set(char *cvar_name, char *value);
37
38 /* Get a CVar's value */
39 float cvar(char *cvar_name);
40
41 /* Console CVars */
42 /* How discriminating we are about which messages are displayed */
43 cvar_t con_threshold;
44
45 #endif /* _CONSOLE_H_ */
46