game_config Namespace Reference

Game configuration data as global variables. More...


Classes

struct  server_info
struct  game_version

Namespaces

namespace  sounds

Functions

struct game_version wesnoth_version (VERSION)
struct game_version min_savegame_version (MIN_SAVEGAME_VERSION)
struct game_version test_version ("test")
void load_config (const config *cfg)
void add_color_info (const config &v)
const color_rangecolor_info (const std::string &name)
const std::vector< Uint32 > & tc_info (const std::string &name)
bool operator< (const struct game_version &a, const struct game_version &b)
bool operator<= (const struct game_version &a, const struct game_version &b)
bool operator> (const struct game_version &a, const struct game_version &b)
bool operator>= (const struct game_version &a, const struct game_version &b)
bool operator== (const struct game_version &a, const struct game_version &b)
bool operator!= (const struct game_version &a, const struct game_version &b)

Variables

int base_income = 2
int village_income = 1
int poison_amount = 8
int rest_heal_amount = 2
int recall_cost = 20
int kill_experience = 8
unsigned lobby_refresh = 2000
const int gold_carryover_percentage = 80
 Default percentage gold carried over to the next scenario.
const bool gold_carryover_add = false
 If true the carried over gold is added to the start gold in the next scenario, otherwise it uses the maximum of starting gold and carryover gold.
const std::string version = VERSION
const std::string revision = VERSION
bool debug = false
bool editor = false
bool ignore_replay_errors = false
bool mp_debug = false
bool exit_at_end = false
bool no_delay = false
bool disable_autosave = false
std::string game_icon = "wesnoth-icon.png"
std::string game_title
std::string game_logo
std::string title_music
std::string lobby_music
int title_logo_x = 0
int title_logo_y = 0
int title_buttons_x = 0
int title_buttons_y = 0
int title_buttons_padding = 0
int title_tip_x = 0
int title_tip_width = 0
int title_tip_padding = 0
std::string terrain_mask_image = "terrain/alphamask.png"
std::string grid_image = "terrain/grid.png"
std::string unreachable_image = "terrain/darken.png"
 overlay image for unreachable tiles
std::string linger_image = "terrain/darken-linger.png"
 overlay image for tiles in linger mode
std::string energy_image = "misc/bar-energy.png"
std::string moved_ball_image = "misc/ball-moved.png"
std::string unmoved_ball_image = "misc/ball-unmoved.png"
std::string partmoved_ball_image = "misc/ball-partmoved.png"
std::string enemy_ball_image = "misc/ball-enemy.png"
std::string ally_ball_image = "misc/ball-ally.png"
std::string flag_image = "flags/flag-1.png:150,flags/flag-2.png:150,flags/flag-3.png:150,flags/flag-4.png:150"
std::string flag_icon_image = "flags/flag_icon.png"
std::string flag_rgb = "flag_green"
std::vector< Uint32 > defense_color_scale
double hp_bar_scaling = 0.666
double xp_bar_scaling = 0.5
std::string cross_image = "misc/cross.png"
std::vector< std::string > foot_speed_prefix
std::string foot_teleport_enter = "footsteps/teleport-in.png"
std::string foot_teleport_exit = "footsteps/teleport-out.png"
std::string observer_image = "misc/eye.png"
std::string tod_bright_image = "misc/tod-bright.png"
std::string unchecked_menu_image = "buttons/checkbox.png"
std::string checked_menu_image = "buttons/checkbox-pressed.png"
std::string wml_menu_image = "buttons/WML-custom.png"
std::string level_image
std::string ellipsis_image
std::map< std::string,
color_range
team_rgb_range
std::map< std::string, t_stringteam_rgb_name
std::map< std::string,
std::vector< Uint32 > > 
team_rgb_colors
const std::string observer_team_name = "observer"
 observer team name used for observer team chat
const size_t max_loop = 65536
 The maximum number of hexes on a map and items in an array and also used as maximum in wml loops.
std::string path = ""
std::vector< server_infoserver_list
struct game_version wesnoth_version
struct game_version min_savegame_version
struct game_version test_version


Detailed Description

Game configuration data as global variables.

This module can be used to load various high level game configuration data from a .cfg file. The loaded data will subsequently be accessible via the global variables.


Function Documentation

void game_config::add_color_info ( const config v  ) 

