Functions | |
int | get_turns (const std::string &value) |
Gets the number of turns. | |
int | get_village_gold (const std::string &value) |
Gets the village gold. | |
int | get_xp_modifier (const std::string &value) |
Gets the xp modifier. | |
bool | use_fog (const std::string &value) |
Returns whether the fog of war should be used. | |
bool | use_random_start_time (const std::string &value) |
Returns whether the random start time feature should be used. | |
bool | use_shroud (const std::string &value) |
Returns whether the shroud should be used. | |
Variables | |
const int | turns_min = 1 |
const int | turns_max = 100 |
const int | turns_default = 100 |
const int | turns_step = 1 |
These values can be used to initialize the preferences, but also to set map values if these aren't defined.
int settings::get_turns | ( | const std::string & | value | ) |
Gets the number of turns.
If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.
value | string containing the number of turns |
Definition at line 27 of file settings.cpp.
References turns_default, turns_max, and turns_min.
Referenced by mp::create::process_event(), and preferences::turns().
int settings::get_village_gold | ( | const std::string & | value | ) |
Gets the village gold.
If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.
value | string containing the village gold |
Definition at line 40 of file settings.cpp.
Referenced by mp::create::process_event(), and preferences::village_gold().
int settings::get_xp_modifier | ( | const std::string & | value | ) |
Gets the xp modifier.
If no valid value supplied, it will return a default. The value is also range checked. When out of bounds, it will be set to the nearest bound.
value | string containing the xp modifier |
Definition at line 45 of file settings.cpp.
Referenced by mp::create::process_event(), and preferences::xp_modifier().
bool settings::use_fog | ( | const std::string & | value | ) |
Returns whether the fog of war should be used.
If no valid value is supplied, it will return a default.
value | string containing a boolean value |
Definition at line 50 of file settings.cpp.
References utils::string_bool().
Referenced by preferences::fog(), and mp::create::process_event().
bool settings::use_random_start_time | ( | const std::string & | value | ) |
Returns whether the random start time feature should be used.
If no valid value is supplied, it will return a default.
value | string containing a boolean value |
Definition at line 55 of file settings.cpp.
References utils::string_bool().
Referenced by mp::create::process_event(), and preferences::random_start_time().
bool settings::use_shroud | ( | const std::string & | value | ) |
Returns whether the shroud should be used.
If no valid value is supplied, it will return a default.
value | string containing a boolean value |
Definition at line 60 of file settings.cpp.
References utils::string_bool().
Referenced by mp::create::process_event(), and preferences::shroud().
const int settings::turns_default = 100 |
const int settings::turns_max = 100 |
const int settings::turns_min = 1 |
const int settings::turns_step = 1 |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |