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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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...
 

Enumeration Type Documentation

enum ReplayType
Enumerator
ReplayNone 
ReplaySinglePlayer 

No replay.

ReplayMultiPlayer 

Single player replay.

Multi player replay

Function Documentation

void CleanReplayLog ( )

Clean replay.

Clean replay log

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
void EndReplayLog ( )

End logging.

End logging

int LoadReplay ( const std::string &  name)

Load replay.

Load a log file to replay a game

Parameters
namename of file to load.
void MultiPlayerReplayEachCycle ( )

Replay user commands from log each cycle, multiplayer games.

Replay user commands from log each cycle, multiplayer games

void ReplayCclRegister ( )

Register ccl functions related to network.

Register Ccl functions with lua

void SaveReplayList ( CFile file)

Save the replay list to file.

Save generated replay

Parameters
filefile to save to.
void SinglePlayerReplayEachCycle ( )

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

Replay user commands from log each cycle, single player games

Variable Documentation

bool CommandLogDisabled
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.