Replay control code. More...
#include "global.hpp"
#include "replay.hpp"
#include "actions/undo.hpp"
#include "config_assign.hpp"
#include "dialogs.hpp"
#include "display_chat_manager.hpp"
#include "floating_label.hpp"
#include "game_display.hpp"
#include "game_preferences.hpp"
#include "game_data.hpp"
#include "log.hpp"
#include "map/label.hpp"
#include "map/location.hpp"
#include "play_controller.hpp"
#include "synced_context.hpp"
#include "resources.hpp"
#include "statistics.hpp"
#include "units/unit.hpp"
#include "whiteboard/manager.hpp"
#include "replay_recorder_base.hpp"
#include <boost/lexical_cast.hpp>
#include <set>
#include <map>
Go to the source code of this file.
Macros | |
#define | DBG_REPLAY LOG_STREAM(debug, log_replay) |
#define | LOG_REPLAY LOG_STREAM(info, log_replay) |
#define | WRN_REPLAY LOG_STREAM(warn, log_replay) |
#define | ERR_REPLAY LOG_STREAM(err, log_replay) |
#define | DBG_RND LOG_STREAM(debug, log_random) |
#define | LOG_RND LOG_STREAM(info, log_random) |
#define | WRN_RND LOG_STREAM(warn, log_random) |
#define | ERR_RND LOG_STREAM(err, log_random) |
Functions | |
static void | verify (const unit_map &units, const config &cfg) |
static time_t | get_time (const config &speak) |
static bool | fix_rename_command (const config &c, config &async_child) |
fixes a rename command when undoing a earlier command. More... | |
static void | show_oos_error_error_function (const std::string &message, bool) |
REPLAY_RETURN | do_replay (bool one_move) |
REPLAY_RETURN | do_replay_handle (bool one_move) |
Variables | |
static lg::log_domain | log_replay ("replay") |
static lg::log_domain | log_random ("random") |
static std::vector< chat_msg > | message_log |
Replay control code.
See http://www.wesnoth.org/wiki/ReplayWML for more info.
Definition in file replay.cpp.
#define DBG_REPLAY LOG_STREAM(debug, log_replay) |
Definition at line 49 of file replay.cpp.
Referenced by do_replay_handle().
#define DBG_RND LOG_STREAM(debug, log_random) |
Definition at line 55 of file replay.cpp.
#define ERR_REPLAY LOG_STREAM(err, log_replay) |
Definition at line 52 of file replay.cpp.
Referenced by do_replay_handle(), fix_rename_command(), replay::get_last_real_command(), replay::process_error(), and replay::undo_cut().
#define ERR_RND LOG_STREAM(err, log_random) |
Definition at line 58 of file replay.cpp.
#define LOG_REPLAY LOG_STREAM(info, log_replay) |
Definition at line 50 of file replay.cpp.
Referenced by replay::add_synced_command(), chat_msg::chat_msg(), do_replay_handle(), replay::get_next_action(), and verify().
#define LOG_RND LOG_STREAM(info, log_random) |
Definition at line 56 of file replay.cpp.
#define WRN_REPLAY LOG_STREAM(warn, log_replay) |
Definition at line 51 of file replay.cpp.
Referenced by do_replay_handle(), and fix_rename_command().
#define WRN_RND LOG_STREAM(warn, log_random) |
Definition at line 57 of file replay.cpp.
REPLAY_RETURN do_replay | ( | bool | one_move | ) |
Definition at line 659 of file replay.cpp.
References resources::controller, do_replay_handle(), log_scope, display::recalculate_minimap(), and resources::screen.
Referenced by turn_info::handle_turn(), replay_controller::play_side_impl(), playmp_controller::process_network_data(), and turn_info::sync_network().
REPLAY_RETURN do_replay_handle | ( | bool | one_move | ) |
Definition at line 677 of file replay.cpp.
References display_chat_manager::add_chat_message(), config::all_children_count(), config::all_children_range(), config::child(), map_labels::clear(), terrain_label::color(), resources::controller, terrain_label::creator(), play_controller::current_side(), DBG_REPLAY, config::debug(), play_controller::do_init_side(), ERR_REPLAY, unit_map::find(), game_display::get_chat_manager(), replay::get_next_action(), get_time(), config::has_child(), synced_context::is_synced(), display::labels(), terrain_label::location(), LOG_REPLAY, preferences::message_bell(), events::chat_handler::MESSAGE_PRIVATE, events::chat_handler::MESSAGE_PUBLIC, config::ordered_begin(), replay::process_error(), resources::recorder, REPLAY_FOUND_DEPENDENT, REPLAY_FOUND_END_LEVEL, REPLAY_FOUND_END_MOVE, REPLAY_FOUND_END_TURN, REPLAY_FOUND_INIT_TURN, REPLAY_RETURN_AT_END, replay::revert_action(), synced_context::run(), resources::screen, map_labels::set_label(), show_oos_error_error_function(), terrain_label::team_name(), resources::teams, terrain_label::text(), resources::units, unit_map::iterator_base< iter_types >::valid(), verify(), and WRN_REPLAY.
Referenced by synced_context::ask_server_choice(), do_replay(), user_choice_manager::pull(), user_choice_manager::search_in_replay(), and user_choice_manager::user_choice_manager().
fixes a rename command when undoing a earlier command.
Definition at line 441 of file replay.cpp.
References config::child(), ERR_REPLAY, read_locations(), map_location::write(), and WRN_REPLAY.
Referenced by replay::undo_cut().
|
static |
Definition at line 130 of file replay.cpp.
Referenced by chat_msg::chat_msg(), and do_replay_handle().
|
static |
Definition at line 654 of file replay.cpp.
References replay::process_error().
Referenced by do_replay_handle().
Definition at line 63 of file replay.cpp.
References unit_map::begin(), config::child_range(), unit_map::count(), unit_map::end(), unit_map::find(), LOG_REPLAY, replay::process_error(), and unit_map::size().
Referenced by do_replay_handle().
|
static |
|
static |
|
static |
Definition at line 370 of file replay.cpp.
Referenced by replay::build_chat_log().