_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

replay.h File Reference
#include <string>

Go to the source code of this file.

replay.h - The replay header file.

enum  ReplayType { ReplayNone, ReplaySinglePlayer, ReplayMultiPlayer }
 
bool CommandLogDisabled
 
ReplayType ReplayGameType
 True, if command log is off. More...
 
void CommandLog (const char *action, const CUnit *unit, int flush, int x, int y, const CUnit *dest, const char *value, int num)
 Replay game type. More...
 
void SinglePlayerReplayEachCycle ()
 Replay user commands from log each cycle, single player games. More...
 
void MultiPlayerReplayEachCycle ()
 Replay user commands from log each cycle, multiplayer games. More...
 
int LoadReplay (const std::string &name)
 Load replay. More...
 
void EndReplayLog ()
 End logging. More...
 
void CleanReplayLog ()
 Clean replay. More...
 
void SaveReplayList (CFile &file)
 Save the replay list to file. More...
 
void ReplayCclRegister ()
 Register ccl functions related to network. More...
 
bool IsReplayGame ()
 

Enumeration Type Documentation

◆ ReplayType

enum ReplayType
Enumerator
ReplayNone 
ReplaySinglePlayer 

No replay.

ReplayMultiPlayer 

Single player replay.

Multi player replay

Function Documentation

◆ CleanReplayLog()

void CleanReplayLog ( )

Clean replay.

Clean replay log

◆ CommandLog()

void CommandLog ( const char *  action,
const CUnit unit,
int  flush,
int  x,
int  y,
const CUnit dest,
const char *  value,
int  num 
)

Replay game type.

Log commands into file

Log commands into file.

This could later be used to recover, crashed games.

Parameters
actionCommand name (move,attack,...).
unitUnit that receive the command.
flushAppend command or flush old commands.
xoptional X map position.
yoptional y map position.
destoptional destination unit.
valueoptional command argument (unit-type,...).
numoptional number argument

◆ EndReplayLog()

void EndReplayLog ( )

End logging.

End logging

◆ IsReplayGame()

bool IsReplayGame ( )

Check if we're replaying a game

◆ LoadReplay()

int LoadReplay ( const std::string &  name)

Load replay.

Load a log file to replay a game

Parameters
namename of file to load.

◆ MultiPlayerReplayEachCycle()

void MultiPlayerReplayEachCycle ( )

Replay user commands from log each cycle, multiplayer games.

Replay user commands from log each cycle, multiplayer games

◆ ReplayCclRegister()

void ReplayCclRegister ( )

Register ccl functions related to network.

Register Ccl functions with lua

◆ SaveReplayList()

void SaveReplayList ( CFile file)

Save the replay list to file.

Save generated replay

Parameters
filefile to save to.

◆ SinglePlayerReplayEachCycle()

void SinglePlayerReplayEachCycle ( )

Replay user commands from log each cycle, single player games.

Replay user commands from log each cycle, single player games

Variable Documentation

◆ CommandLogDisabled

bool CommandLogDisabled

◆ ReplayGameType

ReplayType ReplayGameType

True, if command log is off.

True, if command log is off.

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.