#include <playcampaign.hpp>
Public Member Functions | |
campaign_controller (CVideo &video, saved_game &state, const config &game_config, const tdata_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 | |
CVideo & | video_ |
saved_game & | state_ |
const config & | game_config_ |
const tdata_cache & | tdata_ |
const bool | is_unit_test_ |
bool | is_replay_ |
mp_campaign_info * | mp_info_ |
Definition at line 57 of file playcampaign.hpp.
|
inline |
Definition at line 67 of file playcampaign.hpp.
LEVEL_RESULT campaign_controller::play_game | ( | ) |
Definition at line 252 of file playcampaign.cpp.
References _(), gui2::twindow::CANCEL, saved_game::classification(), savegame::clean_saves(), 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::name, mp_game_settings::num_turns, playmp_scenario(), playsingle_scenario(), end_level_data::prescenario_save, end_level_data::proceed_to_next_level, storyscreen::QUIT, mp::ui::QUIT, 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(), twml_exception::show(), gui2::show_error_message(), gui2::show_message(), state_, saved_game::update_label(), mp_game_settings::use_map_settings, saved_game::valid(), video_, mp_campaign_info::wesnothd_connection, and gui2::tmessage::yes_no_buttons.
Referenced by enter_connect_mode(), enter_wait_mode(), game_launcher::launch_game(), play_replay(), game_launcher::play_test(), mp::start_local_game_commandline(), and game_launcher::unit_test().
|
inline |
Definition at line 78 of file playcampaign.hpp.
References play_game().
Referenced by game_launcher::play_replay(), and game_launcher::unit_test().
|
private |
Definition at line 222 of file playcampaign.cpp.
References mp_campaign_info::connected_players, game_config_, saved_game::get_starting_pos(), mp_info_, playsingle_controller::play_scenario(), storyscreen::QUIT, show_carryover_message(), state_, tdata_, and video_.
Referenced by play_game().
|
private |
Definition at line 189 of file playcampaign.cpp.
References game_config_, saved_game::get_replay_starting_pos(), saved_game::get_starting_pos(), is_replay_, is_unit_test_, LOG_NG, storyscreen::QUIT, saved_game::set_snapshot(), show_carryover_message(), state_, tdata_, and video_.
Referenced by play_game().
|
staticprivate |
Definition at line 60 of file playcampaign.cpp.
References _(), team::carryover_add(), team::carryover_bonus(), team::carryover_gold(), team::carryover_percentage(), team::gold(), utils::half_signed_value(), and vngettext().
Referenced by show_carryover_message().
|
inline |
Definition at line 83 of file playcampaign.hpp.
Referenced by enter_connect_mode(), and enter_wait_mode().
|
private |
Definition at line 122 of file playcampaign.cpp.
References _(), transient_end_level::carryover_report, saved_game::classification(), div100rounded(), resources::gamedata, play_controller::get_map_const(), play_controller::get_tod_manager_const(), play_controller::is_observer(), game_data::next_scenario(), tod_manager::number_of_turns(), end_level_data::proceed_to_next_level, report(), report_victory(), gui2::show_transient_message(), state_, resources::teams, teams, end_level_data::transient, tod_manager::turn(), turns_left, video_, and gamemap::villages().
Referenced by playmp_scenario(), and playsingle_scenario().
|
private |
Definition at line 61 of file playcampaign.hpp.
Referenced by play_game(), playmp_scenario(), and playsingle_scenario().
|
private |
Definition at line 64 of file playcampaign.hpp.
Referenced by play_game(), and playsingle_scenario().
|
private |
Definition at line 63 of file playcampaign.hpp.
Referenced by play_game(), and playsingle_scenario().
|
private |
Definition at line 65 of file playcampaign.hpp.
Referenced by play_game(), and playmp_scenario().
|
private |
Definition at line 60 of file playcampaign.hpp.
Referenced by play_game(), playmp_scenario(), playsingle_scenario(), and show_carryover_message().
|
private |
Definition at line 62 of file playcampaign.hpp.
Referenced by playmp_scenario(), and playsingle_scenario().
|
private |
Definition at line 59 of file playcampaign.hpp.
Referenced by play_game(), playmp_scenario(), playsingle_scenario(), and show_carryover_message().