The Battle for Wesnoth  1.15.1+dev
Namespaces | Macros | Functions | Variables
game_config.cpp File Reference
#include "game_config.hpp"
#include "color_range.hpp"
#include "config.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "utils/general.hpp"
#include "utils/math.hpp"
#include "game_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 LOG_NG   LOG_STREAM(info, log_engine)
 
#define ERR_NG   LOG_STREAM(err, log_engine)
 

Functions

void game_config::set_debug (bool new_debug)
 
static void game_config::add_color_info (const config &v, bool build_defaults)
 
void game_config::add_color_info (const config &v)
 
void game_config::load_config (const config &v)
 
void game_config::reset_color_info ()
 
const color_rangegame_config::color_info (const std::string &name)
 
const std::vector< color_t > & game_config::tc_info (const std::string &name)
 
color_t 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...
 
color_t 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")
 
std::string game_config::path = ""
 
std::string game_config::default_preferences_path = ""
 
std::string game_config::wesnoth_program_dir
 
int game_config::base_income = 2
 
int game_config::village_income = 1
 
int game_config::village_support = 1
 
int game_config::recall_cost = 20
 
int game_config::kill_experience = 8
 
int game_config::combat_experience = 1
 
int game_config::poison_amount = 8
 
int game_config::rest_heal_amount = 2
 
const int game_config::gold_carryover_percentage = 80
 Default percentage gold carried over to the next scenario. More...
 
unsigned int game_config::tile_size = 72
 
std::string game_config::default_terrain
 
std::string game_config::shroud_prefix
 
std::string game_config::fog_prefix
 
std::vector< unsigned int > game_config::zoom_levels {36, 72, 144}
 
double game_config::hp_bar_scaling = 0.666
 
double game_config::xp_bar_scaling = 0.5
 
double game_config::hex_brightening = 1.25
 
int game_config::cache_compression_level = 6
 
unsigned game_config::lobby_network_timer = 100
 
unsigned game_config::lobby_refresh = 4000
 
const std::string game_config::observer_team_name = "observer"
 observer team name used for observer team chat More...
 
const std::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::vector< server_info > game_config::server_list
 
bool game_config::debug_impl = 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
 
const bool & game_config::debug = debug_impl
 
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::title_music
 
std::string game_config::lobby_music
 
std::vector< std::string > game_config::default_defeat_music
 
std::vector< std::string > game_config::default_victory_music
 
std::string game_config::flag_rgb
 
std::string game_config::unit_rgb
 
std::vector< color_tgame_config::red_green_scale
 
std::vector< color_tgame_config::red_green_scale_text
 
static std::vector< color_tgame_config::blue_white_scale
 
static std::vector< color_tgame_config::blue_white_scale_text
 
std::map< std::string, color_rangegame_config::team_rgb_range
 
std::map< std::string, t_stringgame_config::team_rgb_name
 
std::map< std::string, std::vector< color_t > > game_config::team_rgb_colors
 
std::vector< std::string > game_config::default_colors
 
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
 
std::string game_config::colors::default_color_list
 
std::vector< std::string > game_config::foot_speed_prefix
 
std::string game_config::foot_teleport_enter
 
std::string game_config::foot_teleport_exit
 
std::string game_config::images::game_title
 
std::string game_config::images::game_title_background
 
std::string game_config::images::game_logo
 
std::string game_config::images::game_logo_background
 
std::string game_config::images::victory_laurel
 
std::string game_config::images::victory_laurel_hardest
 
std::string game_config::images::victory_laurel_easy
 
std::string game_config::images::orb
 
std::string game_config::images::energy
 
std::string game_config::images::battery_icon
 
std::string game_config::images::time_icon
 
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::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"
 

Macro Definition Documentation

◆ ERR_NG

#define ERR_NG   LOG_STREAM(err, log_engine)

◆ LOG_NG

#define LOG_NG   LOG_STREAM(info, log_engine)

Definition at line 28 of file game_config.cpp.

Referenced by game_config::add_color_info().

Variable Documentation

◆ log_engine

lg::log_domain log_engine("engine")
static