The Battle for Wesnoth  1.19.7+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)
 
 ~campaign_controller ()
 
level_result::type play_game ()
 
level_result::type play_replay ()
 
void set_mp_info (mp_game_metadata *mp_info)
 

Private Member Functions

level_result::type playsingle_scenario (end_level_data &end_level)
 
level_result::type playmp_scenario (end_level_data &end_level)
 

Private Attributes

saved_gamestate_
 
const bool is_unit_test_
 
bool is_replay_
 
mp_game_metadatamp_info_
 

Detailed Description

Definition at line 48 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 51 of file playcampaign.hpp.

◆ ~campaign_controller()

campaign_controller::~campaign_controller ( )

Definition at line 295 of file playcampaign.cpp.

References prefs::get(), and gui2::switch_theme().

Member Function Documentation

◆ play_game()

level_result::type campaign_controller::play_game ( )

Definition at line 108 of file playcampaign.cpp.

References _(), prefs::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_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(), prefs::get(), 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, 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, savegame::savegame::save_game_automatic(), mp_game_settings::saved_game, replay_recorder_base::set_pos(), replay_recorder_base::set_to_end(), 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(), play_replay(), game_launcher::play_test(), and game_launcher::single_unit_test().

◆ play_replay()

level_result::type campaign_controller::play_replay ( )
inline

Definition at line 62 of file playcampaign.hpp.

References is_replay_, and play_game().

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

◆ playmp_scenario()

level_result::type campaign_controller::playmp_scenario ( end_level_data end_level)
private

◆ playsingle_scenario()

level_result::type 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 68 of file playcampaign.hpp.

References mp_info_.

Member Data Documentation

◆ is_replay_

bool campaign_controller::is_replay_
private

Definition at line 79 of file playcampaign.hpp.

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

◆ is_unit_test_

const bool campaign_controller::is_unit_test_
private

Definition at line 78 of file playcampaign.hpp.

Referenced by play_game(), and playsingle_scenario().

◆ mp_info_

mp_game_metadata* campaign_controller::mp_info_
private

Definition at line 80 of file playcampaign.hpp.

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

◆ state_

saved_game& campaign_controller::state_
private

Definition at line 77 of file playcampaign.hpp.

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


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