The Battle for Wesnoth  1.15.12+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
campaign_controller Class Reference

#include <playcampaign.hpp>

Public Member Functions

 campaign_controller (saved_game &state, bool is_unit_test=false)
 
LEVEL_RESULT play_game ()
 
LEVEL_RESULT play_replay ()
 
void set_mp_info (mp_game_metadata *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)
 

Private Attributes

saved_gamestate_
 
const bool is_unit_test_
 
bool is_replay_
 
mp_game_metadatamp_info_
 

Detailed Description

Definition at line 53 of file playcampaign.hpp.

Constructor & Destructor Documentation

◆ campaign_controller()

campaign_controller::campaign_controller ( saved_game state,
bool  is_unit_test = false 
)
inline

Definition at line 56 of file playcampaign.hpp.

Member Function Documentation

◆ play_game()

LEVEL_RESULT campaign_controller::play_game ( )

Definition at line 248 of file playcampaign.cpp.

References _(), preferences::add_completed_campaign(), mp_game_settings::addons, game_classification::campaign, ng::connect_engine::can_start_game(), gui2::CANCEL, saved_game::classification(), savegame::clean_saves(), saved_game::convert_to_start_save(), game_config::debug, preferences::delete_saves(), game_classification::difficulty, e, sound::empty_playlist(), game_classification::end_credits, saved_game::expand_carryover(), saved_game::expand_mp_events(), saved_game::expand_mp_options(), saved_game::expand_random_scenario(), saved_game::expand_scenario(), saved_game::get_replay(), saved_game::get_scenario_id(), saved_game::get_starting_point(), mp::goto_mp_staging(), mp::goto_mp_wait(), utils::interpolate_variables_into_string(), mp_game_metadata::is_host, game_classification::is_multiplayer(), game_classification::is_normal_mp_game(), is_replay_, game_classification::is_scenario(), 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(), replay_recorder_base::set_pos(), replay_recorder_base::set_to_end(), wml_exception::show(), gui2::show_error_message(), gui2::show_message(), ng::connect_engine::start_game(), state_, saved_game::update_label(), mp_game_settings::use_map_settings, saved_game::valid(), and gui2::dialogs::message::yes_no_buttons.

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

◆ play_replay()

LEVEL_RESULT campaign_controller::play_replay ( )
inline

Definition at line 65 of file playcampaign.hpp.

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

◆ playmp_scenario()

LEVEL_RESULT campaign_controller::playmp_scenario ( end_level_data end_level)
private

◆ playsingle_scenario()

LEVEL_RESULT campaign_controller::playsingle_scenario ( end_level_data end_level)
private

◆ set_mp_info()

void campaign_controller::set_mp_info ( mp_game_metadata mp_info)
inline

Definition at line 71 of file playcampaign.hpp.

◆ show_carryover_message()

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

Member Data Documentation

◆ is_replay_

bool campaign_controller::is_replay_
private

Definition at line 85 of file playcampaign.hpp.

Referenced by play_game(), and playsingle_scenario().

◆ is_unit_test_

const bool campaign_controller::is_unit_test_
private

Definition at line 84 of file playcampaign.hpp.

Referenced by play_game(), and playsingle_scenario().

◆ mp_info_

mp_game_metadata* campaign_controller::mp_info_
private

Definition at line 86 of file playcampaign.hpp.

Referenced by play_game(), and playmp_scenario().

◆ state_

saved_game& campaign_controller::state_
private

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