X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cvar.h;h=67115fc91c728b47381293f2507b433bc7ddf4a9;hb=ffcdab9ee79bdffd5166e96dc3ff00f788fe43ea;hp=525d4f004695b955f7dce91b1c7c441eabdb6e4d;hpb=f13419f00e3f8335e9a25498560a433597f28f50;p=xonotic%2Fdarkplaces.git diff --git a/cvar.h b/cvar.h index 525d4f00..67115fc9 100644 --- a/cvar.h +++ b/cvar.h @@ -19,9 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // cvar.h -struct cmd_state_s; -typedef struct cmd_state_s cmd_state_t; - /* cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly @@ -59,6 +56,11 @@ interface from being ambiguous. #ifndef CVAR_H #define CVAR_H +#include "qtypes.h" +#include "qdefs.h" +struct cmd_state_s; +struct qfile_s; + typedef struct cvar_s { int flags; @@ -157,7 +159,7 @@ void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full); void Cvar_CompleteCvarPrint (cvar_state_t *cvars, const char *partial, int neededflags); -qbool Cvar_Command (cmd_state_t *cmd); +qbool Cvar_Command (struct cmd_state_s *cmd); // called by Cmd_ExecuteString when Cmd_Argv(cmd, 0) doesn't match a known // command. Returns true if the command was a variable reference that // was handled. (print or change) @@ -165,13 +167,13 @@ qbool Cvar_Command (cmd_state_t *cmd); void Cvar_SaveInitState(cvar_state_t *cvars); void Cvar_RestoreInitState(cvar_state_t *cvars); -void Cvar_UnlockDefaults(cmd_state_t *cmd); -void Cvar_LockDefaults_f(cmd_state_t *cmd); -void Cvar_ResetToDefaults_All_f(cmd_state_t *cmd); -void Cvar_ResetToDefaults_NoSaveOnly_f(cmd_state_t *cmd); -void Cvar_ResetToDefaults_SaveOnly_f(cmd_state_t *cmd); +void Cvar_UnlockDefaults(struct cmd_state_s *cmd); +void Cvar_LockDefaults_f(struct cmd_state_s *cmd); +void Cvar_ResetToDefaults_All_f(struct cmd_state_s *cmd); +void Cvar_ResetToDefaults_NoSaveOnly_f(struct cmd_state_s *cmd); +void Cvar_ResetToDefaults_SaveOnly_f(struct cmd_state_s *cmd); -void Cvar_WriteVariables (cvar_state_t *cvars, qfile_t *f); +void Cvar_WriteVariables (cvar_state_t *cvars, struct qfile_s *f); // Writes lines containing "set variable value" for all variables // with the archive flag set to true. @@ -188,11 +190,11 @@ const char **Cvar_CompleteBuildList(cvar_state_t *cvars, const char *partial, in /// Referenced in cmd.c in Cmd_Init hence it's inclusion here. /// Added by EvilTypeGuy eviltypeguy@qeradiant.com /// Thanks to Matthias "Maddes" Buecher, http://www.inside3d.com/qip/ -void Cvar_List_f(cmd_state_t *cmd); +void Cvar_List_f(struct cmd_state_s *cmd); -void Cvar_Set_f(cmd_state_t *cmd); -void Cvar_SetA_f(cmd_state_t *cmd); -void Cvar_Del_f(cmd_state_t *cmd); +void Cvar_Set_f(struct cmd_state_s *cmd); +void Cvar_SetA_f(struct cmd_state_s *cmd); +void Cvar_Del_f(struct cmd_state_s *cmd); // commands to create new cvars (or set existing ones) // seta creates an archived cvar (saved to config)