The Battle for Wesnoth  1.15.1+dev
Namespaces | Macros | Typedefs | Functions | Variables
game.cpp File Reference
#include "game_board.hpp"
#include "game_display.hpp"
#include "preferences/game.hpp"
#include "gettext.hpp"
#include "lexical_cast.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode_cast.hpp"
#include "map_settings.hpp"
#include "units/unit.hpp"
#include "units/map.hpp"
#include "wml_exception.hpp"
#include <cassert>
Include dependency graph for game.cpp:

Go to the source code of this file.

Namespaces

 preferences
 Modify, read and display user preferences.
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-lib"
 
#define ERR_CFG   LOG_STREAM(err , log_config)
 

Typedefs

using acquaintances_map = std::map< std::string, preferences::acquaintance >
 

Functions

bool preferences::is_authenticated ()
 
void preferences::parse_admin_authentication (const std::string &sender, const std::string &message)
 
static void preferences::load_acquaintances ()
 
static void preferences::save_acquaintances ()
 
const std::map< std::string, acquaintance > & preferences::get_acquaintances ()
 
const std::string preferences::get_ignored_delim ()
 
std::map< std::string, std::string > preferences::get_acquaintances_nice (const std::string &filter)
 
std::pair< preferences::acquaintance *, bool > preferences::add_acquaintance (const std::string &nick, const std::string &mode, const std::string &notes)
 
bool preferences::remove_acquaintance (const std::string &nick)
 
bool preferences::is_friend (const std::string &nick)
 
bool preferences::is_ignored (const std::string &nick)
 
void preferences::add_completed_campaign (const std::string &campaign_id, const std::string &difficulty_level)
 
bool preferences::is_campaign_completed (const std::string &campaign_id)
 
bool preferences::is_campaign_completed (const std::string &campaign_id, const std::string &difficulty_level)
 
bool preferences::parse_should_show_lobby_join (const std::string &sender, const std::string &message)
 
int preferences::lobby_joins ()
 
void preferences::_set_lobby_joins (int show)
 
const std::vector< game_config::server_info > & preferences::server_list ()
 
std::string preferences::network_host ()
 
void preferences::set_network_host (const std::string &host)
 
std::string preferences::campaign_server ()
 
void preferences::set_campaign_server (const std::string &host)
 
bool preferences::turn_dialog ()
 
void preferences::set_turn_dialog (bool ison)
 
bool preferences::enable_whiteboard_mode_on_start ()
 
void preferences::set_enable_whiteboard_mode_on_start (bool value)
 
bool preferences::hide_whiteboard ()
 
void preferences::set_hide_whiteboard (bool value)
 
bool preferences::show_combat ()
 
bool preferences::allow_observers ()
 
void preferences::set_allow_observers (bool value)
 
bool preferences::registered_users_only ()
 
void preferences::set_registered_users_only (bool value)
 
bool preferences::shuffle_sides ()
 
void preferences::set_shuffle_sides (bool value)
 
std::string preferences::random_faction_mode ()
 
void preferences::set_random_faction_mode (const std::string &value)
 
bool preferences::use_map_settings ()
 
void preferences::set_use_map_settings (bool value)
 
int preferences::mp_server_warning_disabled ()
 
void preferences::set_mp_server_warning_disabled (int value)
 
void preferences::set_mp_server_program_name (const std::string &path)
 
std::string preferences::get_mp_server_program_name ()
 
bool preferences::random_start_time ()
 
void preferences::set_random_start_time (bool value)
 
bool preferences::fog ()
 
void preferences::set_fog (bool value)
 
bool preferences::shroud ()
 
void preferences::set_shroud (bool value)
 
int preferences::turns ()
 
void preferences::set_turns (int value)
 
const configpreferences::options ()
 
void preferences::set_options (const config &values)
 
bool preferences::skip_mp_replay ()
 
void preferences::set_skip_mp_replay (bool value)
 
bool preferences::blindfold_replay ()
 
void preferences::set_blindfold_replay (bool value)
 
bool preferences::countdown ()
 
void preferences::set_countdown (bool value)
 
int preferences::countdown_init_time ()
 