const color_range & game_config::color_info ( const std::string &  name  ) 

void game_config::load_config ( const config cfg  ) 

struct game_version game_config::min_savegame_version ( MIN_SAVEGAME_VERSION   )  [read]

bool game_config::operator!= ( const struct game_version &  a,
const struct game_version &  b 
)

Definition at line 346 of file game_config.cpp.

References game_config::game_version::full.

bool game_config::operator< ( const struct game_version &  a,
const struct game_version &  b 
)

bool game_config::operator<= ( const struct game_version &  a,
const struct game_version &  b 
)

Definition at line 326 of file game_config.cpp.

bool game_config::operator== ( const struct game_version &  a,
const struct game_version &  b 
)

Definition at line 341 of file game_config.cpp.

References game_config::game_version::full.

bool game_config::operator> ( const struct game_version &  a,
const struct game_version &  b 
)

Definition at line 331 of file game_config.cpp.

bool game_config::operator>= ( const struct game_version &  a,
const struct game_version &  b 
)

Definition at line 336 of file game_config.cpp.

const std::vector< Uint32 > & game_config::tc_info ( const std::string &  name  ) 

Definition at line 279 of file game_config.cpp.

References ERR_NG, string2rgb(), and team_rgb_colors.

Referenced by image::locator::load_image_sub_file().

struct game_version game_config::test_version ( "test"   )  [read]

struct game_version game_config::wesnoth_version ( VERSION   )  [read]


Variable Documentation

std::string game_config::ally_ball_image = "misc/ball-ally.png"

Definition at line 69 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

std::string game_config::checked_menu_image = "buttons/checkbox-pressed.png"

Definition at line 87 of file game_config.cpp.

Referenced by hotkey::command_executor::get_menu_image().

std::string game_config::cross_image = "misc/cross.png"

Definition at line 78 of file game_config.cpp.

Referenced by game_display::draw(), and load_config().

bool game_config::debug = false

std::vector< Uint32 > game_config::defense_color_scale

bool game_config::editor = false

Definition at line 53 of file game_config.cpp.

Referenced by main(), and use_colour_cursors().

Definition at line 91 of file game_config.cpp.

Referenced by load_config(), and display::refresh_report().

std::string game_config::enemy_ball_image = "misc/ball-enemy.png"

Definition at line 68 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

std::string game_config::energy_image = "misc/bar-energy.png"

Definition at line 64 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

Definition at line 53 of file game_config.cpp.

Referenced by playsingle_controller::play_scenario().

std::string game_config::flag_icon_image = "flags/flag_icon.png"

Definition at line 71 of file game_config.cpp.

Referenced by reports::generate_report(), and load_config().

std::string game_config::flag_image = "flags/flag-1.png:150,flags/flag-2.png:150,flags/flag-3.png:150,flags/flag-4.png:150"

Definition at line 70 of file game_config.cpp.

Referenced by game_display::game_display(), and load_config().

std::string game_config::flag_rgb = "flag_green"

std::vector< std::string > game_config::foot_speed_prefix

Definition at line 80 of file game_config.cpp.

Referenced by game_display::footsteps_images(), and load_config().

std::string game_config::foot_teleport_enter = "footsteps/teleport-in.png"

Definition at line 81 of file game_config.cpp.

Referenced by game_display::footsteps_images(), and load_config().

std::string game_config::foot_teleport_exit = "footsteps/teleport-out.png"

Definition at line 82 of file game_config.cpp.

Referenced by game_display::footsteps_images(), and load_config().

std::string game_config::game_icon = "wesnoth-icon.png"

Definition at line 55 of file game_config.cpp.

Referenced by load_config(), and image::set_wm_icon().

Definition at line 55 of file game_config.cpp.

Referenced by fade_logo(), and load_config().

Definition at line 55 of file game_config.cpp.

Referenced by draw_background(), load_config(), and about::show_about().

const bool game_config::gold_carryover_add = false

If true the carried over gold is added to the start gold in the next scenario, otherwise it uses the maximum of starting gold and carryover gold.

Definition at line 46 of file game_config.cpp.

Referenced by playsingle_controller::play_scenario().

Default percentage gold carried over to the next scenario.

Definition at line 45 of file game_config.cpp.

Referenced by playsingle_controller::play_scenario().

