The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
campaign_controller Class Reference

#include <playcampaign.hpp>

Public Member Functions

 campaign_controller (CVideo &video, saved_game &state, const config &game_config, const ter_data_cache &tdata, bool is_unit_test=false)
 
LEVEL_RESULT play_game ()
 
LEVEL_RESULT play_replay ()
 
void set_mp_info (mp_campaign_info *mp_info)
 

Private Member Functions

LEVEL_RESULT playsingle_scenario (end_level_data &end_level)
 
LEVEL_RESULT playmp_scenario (end_level_data &end_level)
 
void show_carryover_message (playsingle_controller &playcontroller, const end_level_data &end_level, LEVEL_RESULT res)
 

Static Private Member Functions

static void report_victory (std::ostringstream &report, team &t, int finishing_bonus_per_turn, int turns_left, int finishing_bonus)
 

Private Attributes

CVideovideo_
 
saved_gamestate_
 
const configgame_config_
 
const ter_data_cachetdata_
 
const bool is_unit_test_
 
bool is_replay_
 
mp_campaign_infomp_info_
 

Detailed Description

Definition at line 58 of file playcampaign.hpp.

Constructor & Destructor Documentation

campaign_controller::campaign_controller ( CVideo video,
saved_game state,
const config game_config,
const ter_data_cache tdata,
bool  is_unit_test = false 
)
inline

Definition at line 68 of file playcampaign.hpp.

Member Function Documentation

LEVEL_RESULT campaign_controller::play_game ( )

Definition at line 250 of file playcampaign.cpp.

References _(), gui2::window::CANCEL, saved_game::classification(), savegame::clean_saves(), mp_campaign_info::connection, saved_game::convert_to_start_save(), game_config::debug, preferences::delete_saves(), e, sound::empty_playlist(), saved_game::expand_carryover(), saved_game::expand_mp_events(), saved_game::expand_mp_options(), saved_game::expand_random_scenario(), saved_game::expand_scenario(), game_config_, saved_game::get_replay(), saved_game::get_scenario_id(), saved_game::get_starting_pos(), mp::goto_mp_connect(), mp::goto_mp_wait(), utils::interpolate_variables_into_string(), mp_campaign_info::is_host, game_classification::is_normal_mp_game(), is_replay_, is_unit_test_, game_classification::label, LOG_NG, game::error::message, mp_info_, saved_game::mp_settings(), mp_game_settings::num_turns, playmp_scenario(), playsingle_scenario(), end_level_data::prescenario_save, end_level_data::proceed_to_next_level, end_level_data::replay_save, save(), preferences::save_compression_format(), savegame::savegame::save_game_automatic(), preferences::save_replays(), mp_game_settings::saved_game, ng::depcheck::SCENARIO, replay_recorder_base::set_pos(), replay_recorder_base::set_to_end(), wml_exception::show(), gui2::show_error_message(), gui2::show_message(), state_, saved_game::update_label(), mp_game_settings::use_map_settings, saved_game::valid(), video_, and gui2::dialogs::message::yes_no_buttons.

Referenced by game_launcher::launch_game(), play_replay(), game_launcher::play_test(), mp::start_local_game_commandline(), and game_launcher::unit_test().

LEVEL_RESULT campaign_controller::play_replay ( )
inline

Definition at line 79 of file playcampaign.hpp.

References play_game().

Referenced by game_launcher::play_replay(), and game_launcher::unit_test().

LEVEL_RESULT campaign_controller::playmp_scenario ( end_level_data end_level)
private
LEVEL_RESULT campaign_controller::playsingle_scenario ( end_level_data end_level)
private
void campaign_controller::report_victory ( std::ostringstream &  report,
team t,
int  finishing_bonus_per_turn,
int  turns_left,
int  finishing_bonus 
)
staticprivate
void campaign_controller::set_mp_info ( mp_campaign_info mp_info)
inline

Definition at line 84 of file playcampaign.hpp.

void campaign_controller::show_carryover_message ( playsingle_controller playcontroller,
const end_level_data end_level,
LEVEL_RESULT  res 
)
private

Member Data Documentation

const config& campaign_controller::game_config_
private

Definition at line 62 of file playcampaign.hpp.

Referenced by play_game(), playmp_scenario(), and playsingle_scenario().

bool campaign_controller::is_replay_
private

Definition at line 65 of file playcampaign.hpp.

Referenced by play_game(), and playsingle_scenario().

const bool campaign_controller::is_unit_test_
private

Definition at line 64 of file playcampaign.hpp.

Referenced by play_game(), and playsingle_scenario().

mp_campaign_info* campaign_controller::mp_info_
private

Definition at line 66 of file playcampaign.hpp.

Referenced by play_game(), and playmp_scenario().

saved_game& campaign_controller::state_
private
const ter_data_cache& campaign_controller::tdata_
private

Definition at line 63 of file playcampaign.hpp.

Referenced by playmp_scenario(), and playsingle_scenario().

CVideo& campaign_controller::video_
private

The documentation for this class was generated from the following files: