]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cvar.h
gave names to nearly all structs and enums which should make for better C++ error...
[xonotic/darkplaces.git] / cvar.h
diff --git a/cvar.h b/cvar.h
index 9523404ec61720f1f8751e016b5be7409b83642b..ef564156b01c8d69f8f37ed1727b808b38af9150 100644 (file)
--- 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.
 
@@ -64,6 +64,7 @@ interface from being ambiguous.
 // used to determine if flags is valid
 #define CVAR_MAXFLAGSVAL 7
 // for internal use only!
+#define CVAR_DEFAULTSET (1<<30)
 #define CVAR_ALLOCATED (1<<31)
 
 /*
@@ -84,14 +85,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,11 +105,16 @@ menucvar_t;
 typedef struct cvar_s
 {
        int flags;
+
        char *name;
+
        char *string;
        int integer;
        float value;
        float vector[3];
+
+       char *defstring;
+
        //menucvar_t menuinfo;
        struct cvar_s *next;
 } cvar_t;
@@ -141,6 +147,9 @@ 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