std::string game_config::grid_image = "terrain/grid.png"

Definition at line 60 of file game_config.cpp.

Referenced by game_display::draw(), editor_display::draw(), and load_config().

Definition at line 75 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

Definition at line 90 of file game_config.cpp.

Referenced by unit::advancement_icons(), and load_config().

std::string game_config::linger_image = "terrain/darken-linger.png"

overlay image for tiles in linger mode

Definition at line 62 of file game_config.cpp.

Referenced by game_display::draw().

Definition at line 55 of file game_config.cpp.

Referenced by load_config(), and mp::lobby::lobby().

unsigned game_config::lobby_refresh = 2000

Definition at line 44 of file game_config.cpp.

Referenced by load_config(), and mp::ui::process_network().

const size_t game_config::max_loop = 65536

The maximum number of hexes on a map and items in an array and also used as maximum in wml loops.

Definition at line 104 of file game_config.cpp.

Referenced by variable_info::variable_info().

Referenced by mp::connect::load_game().

std::string game_config::moved_ball_image = "misc/ball-moved.png"

Definition at line 65 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

bool game_config::mp_debug = false

bool game_config::no_delay = false

Definition at line 53 of file game_config.cpp.

Referenced by display::delay(), and unit_animator::wait_for_end().

std::string game_config::observer_image = "misc/eye.png"

Definition at line 84 of file game_config.cpp.

Referenced by reports::generate_report(), and load_config().

const std::string game_config::observer_team_name = "observer"

observer team name used for observer team chat

Definition at line 102 of file game_config.cpp.

Referenced by game::process_turn(), events::menu_handler::send_chat_message(), and events::menu_handler::show_chat_log().

std::string game_config::partmoved_ball_image = "misc/ball-partmoved.png"

Definition at line 67 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

std::string game_config::path = ""

Definition at line 41 of file game_config.cpp.

Referenced by calculate_healing(), and load_config().

const std::string game_config::revision = VERSION

Definition at line 137 of file game_config.cpp.

Referenced by load_config(), and preferences::server_list().

std::map< std::string, std::vector< Uint32 > > game_config::team_rgb_colors

Definition at line 96 of file game_config.cpp.

Referenced by add_color_info(), and tc_info().

Definition at line 94 of file game_config.cpp.

Referenced by add_color_info(), and mp::get_colour_string().

std::string game_config::terrain_mask_image = "terrain/alphamask.png"

Referenced by mp::connect::load_game().

Definition at line 56 of file game_config.cpp.

Referenced by load_config(), and gui::show_title().

Definition at line 56 of file game_config.cpp.

Referenced by load_config(), and gui::show_title().

Definition at line 56 of file game_config.cpp.

Referenced by load_config(), and gui::show_title().

Definition at line 56 of file game_config.cpp.

Referenced by draw_background(), and load_config().

Definition at line 56 of file game_config.cpp.

Referenced by draw_background(), and load_config().

Definition at line 55 of file game_config.cpp.

Referenced by load_config(), and play_game().

Definition at line 57 of file game_config.cpp.

Referenced by draw_tip_of_day(), load_config(), and gui::show_title().

Definition at line 57 of file game_config.cpp.

Referenced by draw_tip_of_day(), and load_config().

Definition at line 57 of file game_config.cpp.

Referenced by draw_tip_of_day(), and load_config().

std::string game_config::tod_bright_image = "misc/tod-bright.png"

Definition at line 85 of file game_config.cpp.

Referenced by load_config(), and display::refresh_report().

std::string game_config::unchecked_menu_image = "buttons/checkbox.png"

Definition at line 86 of file game_config.cpp.

Referenced by hotkey::command_executor::get_menu_image().

std::string game_config::unmoved_ball_image = "misc/ball-unmoved.png"

Definition at line 66 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().

std::string game_config::unreachable_image = "terrain/darken.png"

overlay image for unreachable tiles

Definition at line 61 of file game_config.cpp.

Referenced by game_display::draw(), and load_config().

const std::string game_config::version = VERSION

std::string game_config::wml_menu_image = "buttons/WML-custom.png"

Definition at line 88 of file game_config.cpp.

Referenced by play_controller::get_action_image().

Definition at line 76 of file game_config.cpp.

Referenced by load_config(), and unit::redraw_unit().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs