本文整理汇总了C++中saved_game::get_replay方法的典型用法代码示例。如果您正苦于以下问题:C++ saved_game::get_replay方法的具体用法?C++ saved_game::get_replay怎么用?C++ saved_game::get_replay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类saved_game
的用法示例。
在下文中一共展示了saved_game::get_replay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: observer
play_controller::play_controller(const config& level, saved_game& state_of_game,
const config& game_config, const ter_data_cache& tdata,
CVideo& video, bool skip_replay)
: controller_base(game_config, video)
, observer()
, quit_confirmation()
, ticks_(SDL_GetTicks())
, tdata_(tdata)
, gamestate_()
, level_()
, saved_game_(state_of_game)
, tooltips_manager_()
, whiteboard_manager_()
, plugins_context_()
, labels_manager_()
, help_manager_(&game_config)
, mouse_handler_(nullptr, *this)
, menu_handler_(nullptr, *this, game_config)
, hotkey_handler_(new hotkey_handler(*this, saved_game_))
, soundsources_manager_()
, persist_()
, gui_()
, xp_mod_(new unit_experience_accelerator(level["experience_modifier"].to_int(100)))
, statistics_context_(new statistics::scenario_context(level["name"]))
, replay_(new replay(state_of_game.get_replay()))
, skip_replay_(skip_replay)
, linger_(false)
, init_side_done_now_(false)
, victory_when_enemies_defeated_(level["victory_when_enemies_defeated"].to_bool(true))
, remove_from_carryover_on_defeat_(level["remove_from_carryover_on_defeat"].to_bool(true))
, victory_music_()
, defeat_music_()
, scope_()
, ignore_replay_errors_(false)
, player_type_changed_(false)
{
copy_persistent(level, level_);
resources::controller = this;
resources::persist = &persist_;
resources::recorder = replay_.get();
resources::classification = &saved_game_.classification();
resources::mp_settings = &saved_game_.mp_settings();
persist_.start_transaction();
// Setup victory and defeat music
set_victory_music_list(level_["victory_music"]);
set_defeat_music_list(level_["defeat_music"]);
game_config::add_color_info(level);
hotkey::deactivate_all_scopes();
hotkey::set_scope_active(hotkey::SCOPE_GAME);
try {
init(video, level);
} catch (...) {
clear_resources();
throw;
}
}