The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Macros | Functions | Variables
game_config.cpp File Reference
#include "global.hpp"
#include "game_config.hpp"
#include "color_range.hpp"
#include "config.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "util.hpp"
#include "version.hpp"
#include "wesconfig.h"
#include "serialization/string_utils.hpp"
Include dependency graph for game_config.cpp:

Go to the source code of this file.

Namespaces

 game_config
 Game configuration data as global variables.
 
 game_config::colors
 
 game_config::images
 
 game_config::sounds
 
 game_config::sounds::status
 

Macros

#define DBG_NG   LOG_STREAM(debug, log_engine)
 
#define LOG_NG   LOG_STREAM(info, log_engine)
 
#define ERR_NG   LOG_STREAM(err, log_engine)
 

Functions

void game_config::load_config (const config &v)
 
void game_config::add_color_info (const config &v)
 
const color_rangegame_config::color_info (const std::string &name)
 
const std::vector< Uint32 > & game_config::tc_info (const std::string &name)
 
Uint32 game_config::red_to_green (int val, bool for_text=true)
 Return a color corresponding to the value val red for val=0 to green for val=100, passing by yellow. More...
 
Uint32 game_config::blue_to_white (int val, bool for_text)
 
std::string game_config::get_default_title_string ()
 

Variables

static lg::log_domain log_engine ("engine")
 
int game_config::base_income = 2
 
int game_config::village_income = 1
 
int game_config::village_support = 1
 
int game_config::poison_amount = 8
 
int game_config::rest_heal_amount = 2
 
int game_config::recall_cost = 20
 
int game_config::kill_experience = 8
 
int game_config::tile_size = 72
 
unsigned game_config::lobby_network_timer = 100
 
unsigned game_config::lobby_refresh = 4000
 
const int game_config::gold_carryover_percentage = 80
 Default percentage gold carried over to the next scenario. More...
 
const std::string game_config::version = VERSION
 
std::string game_config::default_terrain
 
const std::string game_config::revision = VERSION
 
std::string game_config::wesnoth_program_dir
 
bool game_config::debug = false
 
bool game_config::debug_lua = false
 
bool game_config::editor = false
 
bool game_config::ignore_replay_errors = false
 
bool game_config::mp_debug = false
 
bool game_config::exit_at_end = false
 
bool game_config::no_delay = false
 
bool game_config::disable_autosave = false
 
bool game_config::no_addons = false
 
int game_config::cache_compression_level = 6
 
std::string game_config::title_music
 
std::string game_config::lobby_music
 
std::string game_config::default_victory_music
 
std::string game_config::default_defeat_music
 
std::string game_config::colors::moved_orb_color
 
std::string game_config::colors::unmoved_orb_color
 
std::string game_config::colors::partial_orb_color
 
std::string game_config::colors::enemy_orb_color
 
std::string game_config::colors::ally_orb_color
 
bool game_config::show_ally_orb
 
bool game_config::show_enemy_orb
 
bool game_config::show_moved_orb
 
bool game_config::show_partial_orb
 
bool game_config::show_unmoved_orb
 
std::string game_config::images::game_title
 
std::string game_config::images::game_title_background
 
std::string game_config::images::orb
 
std::string game_config::images::energy
 
std::string game_config::images::flag
 
std::string game_config::images::flag_icon
 
std::string game_config::images::terrain_mask
 
std::string game_config::images::grid_top
 
std::string game_config::images::grid_bottom
 
std::string game_config::images::mouseover
 
std::string game_config::images::selected
 
std::string game_config::images::editor_brush
 
std::string game_config::images::unreachable
 
std::string game_config::images::linger
 
std::string game_config::images::observer
 
std::string game_config::images::tod_bright
 
std::string game_config::images::tod_dark
 
std::string game_config::images::selected_menu = "buttons/radiobox-pressed.png"
 
std::string game_config::images::deselected_menu = "buttons/radiobox.png"
 
std::string game_config::images::checked_menu = "buttons/checkbox-pressed.png"
 
std::string game_config::images::unchecked_menu = "buttons/checkbox.png"
 
std::string game_config::images::wml_menu = "buttons/WML-custom.png"
 
std::string game_config::images::level
 
std::string game_config::images::ellipsis
 
std::string game_config::images::missing
 
std::string game_config::images::app_icon = "images/icons/icon-game.png"
 
std::string game_config::shroud_prefix
 
std::string game_config::fog_prefix
 
std::string game_config::flag_rgb
 
std::vector< Uint32 > game_config::red_green_scale
 
std::vector< Uint32 > game_config::red_green_scale_text
 
static std::vector< Uint32 > game_config::blue_white_scale
 
static std::vector< Uint32 > game_config::blue_white_scale_text
 
double game_config::hp_bar_scaling = 0.666
 
double game_config::xp_bar_scaling = 0.5
 
double game_config::hex_brightening = 1.25
 
std::vector< std::stringgame_config::foot_speed_prefix
 
std::string game_config::foot_teleport_enter
 
std::string game_config::foot_teleport_exit
 
std::map< std::string,
color_range
game_config::team_rgb_range
 
std::map< std::string, t_stringgame_config::team_rgb_name
 
std::map< std::string,
std::vector< Uint32 > > 
game_config::team_rgb_colors
 
const version_info game_config::wesnoth_version (VERSION)
 
const version_info game_config::min_savegame_version (MIN_SAVEGAME_VERSION)
 
const version_info game_config::test_version ("test")
 
const std::string game_config::observer_team_name = "observer"
 observer team name used for observer team chat More...
 
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. More...
 
std::string game_config::sounds::turn_bell = "bell.wav"
 
std::string game_config::sounds::timer_bell = "timer.wav"
 
std::string game_config::sounds::public_message = "chat-[1~3].ogg"
 
std::string game_config::sounds::private_message = "chat-highlight.ogg"
 
std::string game_config::sounds::friend_message = "chat-friend.ogg"
 
std::string game_config::sounds::server_message = "receive.wav"
 
std::string game_config::sounds::player_joins = "arrive.wav"
 
std::string game_config::sounds::player_leaves = "leave.wav"
 
std::string game_config::sounds::game_user_arrive = "join.wav"
 
std::string game_config::sounds::game_user_leave = "leave.wav"
 
std::string game_config::sounds::ready_for_start = "bell.wav"
 
std::string game_config::sounds::game_has_begun = "gamestart.ogg"
 
const std::string game_config::sounds::button_press = "button.wav"
 
const std::string game_config::sounds::checkbox_release = "checkbox.wav"
 
const std::string game_config::sounds::slider_adjust = "slider.wav"
 
const std::string game_config::sounds::menu_expand = "expand.wav"
 
const std::string game_config::sounds::menu_contract = "contract.wav"
 
const std::string game_config::sounds::menu_select = "select.wav"
 
std::string game_config::sounds::status::poisoned = "poison.ogg"
 
std::string game_config::sounds::status::slowed = "slowed.wav"
 
std::string game_config::sounds::status::petrified = "petrified.ogg"
 
std::string game_config::path = ""
 
std::string game_config::default_preferences_path = ""
 
std::vector< server_info > game_config::server_list
 

Macro Definition Documentation

#define DBG_NG   LOG_STREAM(debug, log_engine)

Definition at line 31 of file game_config.cpp.

#define ERR_NG   LOG_STREAM(err, log_engine)
#define LOG_NG   LOG_STREAM(info, log_engine)

Definition at line 32 of file game_config.cpp.

Referenced by game_config::add_color_info().

Variable Documentation

lg::log_domain log_engine("engine")
static