Debian Codegraph @

engine/include/replay.h

raw
1 // ____ _ __
2 // / __ )____ _____ | | / /___ ___________
3 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
4 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
5 // /_____/\____/____/ |__/|__/\__,_/_/ /____/
6 //
7 // A futuristic real-time strategy game.
8 // This file is part of Bos Wars.
9 //
10 /**@name replay.h - The replay header file. */
11 //
12 // (c) Copyright 1998-2007 by Lutz Sammer and Jimmy Salmon
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; only version 2 of the License.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 // 02111-1307, USA.
27
28 #ifndef __REPLAY_H__
29 #define __REPLAY_H__
30
31 //@{
32
33 /*----------------------------------------------------------------------------
34 -- Includes
35 ----------------------------------------------------------------------------*/
36
37 #include <string>
38
39 /*----------------------------------------------------------------------------
40 -- Declarations
41 ----------------------------------------------------------------------------*/
42
43 enum ReplayType {
44 ReplayNone, /// No replay
45 ReplaySinglePlayer, /// Single player replay
46 ReplayMultiPlayer, /// Multi player replay
47 }; /// Replay types
48
49 class CFile;
50 class CUnit;
51
52 /*----------------------------------------------------------------------------
53 -- Variables
54 ----------------------------------------------------------------------------*/
55
56 extern bool CommandLogDisabled; /// True, if command log is off
57 extern ReplayType ReplayGameType; /// Replay game type
58
59 /*----------------------------------------------------------------------------
60 -- Functions
61 ----------------------------------------------------------------------------*/
62
63 /// Log commands into file
64 extern void CommandLog(const char *action, const CUnit *unit, int flush,
65 int x, int y, const CUnit *dest, const char *value, int num);
66 /// Replay user commands from log each cycle, single player games
67 extern void SinglePlayerReplayEachCycle();
68 /// Replay user commands from log each cycle, multiplayer games
69 extern void MultiPlayerReplayEachCycle();
70 /// Load replay
71 extern int LoadReplay(const std::string &name);
72 /// End logging
73 extern void EndReplayLog(void);
74 /// Clean replay
75 extern void CleanReplayLog(void);
76 /// Save the replay list to file
77 extern void SaveReplayList(CFile *file);
78 /// Register ccl functions related to network
79 extern void ReplayCclRegister(void);
80
81 //@}
82
83 #endif // !__REPLAY_H__