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

src/include/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.
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.
void SinglePlayerReplayEachCycle ()
 Replay user commands from log each cycle, single player games.
void MultiPlayerReplayEachCycle ()
 Replay user commands from log each cycle, multiplayer games.
int LoadReplay (const std::string &name)
 Load replay.
void EndReplayLog ()
 End logging.
void CleanReplayLog ()
 Clean replay.
void SaveReplayList (CFile *file)
 Save the replay list to file.
void ReplayCclRegister ()
 Register ccl functions related to network.

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:
action Command name (move,attack,...).
unit Unit that receive the command.
flush Append command or flush old commands.
x optional X map position.
y optional y map position.
dest optional destination unit.
value optional command argument (unit-type,...).
num optional 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:
name name 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:
file file 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

True, if command log is off.

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