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

replay.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 1998-2007 by Lutz Sammer and Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 
29 #ifndef __REPLAY_H__
30 #define __REPLAY_H__
31 
33 
34 /*----------------------------------------------------------------------------
35 -- Includes
36 ----------------------------------------------------------------------------*/
37 
38 #include <string>
39 
40 /*----------------------------------------------------------------------------
41 -- Declarations
42 ----------------------------------------------------------------------------*/
43 
44 enum ReplayType {
48 };
49 
50 class CFile;
51 class CUnit;
52 
53 /*----------------------------------------------------------------------------
54 -- Variables
55 ----------------------------------------------------------------------------*/
56 
57 extern bool CommandLogDisabled;
59 
60 /*----------------------------------------------------------------------------
61 -- Functions
62 ----------------------------------------------------------------------------*/
63 
65 extern void CommandLog(const char *action, const CUnit *unit, int flush,
66  int x, int y, const CUnit *dest, const char *value, int num);
68 extern void SinglePlayerReplayEachCycle();
70 extern void MultiPlayerReplayEachCycle();
72 extern int LoadReplay(const std::string &name);
74 extern void EndReplayLog();
76 extern void CleanReplayLog();
78 extern void SaveReplayList(CFile &file);
80 extern void ReplayCclRegister();
81 
82 extern bool IsReplayGame();
83 
85 
86 #endif // !__REPLAY_H__
ReplayType
ReplayType
Definition: replay.h:44
IsReplayGame
bool IsReplayGame()
Definition: replay.cpp:630
SaveReplayList
void SaveReplayList(CFile &file)
Save the replay list to file.
Definition: replay.cpp:640
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.
Definition: replay.cpp:361
ReplayMultiPlayer
@ ReplayMultiPlayer
Single player replay.
Definition: replay.h:47
CleanReplayLog
void CleanReplayLog()
Clean replay.
Definition: replay.cpp:687
EndReplayLog
void EndReplayLog()
End logging.
Definition: replay.cpp:670
SinglePlayerReplayEachCycle
void SinglePlayerReplayEachCycle()
Replay user commands from log each cycle, single player games.
Definition: replay.cpp:884
LoadReplay
int LoadReplay(const std::string &name)
Load replay.
Definition: replay.cpp:650
ReplayGameType
ReplayType ReplayGameType
True, if command log is off.
Definition: replay.cpp:135
CommandLogDisabled
bool CommandLogDisabled
Definition: replay.cpp:134
MultiPlayerReplayEachCycle
void MultiPlayerReplayEachCycle()
Replay user commands from log each cycle, multiplayer games.
Definition: replay.cpp:894
ReplaySinglePlayer
@ ReplaySinglePlayer
No replay.
Definition: replay.h:46
ReplayCclRegister
void ReplayCclRegister()
Register ccl functions related to network.
Definition: replay.cpp:971
ReplayNone
@ ReplayNone
Definition: replay.h:45
CFile
Definition: iolib.h:102
CUnit
The big unit structure.
Definition: unit.h:135
(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.