X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=cvar.h;h=89ad8fc90f02f58fb6802a98b90acc75f1dd0ade;hb=19a27ebf7c5ce9f50a72f233e5016dd596b90979;hp=0751a2da486cb7716d3c81e81bcd4c8a9e8b637c;hpb=d57be67cb00229acb8564b92c8b7c58eeed8a0cb;p=xonotic%2Fdarkplaces.git diff --git a/cvar.h b/cvar.h index 0751a2da..89ad8fc9 100644 --- a/cvar.h +++ b/cvar.h @@ -53,6 +53,9 @@ Cvars are restricted from having the same names as commands to keep this interface from being ambiguous. */ +#ifndef CVAR_H +#define CVAR_H + // cvar flags #define CVAR_SAVE 1 #define CVAR_NOTIFY 2 @@ -95,8 +98,6 @@ typedef struct cvar_s int flags; char *name; char *string; -// qboolean archive; // set to true to cause it to be saved to vars.rc -// qboolean server; // notifies players when changed int integer; float value; float vector[3]; @@ -121,6 +122,9 @@ void Cvar_Set (char *var_name, char *value); void Cvar_SetValue (char *var_name, float value); // expands value to a string and calls Cvar_Set +void Cvar_SetQuick (cvar_t *var, char *value); +void Cvar_SetValueQuick (cvar_t *var, float value); + float Cvar_VariableValue (char *var_name); // returns 0 if not defined or non numeric @@ -141,8 +145,7 @@ void Cvar_WriteVariables (QFile *f); // with the archive flag set to true. cvar_t *Cvar_FindVar (char *var_name); - -extern cvar_t *cvar_vars; +cvar_t *Cvar_FindVarAfter (char *prev_var_name, int neededflags); int Cvar_CompleteCountPossible (char *partial); char **Cvar_CompleteBuildList (char *partial); @@ -156,3 +159,5 @@ void Cvar_List_f (void); // Added by EvilTypeGuy eviltypeguy@qeradiant.com // Thanks to Matthias "Maddes" Buecher, http://www.inside3d.com/qip/ +#endif +