void preferences::set_countdown_init_time (int value)
 
int preferences::countdown_reservoir_time ()
 
void preferences::set_countdown_reservoir_time (int value)
 
int preferences::countdown_turn_bonus ()
 
void preferences::set_countdown_turn_bonus (int value)
 
int preferences::countdown_action_bonus ()
 
void preferences::set_countdown_action_bonus (int value)
 
int preferences::village_gold ()
 
void preferences::set_village_gold (int value)
 
int preferences::village_support ()
 
void preferences::set_village_support (int value)
 
int preferences::xp_modifier ()
 
void preferences::set_xp_modifier (int value)
 
std::string preferences::era ()
 
void preferences::set_era (const std::string &value)
 
std::string preferences::level ()
 
void preferences::set_level (const std::string &value)
 
int preferences::level_type ()
 
void preferences::set_level_type (int value)
 
const std::vector< std::string > & preferences::modifications (bool mp)
 
void preferences::set_modifications (const std::vector< std::string > &value, bool mp)
 
bool preferences::skip_ai_moves ()
 
void preferences::set_skip_ai_moves (bool value)
 
void preferences::set_show_side_colors (bool value)
 
bool preferences::show_side_colors ()
 
void preferences::set_save_replays (bool value)
 
bool preferences::save_replays ()
 
void preferences::set_delete_saves (bool value)
 
bool preferences::delete_saves ()
 
void preferences::set_ask_delete_saves (bool value)
 
bool preferences::ask_delete_saves ()
 
void preferences::set_interrupt_when_ally_sighted (bool value)
 
bool preferences::interrupt_when_ally_sighted ()
 
int preferences::autosavemax ()
 
void preferences::set_autosavemax (int value)
 
std::string preferences::theme ()
 
void preferences::set_theme (const std::string &theme)
 
bool preferences::show_floating_labels ()
 
void preferences::set_show_floating_labels (bool value)
 
bool preferences::message_private ()
 
void preferences::set_message_private (bool value)
 
bool preferences::show_haloes ()
 
void preferences::set_show_haloes (bool value)
 
compression::format preferences::save_compression_format ()
 
std::string preferences::get_chat_timestamp (const std::time_t &t)
 
bool preferences::chat_timestamping ()
 
void preferences::set_chat_timestamping (bool value)
 
int preferences::chat_lines ()
 
void preferences::set_chat_lines (int lines)
 
void preferences::set_chat_message_aging (const int aging)
 
int preferences::chat_message_aging ()
 
bool preferences::show_all_units_in_help ()
 
void preferences::set_show_all_units_in_help (bool value)
 
std::set< std::string > & preferences::encountered_units ()
 
std::set< t_translation::terrain_code > & preferences::encountered_terrains ()
 
std::string preferences::custom_command ()
 
void preferences::set_custom_command (const std::string &command)
 
std::vector< std::string > * preferences::get_history (const std::string &id)
 Returns a pointer to the history vector associated with given id making a new one if it doesn't exist. More...
 
bool preferences::green_confirm ()
 
bool preferences::yellow_confirm ()
 
bool preferences::confirm_no_moves ()
 
void preferences::encounter_recruitable_units (const std::vector< team > &teams)
 
void preferences::encounter_start_units (const unit_map &units)
 
static void preferences::encounter_recallable_units (const std::vector< team > &teams)
 
void preferences::encounter_map_terrain (const gamemap &map)
 
void preferences::encounter_all_content (const game_board &gameboard_)
 

Variables

static lg::log_domain log_config ("config")
 

Macro Definition Documentation

◆ ERR_CFG

#define ERR_CFG   LOG_STREAM(err , log_config)

Definition at line 34 of file game.cpp.

◆ GETTEXT_DOMAIN

#define GETTEXT_DOMAIN   "wesnoth-lib"

Definition at line 15 of file game.cpp.

Typedef Documentation

◆ acquaintances_map

using acquaintances_map = std::map<std::string, preferences::acquaintance>

Definition at line 36 of file game.cpp.

Variable Documentation

◆ log_config

lg::log_domain log_config("config")
static