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_range & | color_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_string > | team_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_info > | server_list |
struct game_version | wesnoth_version |
struct game_version | min_savegame_version |
struct game_version | test_version |
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.
void game_config::add_color_info | ( | const config & | v | ) |
Definition at line 220 of file game_config.cpp.
References DBG_NG, ERR_NG, config::get_children(), palette(), r, string2rgb(), team_colors, team_rgb_colors, team_rgb_name, and team_rgb_range.
Referenced by unit::add_modification(), unit_type::build_full(), load_config(), play_controller::play_controller(), and unit::unit().
const color_range & game_config::color_info | ( | const std::string & | name | ) |
Definition at line 263 of file game_config.cpp.
References _, string2rgb(), and team_rgb_range.
Referenced by mp::wait::generate_menu(), color_range::index(), image::locator::load_image_sub_file(), and mp::connect::side::side().
void game_config::load_config | ( | const config * | cfg | ) |
Definition at line 139 of file game_config.cpp.
References add_color_info(), game_config::server_info::address, ally_ball_image, base_income, cross_image, defense_color_scale, ellipsis_image, enemy_ball_image, energy_image, flag_icon_image, flag_image, flag_rgb, foot_speed_prefix, foot_teleport_enter, foot_teleport_exit, game_icon, game_logo, game_title, grid_image, hp_bar_scaling, kill_experience, level_image, lobby_music, lobby_refresh, moved_ball_image, game_config::server_info::name, observer_image, partmoved_ball_image, poison_amount, recall_cost, rest_heal_amount, server_list, utils::split(), string2rgb(), terrain_mask_image, title_buttons_padding, title_buttons_x, title_buttons_y, title_logo_x, title_logo_y, title_music, title_tip_padding, title_tip_width, title_tip_x, tod_bright_image, unmoved_ball_image, unreachable_image, village_income, and xp_bar_scaling.
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 | |||
) |
bool game_config::operator< | ( | const struct game_version & | a, | |
const struct game_version & | b | |||
) |
Definition at line 319 of file game_config.cpp.
References game_config::game_version::major_nr, game_config::game_version::minor_nr, and game_config::game_version::patch.
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 | |||
) |
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] |
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().
int game_config::base_income = 2 |
Definition at line 38 of file game_config.cpp.
Referenced by team::base_income(), team::income(), load_config(), and playsingle_controller::play_scenario().
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 |
Definition at line 53 of file game_config.cpp.
Referenced by playsingle_controller::can_execute_command(), ai::choose_move(), game_display::debug_highlight(), help::description_type(), ai_interface::diagnostic(), events::console_handler::do_debug(), events::console_handler::do_nodebug(), game_display::draw(), help::help_text_area::handle_ref_cfg(), events::console_handler::is_enabled(), mp::lobby::lobby(), ai_interface::log_message(), playsingle_controller::play_side(), events::menu_handler::scenario_settings_table(), help::show_help(), events::menu_handler::status_table(), and upload_log::~upload_log().
std::vector< Uint32 > game_config::defense_color_scale |
Definition at line 73 of file game_config.cpp.
Referenced by game_display::draw_movement_info(), load_config(), and events::menu_handler::unit_list().
bool game_config::disable_autosave = false |
Definition at line 53 of file game_config.cpp.
Referenced by events::menu_handler::autosave(), and events::console_handler::do_nosaves().
bool game_config::editor = false |
std::string game_config::ellipsis_image |
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().
bool game_config::exit_at_end = false |
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" |
Definition at line 72 of file game_config.cpp.
Referenced by game_display::game_display(), reports::generate_report(), and load_config().
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().
std::string game_config::game_logo |
std::string game_config::game_title |
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().
const int game_config::gold_carryover_percentage = 80 |
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().
double game_config::hp_bar_scaling = 0.666 |
Definition at line 75 of file game_config.cpp.
Referenced by load_config(), and unit::redraw_unit().
bool game_config::ignore_replay_errors = false |
Definition at line 53 of file game_config.cpp.
Referenced by events::console_handler::do_ignore_replay_errors(), recruit_unit(), and replay::throw_error().
int game_config::kill_experience = 8 |
Definition at line 43 of file game_config.cpp.
Referenced by ai::attack_analysis::analyze(), attack::attack(), load_config(), and unit::xp_color().
std::string game_config::level_image |
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().
std::string game_config::lobby_music |
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 |
Definition at line 53 of file game_config.cpp.
Referenced by replay::add_checksum_check(), replay::add_unit_checksum(), and check_checksums().
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 134 of file game_config.cpp.
Referenced by add_license(), get_exploder_dir(), get_files_in_dir(), get_intl_dir(), get_mask_dir(), init_textdomains(), istream_file(), gui::menu::imgsel_style::load_image(), loadscreen::loadscreen(), main(), open_font(), font::set_font_list(), events::menu_handler::show_enemy_moves(), and wesnoth_setlocale().
int game_config::poison_amount = 8 |
Definition at line 40 of file game_config.cpp.
Referenced by ai::attack_analysis::analyze(), ai::average_resistance_against(), calculate_healing(), ai::get_healing(), and load_config().
int game_config::recall_cost = 20 |
Definition at line 42 of file game_config.cpp.
Referenced by do_replay_handle(), load_config(), events::menu_handler::recall(), events::menu_handler::redo(), and events::menu_handler::undo().
int game_config::rest_heal_amount = 2 |
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 51 of file game_config.cpp.
Referenced by map_editor::change_language(), events::chat_command_handler::do_version(), draw_background(), and main().
std::vector< server_info > game_config::server_list |
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 |
std::map< std::string, t_string > game_config::team_rgb_name |
Definition at line 94 of file game_config.cpp.
Referenced by add_color_info(), and mp::get_colour_string().
std::map< std::string, color_range > game_config::team_rgb_range |
Definition at line 93 of file game_config.cpp.
Referenced by add_color_info(), color_info(), team::get_side_color_range(), events::menu_handler::label_terrain(), and team::team_info::team_info().
std::string game_config::terrain_mask_image = "terrain/alphamask.png" |
Definition at line 59 of file game_config.cpp.
Referenced by image::get_hexed(), load_config(), and image::locator::load_image_sub_file().
Referenced by mp::connect::load_game().
int game_config::title_buttons_x = 0 |
int game_config::title_buttons_y = 0 |
int game_config::title_logo_x = 0 |
int game_config::title_logo_y = 0 |
std::string game_config::title_music |
int game_config::title_tip_padding = 0 |
Definition at line 57 of file game_config.cpp.
Referenced by draw_tip_of_day(), load_config(), and gui::show_title().
int game_config::title_tip_width = 0 |
int game_config::title_tip_x = 0 |
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 |
Definition at line 47 of file game_config.cpp.
Referenced by server::load_config(), mp::connect::load_game(), main(), open_connection(), play_game(), server::process_login(), and write_game().
int game_config::village_income = 1 |
Definition at line 39 of file game_config.cpp.
Referenced by load_config(), playsingle_controller::play_scenario(), and team::team_info::team_info().
std::string game_config::wml_menu_image = "buttons/WML-custom.png" |
double game_config::xp_bar_scaling = 0.5 |
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 |