00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef REPLAY_CONTROLLER_H_INCLUDED
00017 #define REPLAY_CONTROLLER_H_INCLUDED
00018
00019 class video;
00020
00021 #include "play_controller.hpp"
00022
00023 #include <vector>
00024
00025 class replay_controller : public play_controller
00026 {
00027 public:
00028 replay_controller(const config& level, game_state& state_of_game,
00029 const int ticks, const int num_turns, const config& game_config, CVideo& video);
00030 ~replay_controller();
00031
00032 virtual bool can_execute_command(hotkey::HOTKEY_COMMAND command, int index=-1) const;
00033
00034
00035 virtual void preferences();
00036 virtual void show_statistics();
00037 void play_replay();
00038 void reset_replay();
00039 void stop_replay();
00040 void replay_next_turn();
00041 void replay_next_side();
00042 void replay_show_everything();
00043 void replay_show_each();
00044 void replay_show_team1();
00045 void replay_skip_animation();
00046
00047 std::vector<team> teams_start_;
00048
00049 protected:
00050 virtual void init_gui();
00051
00052 private:
00053 bool continue_replay();
00054 void init();
00055 virtual void play_turn();
00056 virtual void play_side(const unsigned int team_index, bool save);
00057 void update_teams();
00058 void update_gui();
00059 void init_replay_display();
00060 void rebuild_replay_theme();
00061 void handle_generic_event(const std::string& );
00062
00063 game_state gamestate_start_;
00064 gamestatus status_start_;
00065 unit_map units_start_;
00066
00067 unsigned int current_turn_;
00068 int delay_;
00069 bool is_playing_;
00070
00071 bool show_everything_;
00072 unsigned int show_team_;
00073 };
00074
00075
00076 LEVEL_RESULT play_replay_level(const config& terrain_config,
00077 const config* level, CVideo& video,
00078 game_state& state_of_game);
00079
00080 #endif