replay.cpp File Reference

Replay control code. More...

#include "global.hpp"
#include "actions.hpp"
#include "ai_interface.hpp"
#include "dialogs.hpp"
#include "game_display.hpp"
#include "game_preferences.hpp"
#include "filesystem.hpp"
#include "game_config.hpp"
#include "game_events.hpp"
#include "log.hpp"
#include "map_label.hpp"
#include "menu_events.hpp"
#include "pathfind.hpp"
#include "replay.hpp"
#include "show_dialog.hpp"
#include "sound.hpp"
#include "statistics.hpp"
#include "unit_display.hpp"
#include "util.hpp"
#include "wesconfig.h"
#include "serialization/binary_or_text.hpp"
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <set>
#include <sstream>

Include dependency graph for replay.cpp:

Go to the source code of this file.

Defines

#define DBG_REPLAY   LOG_STREAM(debug, replay)
#define LOG_REPLAY   LOG_STREAM(info, replay)
#define WRN_REPLAY   LOG_STREAM(warn, replay)
#define ERR_REPLAY   LOG_STREAM(err, replay)

Functions

static void verify (const unit_map &units, const config &cfg)
static void verify_units (const config &cfg)
replayget_replay_source ()
static void check_checksums (game_display &disp, const unit_map &units, const config &cfg)
bool do_replay (game_display &disp, const gamemap &map, unit_map &units, std::vector< team > &teams, int team_num, const gamestatus &state, game_state &state_of_game, replay *obj)
bool do_replay_handle (game_display &disp, const gamemap &map, unit_map &units, std::vector< team > &teams, int team_num, const gamestatus &state, game_state &state_of_game, const std::string &do_untill)

Variables

const unit_mapunit_map_ref = NULL
replay recorder
std::stringstream message_log
replayreplay_src = NULL


Detailed Description

Replay control code.

See http://www.wesnoth.org/wiki/ReplayWML for more info.

Definition in file replay.cpp.


Define Documentation

#define DBG_REPLAY   LOG_STREAM(debug, replay)

#define ERR_REPLAY   LOG_STREAM(err, replay)

Definition at line 54 of file replay.cpp.

Referenced by do_replay_handle(), and replay::throw_error().

#define LOG_REPLAY   LOG_STREAM(info, replay)

#define WRN_REPLAY   LOG_STREAM(warn, replay)

Definition at line 53 of file replay.cpp.

Referenced by do_replay_handle().


Function Documentation

static void check_checksums ( game_display disp,
const unit_map units,
const config cfg 
) [static]

bool do_replay ( game_display disp,
const gamemap map,
unit_map units,
std::vector< team > &  teams,
int  team_num,
const gamestatus state,
game_state state_of_game,
replay obj 
)

bool do_replay_handle ( game_display disp,
const gamemap map,
unit_map units,
std::vector< team > &  teams,
int  team_num,
const gamestatus state,
game_state state_of_game,
const std::string &  do_untill 
)

replay& get_replay_source (  ) 

Definition at line 721 of file replay.cpp.

References replay_src.

Referenced by do_replay(), and do_replay_handle().

static void verify ( const unit_map units,
const config cfg 
) [static]

static void verify_units ( const config cfg  )  [static]

Definition at line 131 of file replay.cpp.

References unit_map_ref, and verify().

Referenced by do_replay_handle().


Variable Documentation

std::stringstream message_log

Definition at line 476 of file replay.cpp.

Referenced by replay::build_chat_log(), and replay::clear().

replay* const old_

Definition at line 716 of file replay.cpp.

Definition at line 151 of file replay.cpp.

Referenced by dialogs::advance_unit(), playmp_controller::after_human_turn(), ai_interface::attack_enemy(), events::mouse_handler::attack_enemy_(), events::menu_handler::autosave(), events::delete_recall_unit::button_pressed(), calculate_healing(), events::menu_handler::clear_labels(), playsingle_controller::end_turn_record(), enter_connect_mode(), enter_wait_mode(), play_controller::execute_command(), play_controller::finish_turn(), replay_controller::init(), play_controller::init(), playsingle_controller::init_gui(), play_controller::init_side(), events::menu_handler::label_terrain(), mp::level_to_gamestate(), events::mouse_handler::move_unit_along_current_route(), ai_interface::move_unit_partial(), events::menu_handler::move_unit_to_loc(), playsingle_controller::play_ai_turn(), play_game(), playmp_controller::play_human_turn(), replay_controller::play_replay(), play_replay(), playsingle_controller::play_scenario(), replay_controller::play_side(), replay_controller::play_turn(), playsingle_controller::play_turn(), mp::lobby::process_event(), turn_info::process_network_data(), events::menu_handler::recall(), ai_interface::recruit(), events::menu_handler::redo(), events::menu_handler::rename_unit(), replay_controller::replay_skip_animation(), replay_controller::reset_replay(), events::menu_handler::save_game(), events::menu_handler::send_chat_message(), events::menu_handler::show_chat_log(), mp::start_client(), mp::start_server(), and events::menu_handler::undo().

replay* replay_src = NULL [static]

Definition at line 701 of file replay.cpp.

Referenced by get_replay_source().

const unit_map* unit_map_ref = NULL [static]


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs