X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cvar.h;h=de379f8fe40e195651bbe00f8dcf03e9d07fec41;hb=16dee271a7e503a49993c5f934aeb6eb45c19ae1;hp=9523404ec61720f1f8751e016b5be7409b83642b;hpb=71e075efa49758f4fd21831973fb0d8e4d6938c8;p=xonotic%2Fdarkplaces.git diff --git a/cvar.h b/cvar.h index 9523404e..de379f8f 100644 --- a/cvar.h +++ b/cvar.h @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -60,10 +60,13 @@ interface from being ambiguous. #define CVAR_SAVE 1 #define CVAR_NOTIFY 2 -#define CVAR_READONLY 4 +#define CVAR_READONLY 4 +#define CVAR_SERVERINFO 8 +#define CVAR_USERINFO 16 // used to determine if flags is valid -#define CVAR_MAXFLAGSVAL 7 +#define CVAR_MAXFLAGSVAL 31 // for internal use only! +#define CVAR_DEFAULTSET (1<<30) #define CVAR_ALLOCATED (1<<31) /* @@ -84,14 +87,14 @@ interface from being ambiguous. #define MAX_CVAROPTIONS 16 -typedef struct +typedef struct cvaroption_s { int value; const char *name; } cvaroption_t; -typedef struct +typedef struct menucvar_s { int type; float valuemin, valuemax, valuestep; @@ -104,13 +107,20 @@ menucvar_t; typedef struct cvar_s { int flags; + char *name; + char *string; + char *description; int integer; float value; float vector[3]; + + char *defstring; + //menucvar_t menuinfo; struct cvar_s *next; + struct cvar_s *nextonhashchain; } cvar_t; /* @@ -141,10 +151,15 @@ float Cvar_VariableValue (const char *var_name); const char *Cvar_VariableString (const char *var_name); // returns an empty string if not defined +const char *Cvar_VariableDefString (const char *var_name); +// returns an empty string if not defined + const char *Cvar_CompleteVariable (const char *partial); // attempts to match a partial variable name for command line completion // returns NULL if nothing fits +void Cvar_CompleteCvarPrint (const char *partial); + qboolean Cvar_Command (void); // called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known // command. Returns true if the command was a variable reference that