blob: 206e16a9c47438267cd0881d4afe4c27314f6fa0 [file] [log] [blame]
Franklin Weia855d622017-01-21 15:18:31 -05001#ifndef _CVARS_H_
2#define _CVARS_H_
3
4#define REGCONVAR(varname, varhelp, variable, function) CVAR_RegisterCvar(varname, varhelp, &variable, &function)
5#define REGCONFUNC(varname, varhelp, function) CVAR_RegisterCvar(varname, varhelp, NULL, &function)
6
Vencislav Atanasov183e45e2019-07-28 23:31:50 +03007#include <inttypes.h>
Franklin Weia855d622017-01-21 15:18:31 -05008
9typedef void (*function_t) (void* binding);
10
11typedef struct t_cvar_binding
12{
13 char name[64];
14 char help[64];
15 void* variable;
16 function_t function;
17} cvar_binding;
18
19
20void CVAR_RegisterCvar(const char * varname, const char * varhelp, void* variable, function_t function);
21int CVAR_GetNumCvarBindings();
22cvar_binding* CVAR_GetCvarBinding(unsigned int nBinding);
23void CVAR_Render();
24
25#endif