X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=cvar.h;h=92ea81cdc54ee26ce172ce63e5ee429cb8d235b9;hb=0207a10e1576d5ebe67730b5b98709383613f4df;hp=1b01fc78348b123428006064efd27f436f1b41f5;hpb=add200ca17e19a0a85eed9cc78721aa1ae74215b;p=xonotic%2Fdarkplaces.git diff --git a/cvar.h b/cvar.h index 1b01fc78..92ea81cd 100644 --- a/cvar.h +++ b/cvar.h @@ -1,5 +1,6 @@ /* Copyright (C) 1996-1997 Id Software, Inc. +Copyright (C) 2006-2021 DarkPlaces contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -76,20 +77,11 @@ typedef struct cvar_s const char *defstring; void (*callback)(struct cvar_s *var); - qbool ignore_callback; char **aliases; - int aliasindex; - - // values at init (for Cvar_RestoreInitState) - qbool initstate; // indicates this existed at init - int initflags; - const char *initstring; - const char *initdescription; - int initinteger; - float initvalue; - float initvector[3]; - const char *initdefstring; + int aliases_size; + + struct cvar_s *initstate; // snapshot of cvar during init int globaldefindex[3]; int globaldefindex_stringno[3]; @@ -113,7 +105,7 @@ cvar_state_t; extern cvar_state_t cvars_all; extern cvar_state_t cvars_null; // used by cmd_serverfromclient which intentionally has no cvars available -void Cvar_RegisterAlias(cvar_t *variable, const char *alias ); +void Cvar_RegisterVirtual(cvar_t *variable, const char *name ); void Cvar_RegisterCallback(cvar_t *variable, void (*callback)(cvar_t *)); @@ -123,6 +115,8 @@ void Cvar_RegisterVariable(cvar_t *variable); qbool Cvar_Readonly (cvar_t *var, const char *cmd_name); +void Cvar_Callback(cvar_t *var); + /// equivelant to " " typed at the console void Cvar_Set (cvar_state_t *cvars, const char *var_name, const char *value);