Xonotic
|
Go to the source code of this file.
Macros | |
#define | __AUTOCVAR(file, archive, var, type, desc, default) |
#define | _AUTOCVAR(...) EVAL__AUTOCVAR(OVERLOAD(AUTOCVAR, __FILE__, __VA_ARGS__)) |
#define | AUTOCVAR(...) _AUTOCVAR(false, __VA_ARGS__) |
#define | AUTOCVAR_5(file, archive, var, type, desc) __AUTOCVAR(file, archive, var, type, desc, default_##type) |
#define | AUTOCVAR_6(file, archive, var, type, default, desc) __AUTOCVAR(file, archive, var, type, desc, default) |
#define | AUTOCVAR_SAVE(...) _AUTOCVAR(true, __VA_ARGS__) |
#define | BINOP(op, len, expr) |
#define | EVAL__AUTOCVAR(...) __VA_ARGS__ |
#define | repr_cvar_bool(x) ((x) ? "1" : "0") |
#define | repr_cvar_float(x) (ftos(x)) |
#define | repr_cvar_int(x) (ftos(x)) |
#define | repr_cvar_string(x) (x) |
#define | repr_cvar_vector(x) (sprintf("%v", x)) |
#define | X(expr) |
Functions | |
ERASEABLE bool | cvar_value_issafe (string s) |
ERASEABLE bool | expr_evaluate (string s) |
Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ... More... | |
ERASEABLE string | MakeConsoleSafe (string input) |
escape the string to make it safe for consoles More... | |
ERASEABLE void | RegisterCvars (void(string name, string def, string desc, bool archive, string file) f) |
ERASEABLE void | RegisterCvars_Save (string name, string def, string desc, bool archive, string file) |
ERASEABLE void | RegisterCvars_Set (string name, string def, string desc, bool archive, string file) |
STATIC_INIT_LATE (Cvars) | |
Variables | |
const noref bool | default_bool = false |
const noref float | default_float = 0 |
const noref int | default_int = 0 |
const noref string | default_string = "" |
const noref vector | default_vector = '0 0 0' |
int | RegisterCvars_Save_fd |
#define __AUTOCVAR | ( | file, | |
archive, | |||
var, | |||
type, | |||
desc, | |||
default | |||
) |
#define _AUTOCVAR | ( | ... | ) | EVAL__AUTOCVAR(OVERLOAD(AUTOCVAR, __FILE__, __VA_ARGS__)) |
#define AUTOCVAR_5 | ( | file, | |
archive, | |||
var, | |||
type, | |||
desc | |||
) | __AUTOCVAR(file, archive, var, type, desc, default_##type) |
#define AUTOCVAR_6 | ( | file, | |
archive, | |||
var, | |||
type, | |||
default, | |||
desc | |||
) | __AUTOCVAR(file, archive, var, type, desc, default) |
#define BINOP | ( | op, | |
len, | |||
expr | |||
) |
Referenced by expr_evaluate().
#define X | ( | expr | ) |
Referenced by expr_evaluate().
Definition at line 11 of file cvar.qh.
References ERASEABLE, and strstrofs.
Referenced by _MapInfo_Parse_Settemp(), InitGameplayMode(), MapInfo_Get_ByName_NoFallbacks(), and spawnfunc().
Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ...
+: all must match. this is the default -: one must NOT match
var>x var<x var>="">=x var<=x var==x var!=x var===x var!==x
Definition at line 48 of file cvar.qh.
References argv(), BINOP, cvar(), cvar_string(), ERASEABLE, ftos(), stof(), str2chr, substring(), tokenize_console, v, and X.
Referenced by SV_OnEntityPreSpawnFunction().
escape the string to make it safe for consoles
Definition at line 24 of file cvar.qh.
References ERASEABLE.
Referenced by GameCommand_adminmsg(), Local_Notification(), Local_Notification_sprintf(), Local_Notification_WOVA(), and RegisterCvars_Set().
ERASEABLE void RegisterCvars | ( | void(string name, string def, string desc, bool archive, string file) | f | ) |
Definition at line 8 of file cvar.qh.
References ERASEABLE.
Referenced by STATIC_INIT_LATE().
ERASEABLE void RegisterCvars_Save | ( | string | name, |
string | def, | ||
string | desc, | ||
bool | archive, | ||
string | file | ||
) |
Definition at line 113 of file cvar.qh.
References fputs().
Referenced by STATIC_INIT_LATE().
ERASEABLE void RegisterCvars_Set | ( | string | name, |
string | def, | ||
string | desc, | ||
bool | archive, | ||
string | file | ||
) |
Definition at line 104 of file cvar.qh.
References localcmd, and MakeConsoleSafe().
Referenced by STATIC_INIT_LATE().
STATIC_INIT_LATE | ( | Cvars | ) |
Definition at line 119 of file cvar.qh.
References fclose(), FILE_WRITE, fopen(), RegisterCvars(), RegisterCvars_Save(), and RegisterCvars_Set().