#include <replay_controller.hpp>
Public Member Functions | |
replay_controller (const config &level, game_state &state_of_game, const int ticks, const int num_turns, const config &game_config, CVideo &video) | |
~replay_controller () | |
virtual bool | can_execute_command (hotkey::HOTKEY_COMMAND command, int index=-1) const |
Check if a command can be executed. | |
virtual void | preferences () |
virtual void | show_statistics () |
void | play_replay () |
void | reset_replay () |
void | stop_replay () |
void | replay_next_turn () |
void | replay_next_side () |
void | replay_show_everything () |
void | replay_show_each () |
void | replay_show_team1 () |
void | replay_skip_animation () |
Public Attributes | |
std::vector< team > | teams_start_ |
Protected Member Functions | |
virtual void | init_gui () |
Private Member Functions | |
bool | continue_replay () |
void | init () |
virtual void | play_turn () |
virtual void | play_side (const unsigned int team_index, bool save) |
void | update_teams () |
void | update_gui () |
void | init_replay_display () |
void | rebuild_replay_theme () |
void | handle_generic_event (const std::string &) |
Private Attributes | |
game_state | gamestate_start_ |
gamestatus | status_start_ |
unit_map | units_start_ |
unsigned int | current_turn_ |
int | delay_ |
bool | is_playing_ |
bool | show_everything_ |
unsigned int | show_team_ |
Definition at line 25 of file replay_controller.hpp.
replay_controller::replay_controller | ( | const config & | level, | |
game_state & | state_of_game, | |||
const int | ticks, | |||
const int | num_turns, | |||
const config & | game_config, | |||
CVideo & | video | |||
) |
Definition at line 69 of file replay_controller.cpp.
References current_turn_, delay_, play_controller::gamestate_, gamestate_start_, init(), is_playing_, show_everything_, and show_team_.
replay_controller::~replay_controller | ( | ) |
Definition at line 84 of file replay_controller.cpp.
References events::generic_event::detach_handler(), display::get_theme(), play_controller::gui_, and theme::theme_reset().
bool replay_controller::can_execute_command | ( | hotkey::HOTKEY_COMMAND | command, | |
int | index = -1 | |||
) | const [virtual] |
Check if a command can be executed.
Reimplemented from play_controller.
Definition at line 413 of file replay_controller.cpp.
References play_controller::can_execute_command(), hotkey::HOTKEY_CHAT_LOG, hotkey::HOTKEY_PLAY_REPLAY, hotkey::HOTKEY_REPLAY_NEXT_SIDE, hotkey::HOTKEY_REPLAY_NEXT_TURN, hotkey::HOTKEY_REPLAY_SHOW_EACH, hotkey::HOTKEY_REPLAY_SHOW_EVERYTHING, hotkey::HOTKEY_REPLAY_SHOW_TEAM1, hotkey::HOTKEY_REPLAY_SKIP_ANIMATION, hotkey::HOTKEY_RESET_REPLAY, hotkey::HOTKEY_SAVE_GAME, hotkey::HOTKEY_SAVE_REPLAY, and hotkey::HOTKEY_STOP_REPLAY.
void replay_controller::preferences | ( | ) | [virtual] |
Reimplemented from play_controller.
Definition at line 399 of file replay_controller.cpp.
References init_replay_display(), play_controller::preferences(), and update_gui().
void replay_controller::show_statistics | ( | ) | [virtual] |
Reimplemented from play_controller.
Definition at line 405 of file replay_controller.cpp.
References play_controller::gui_, play_controller::menu_handler_, game_display::playing_team(), and events::menu_handler::show_statistics().
void replay_controller::play_replay | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 271 of file replay_controller.cpp.
References replay::at_end(), b, DBG_REPLAY, display::find_button(), play_controller::first_player_, play_controller::gui_, is_playing_, play_turn(), QUIT, recorder, gui::button::release(), end_level_exception::result, and play_controller::ticks_.
void replay_controller::reset_replay | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 164 of file replay_controller.cpp.
References b, game_display::clear_chat_messages(), continue_replay(), current_turn_, play_controller::events_manager_, display::find_button(), play_controller::fire_prestart(), play_controller::fire_start(), statistics::fresh_stats(), play_controller::gamestate_, gamestate_start_, play_controller::gui_, display::invalidate_game_status(), is_playing_, play_controller::level_, play_controller::loading_game_, play_controller::map_, game_display::new_turn(), play_controller::player_number_, events::raise_draw_event(), recorder, gui::button::release(), play_controller::soundsources_manager_, replay::start_replay(), play_controller::status_, status_start_, play_controller::teams_, teams_start_, play_controller::units_, and units_start_.
void replay_controller::stop_replay | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 208 of file replay_controller.cpp.
References b, display::find_button(), play_controller::gui_, is_playing_, and gui::button::release().
void replay_controller::replay_next_turn | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 214 of file replay_controller.cpp.
References b, display::find_button(), play_controller::gui_, is_playing_, play_turn(), play_controller::player_number_, gui::button::release(), game_display::scroll_to_leader(), play_controller::skip_replay_, and play_controller::units_.
void replay_controller::replay_next_side | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 226 of file replay_controller.cpp.
References b, current_turn_, display::find_button(), play_controller::gui_, is_playing_, play_side(), play_controller::player_number_, gui::button::release(), game_display::scroll_to_leader(), play_controller::skip_replay_, play_controller::teams_, and play_controller::units_.
void replay_controller::replay_show_everything | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 244 of file replay_controller.cpp.
References show_everything_, show_team_, update_gui(), and update_teams().
void replay_controller::replay_show_each | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 251 of file replay_controller.cpp.
References show_everything_, show_team_, update_gui(), and update_teams().
void replay_controller::replay_show_team1 | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 258 of file replay_controller.cpp.
References play_controller::gui_, game_display::set_team(), show_everything_, show_team_, update_gui(), and update_teams().
void replay_controller::replay_skip_animation | ( | ) | [virtual] |
Reimplemented from hotkey::command_executor.
Definition at line 266 of file replay_controller.cpp.
References replay::is_skipping(), recorder, replay::set_skip(), and play_controller::skip_replay_.
void replay_controller::init_gui | ( | ) | [protected, virtual] |
Reimplemented from play_controller.
Definition at line 130 of file replay_controller.cpp.
References DBG_NG, play_controller::gui_, play_controller::init_gui(), play_controller::player_number_, game_display::scroll_to_leader(), game_display::set_team(), show_everything_, show_team_, play_controller::teams_, play_controller::ticks_, play_controller::units_, and display::WARP.
Referenced by init().
bool replay_controller::continue_replay | ( | ) | [private] |
Definition at line 91 of file replay_controller.cpp.
References _, play_controller::gui_, and gui::OK_CANCEL.
Referenced by init(), play_side(), and reset_replay().
void replay_controller::init | ( | ) | [private] |
Definition at line 96 of file replay_controller.cpp.
References continue_replay(), DBG_REPLAY, play_controller::fire_prestart(), play_controller::fire_start(), statistics::fresh_stats(), init_gui(), init_replay_display(), replay::is_skipping(), play_controller::level_, play_controller::loading_game_, cursor::NORMAL, recorder, victory_conditions::set_victory_when_enemies_defeated(), play_controller::teams_, teams_start_, play_controller::units_, units_start_, and update_gui().
Referenced by replay_controller().
void replay_controller::play_turn | ( | ) | [private, virtual] |
Definition at line 298 of file replay_controller.cpp.
References replay::at_end(), current_turn_, play_controller::gui_, display::invalidate_game_status(), is_playing_, LOG_REPLAY, game_display::new_turn(), play_side(), play_controller::play_slice(), play_controller::player_number_, events::raise_draw_event(), recorder, and play_controller::teams_.
Referenced by play_replay(), and replay_next_turn().
void replay_controller::play_side | ( | const unsigned int | team_index, | |
bool | save | |||
) | [private, virtual] |
Implements play_controller.
Definition at line 318 of file replay_controller.cpp.
References replay::at_end(), unit_map::begin(), continue_replay(), play_controller::current_team(), current_turn_, DBG_REPLAY, DEFEAT, do_replay(), unit_map::end(), play_controller::finish_side_turn(), play_controller::finish_turn(), play_controller::gamestate_, play_controller::gui_, play_controller::init_side(), is_playing_, play_controller::map_, gamestatus::next_turn(), play_controller::player_number_, recorder, statistics::reset_turn_stats(), end_level_exception::result, play_controller::status_, play_controller::teams_, gamestatus::turn(), play_controller::units_, update_gui(), update_teams(), and VICTORY.
Referenced by play_turn(), and replay_next_side().
void replay_controller::update_teams | ( | ) | [private] |
Definition at line 376 of file replay_controller.cpp.
References play_controller::clear_shroud(), play_controller::gui_, display::invalidate_all(), play_controller::map_, play_controller::player_number_, game_display::set_playing_team(), game_display::set_team(), show_everything_, show_team_, play_controller::teams_, and play_controller::units_.
Referenced by play_side(), replay_show_each(), replay_show_everything(), and replay_show_team1().
void replay_controller::update_gui | ( | ) | [private] |
Definition at line 391 of file replay_controller.cpp.
References events::raise_draw_event().
Referenced by init(), play_side(), preferences(), replay_show_each(), replay_show_everything(), and replay_show_team1().
void replay_controller::init_replay_display | ( | ) | [private] |
Definition at line 144 of file replay_controller.cpp.
References events::generic_event::attach_handler(), DBG_REPLAY, display::get_theme(), play_controller::gui_, rebuild_replay_theme(), theme::theme_reset(), and play_controller::ticks_.
Referenced by init(), and preferences().
void replay_controller::rebuild_replay_theme | ( | ) | [private] |
Definition at line 152 of file replay_controller.cpp.
References config::child(), play_controller::game_config_, display::get_theme(), get_theme(), play_controller::gui_, display::invalidate_theme(), play_controller::level_, and theme::modify().
Referenced by handle_generic_event(), and init_replay_display().
void replay_controller::handle_generic_event | ( | const std::string & | ) | [private, virtual] |
Reimplemented from play_controller.
Definition at line 409 of file replay_controller.cpp.
References rebuild_replay_theme().
std::vector<team> replay_controller::teams_start_ |
Definition at line 63 of file replay_controller.hpp.
Referenced by replay_controller(), and reset_replay().
gamestatus replay_controller::status_start_ [private] |
unit_map replay_controller::units_start_ [private] |
unsigned int replay_controller::current_turn_ [private] |
Definition at line 67 of file replay_controller.hpp.
Referenced by play_side(), play_turn(), replay_controller(), replay_next_side(), and reset_replay().
int replay_controller::delay_ [private] |
bool replay_controller::is_playing_ [private] |
Definition at line 69 of file replay_controller.hpp.
Referenced by play_replay(), play_side(), play_turn(), replay_controller(), replay_next_side(), replay_next_turn(), reset_replay(), and stop_replay().
bool replay_controller::show_everything_ [private] |
Definition at line 71 of file replay_controller.hpp.
Referenced by init_gui(), replay_controller(), replay_show_each(), replay_show_everything(), replay_show_team1(), and update_teams().
unsigned int replay_controller::show_team_ [private] |
Definition at line 72 of file replay_controller.hpp.
Referenced by init_gui(), replay_controller(), replay_show_each(), replay_show_everything(), replay_show_team1(), and update_teams().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |