$treeview $search $mathjax
Stratagus
2.2.7
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include "replay.h"
#include "actions.h"
#include "commands.h"
#include "game.h"
#include "interface.h"
#include "iocompat.h"
#include "iolib.h"
#include "map.h"
#include "netconnect.h"
#include "network.h"
#include "player.h"
#include "script.h"
#include "settings.h"
#include "sound.h"
#include "translate.h"
#include "unit.h"
#include "unit_manager.h"
#include "unittype.h"
#include "version.h"
#include <sstream>
#include <time.h>
Classes | |
class | LogEntry |
class | MPPlayer |
class | FullReplay |
replay.cpp - Replay game. | |
bool | CommandLogDisabled |
ReplayType | ReplayGameType |
True if command log is off. | |
static bool | DisabledLog |
Replay game type. | |
static CFile * | LogFile |
Disabled log for replay. | |
static unsigned long | NextLogCycle |
Replay log file. | |
static int | InitReplay |
Next log cycle number. | |
static FullReplay * | CurrentReplay |
Initialize replay. | |
static LogEntry * | ReplayStep |
void | ExpandPath (std::string &newpath, const std::string &path) |
void | StartMap (const std::string &filename, bool clean) |
static FullReplay * | StartReplay () |
static void | ApplyReplaySettings () |
static void | DeleteReplay (FullReplay *replay) |
static void | PrintLogCommand (const LogEntry &log, CFile &file) |
static void | SaveFullLog (CFile &file) |
static void | AppendLog (LogEntry *log, CFile &file) |
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. | |
static int | CclLog (lua_State *l) |
static int | CclReplayLog (lua_State *l) |
bool | IsReplayGame () |
void | SaveReplayList (CFile &file) |
Save the replay list to file. | |
int | LoadReplay (const std::string &name) |
Load replay. | |
void | EndReplayLog () |
End logging. | |
void | CleanReplayLog () |
Clean replay. | |
static void | DoNextReplay () |
static void | ReplayEachCycle () |
void | SinglePlayerReplayEachCycle () |
Replay user commands from log each cycle, single player games. | |
void | MultiPlayerReplayEachCycle () |
Replay user commands from log each cycle, multiplayer games. | |
int | SaveReplay (const std::string &filename) |
void | StartReplay (const std::string &filename, bool reveal) |
void | ReplayCclRegister () |
Register ccl functions related to network. |
Append the LogEntry structure at the end of currentLog, and to LogFile
log | Pointer the replay log entry to be added | |
dest | The file to output to |
static void ApplyReplaySettings | ( | ) | [static] |
Applies settings the game used at the start of the replay
static int CclLog | ( | lua_State * | l | ) | [static] |
Parse log
static int CclReplayLog | ( | lua_State * | l | ) | [static] |
Parse replay-log
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.
This could later be used to recover, crashed games.
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 |
static void DeleteReplay | ( | FullReplay * | replay | ) | [static] |
Free a replay from memory
replay | Pointer to the replay to be freed |
static void DoNextReplay | ( | ) | [static] |
Do next replay
void EndReplayLog | ( | ) |
End logging.
End logging
void ExpandPath | ( | std::string & | newpath, | |
const std::string & | path | |||
) |
bool IsReplayGame | ( | ) |
Check if we're replaying a game
int LoadReplay | ( | const std::string & | name | ) |
Load replay.
Load a log file to replay a game
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
static void ReplayEachCycle | ( | ) | [static] |
Replay user commands from log each cycle
static void SaveFullLog | ( | CFile & | file | ) | [static] |
int SaveReplay | ( | const std::string & | filename | ) |
Save the replay
filename | Name of the file to save to |
void SaveReplayList | ( | CFile & | file | ) |
Save the replay list to file.
Save generated replay
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
void StartMap | ( | const std::string & | filename, | |
bool | clean | |||
) |
void StartReplay | ( | const std::string & | filename, | |
bool | reveal | |||
) |
static FullReplay* StartReplay | ( | ) | [static] |
bool CommandLogDisabled |
FullReplay* CurrentReplay [static] |
Initialize replay.
bool DisabledLog [static] |
Replay game type.
int InitReplay [static] |
Next log cycle number.
unsigned long NextLogCycle [static] |
Replay log file.
True if command log is off.
True, if command log is off.
LogEntry* ReplayStep [static] |