Advanced Strategic Command
Classes | Functions | Variables
replay.h File Reference

Interface for recording and playing replays. More...

#include "events.h"
#include "ascstring.h"
#include "gamemap.h"
#include "basestreaminterface.h"
Include dependency graph for replay.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  trunreplay
 
class  LockReplayRecording
 

Functions

void checkforreplay (void)
 checks if there is replay information and -if there is any- runs the replay More...
 
void initReplayLogging (Player &player)
 Initialized the replay logging at the beginning of a players or the ai's turn. More...
 
void runSpecificReplay (int player, int viewingplayer, bool performEndTurnOperations=true)
 runs the replay for the given player More...
 
void viewOwnReplay (Player &player)
 runs the replay of the current player. This is used primarily for debugging the replay system More...
 
void hookReplayToSystem ()
 initialized the replay system at program startup More...
 

Variables

trunreplay runreplay
 
int startreplaylate
 a hack to enable the replay in a game that was started without replays More...
 

Detailed Description

Interface for recording and playing replays.

Definition in file replay.h.

Function Documentation

void checkforreplay ( void  )
void hookReplayToSystem ( )

initialized the replay system at program startup

Definition at line 2285 of file replay.cpp.

References ActionContainer::commitCommand, and logActionToReplay().

Referenced by loaddata().

void initReplayLogging ( Player player)

Initialized the replay logging at the beginning of a players or the ai's turn.

Definition at line 687 of file replay.cpp.

References GameMap::ReplayInfo::actmemstream, fatalError(), Player::getParentMap(), Player::getPosition(), GameMap::ReplayInfo::guidata, Player::off, GameMap::replayinfo, savereplay(), startreplaylate, Player::stat, and tnstream::writing.

Referenced by deployMapPlayingHooks().

void runSpecificReplay ( int  player,
int  viewingplayer,
bool  performEndTurnOperations = true 
)

runs the replay for the given player

Definition at line 600 of file replay.cpp.

References actmap, errorMessage(), GameMap::ReplayInfo::guidata, GameMap::ReplayInfo::map, GameMap::replayinfo, and trunreplay::run().

Referenced by checkforreplay(), and viewOwnReplay().

void viewOwnReplay ( Player player)

runs the replay of the current player. This is used primarily for debugging the replay system

Definition at line 630 of file replay.cpp.

References choice_dlg(), Player::getParentMap(), Player::getPosition(), Player::human, CGameOptions::Instance(), GameMap::replayinfo, runSpecificReplay(), Player::stat, and Player::supervisor.

Referenced by hookGuiToMap().

Variable Documentation

trunreplay runreplay

Definition at line 70 of file replay.cpp.

int startreplaylate

a hack to enable the replay in a game that was started without replays

Definition at line 72 of file replay.cpp.

Referenced by initReplayLogging().