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