Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/core/cvar.h
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/core/cvar.h')
-rw-r--r--src/core/cvar.h66
1 files changed, 39 insertions, 27 deletions
diff --git a/src/core/cvar.h b/src/core/cvar.h
index 4c3d942..3d7b246 100644
--- a/src/core/cvar.h
+++ b/src/core/cvar.h
@@ -28,34 +28,44 @@ public:
* Game a cvar with this flag is only valid when a game is loaded
* Info a cvar that updates player info
*/
- enum Flags {Archive=1, ReadOnly=2, Game=4, Info=8};
-
+ enum Flags {Archive = 1, ReadOnly = 2, Game = 4, Info = 8};
+
/// create a new variable
Cvar(const char* name, const unsigned int flags = 0);
-/*----- inspectors ------------------------------------------------ */
+ /*----- inspectors ------------------------------------------------ */
/// returns the name of the variable
- inline const std::string& name() const { return cvar_name; }
+ inline const std::string& name() const {
+ return cvar_name;
+ }
/// returns the info of the variable
- inline const std::string& info() const { return cvar_info; }
+ inline const std::string& info() const {
+ return cvar_info;
+ }
/// returns the flags of the variable
- inline const unsigned int flags() const { return cvar_flags; }
+ inline const unsigned int flags() const {
+ return cvar_flags;
+ }
/// returns the float value of the variable
- inline const float value() const { return cvar_value; }
+ inline const float value() const {
+ return cvar_value;
+ }
/// returns the string value of the variable
- inline const std::string& str() const { return cvar_str; }
+ inline const std::string& str() const {
+ return cvar_str;
+ }
-/*----- mutators -------------------------------------------------- */
+ /*----- mutators -------------------------------------------------- */
/// set the info string
void set_info(const char* info);
- /// char * assignment operator
+ /// char * assignment operator
Cvar &operator=(const char* other);
/// std::string assignment operator
@@ -64,40 +74,40 @@ public:
/// float assignment operator
Cvar &operator=(const float other);
-/* ---- Static functions for the Cvar registry -------------------- */
+ /* ---- Static functions for the Cvar registry -------------------- */
/// type definition for the Cvar registry
typedef std::map<std::string, Cvar*> Registry;
-
+
/**
* @brief get a cvar value from the registry
* If the a cvar with the given name already exists in the registry,
- * its value will not be changed. If the cvar does not exist,
- * it will be created
- */
- static Cvar* get(const char* name, const char* value, const unsigned int flags=0);
+ * its value will not be changed. If the cvar does not exist,
+ * it will be created
+ */
+ static Cvar* get(const char* name, const char* value, const unsigned int flags = 0);
/**
* @brief get a cvar value from the registry
* If the a cvar with the given name already exists in the registry,
- * its value will not be changed. If the cvar does not exist,
- * it will be created
- */
- static Cvar* get(const char* name, const float value, const unsigned int flags=0);
+ * its value will not be changed. If the cvar does not exist,
+ * it will be created
+ */
+ static Cvar* get(const char* name, const float value, const unsigned int flags = 0);
/**
* @brief set a cvar value
* If the a cvar with the given name already exists in the registry,
- * its value will be replaced
- */
- static Cvar* set(const char* name, const char* value, const unsigned int flags=0);
+ * its value will be replaced
+ */
+ static Cvar* set(const char* name, const char* value, const unsigned int flags = 0);
/**
* @brief set a cvar value
* If the a cvar with the given name already exists in the registry,
- * its value will be replaced
- */
- static Cvar* set(const char* name, float value, const unsigned int flags=0);
+ * its value will be replaced
+ */
+ static Cvar* set(const char* name, float value, const unsigned int flags = 0);
/// search for a named cvar, returns 0 if not found
static Cvar* find(const std::string& name);
@@ -115,7 +125,9 @@ public:
static void list();
/// the cvar registry
- static inline Registry & registry() { return cvar_registry; }
+ static inline Registry & registry() {
+ return cvar_registry;
+ }
static Cvar *sv_dedicated; // dedicated server
static Cvar *sv_private; // client with private server