Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
demos.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "inexor/network/SharedVar.hpp" // for SharedVar
4 #include "inexor/shared/cube_types.hpp" // for string, uchar
5 #include "inexor/shared/cube_vector.hpp" // for vector
6 
7 namespace server {
8 struct clientinfo;
9 } // namespace server
10 struct stream;
11 
12 namespace server
13 {
14 
15 struct demofile
16 {
17  string info;
19  int len;
20 };
21 
22 extern vector<demofile> demos;
24 
28 
30 extern bool demonextmatch;
31 
32 
33 extern void setupdemorecord();
34 extern void recordpacket(int chan, void *data, int len);
35 extern void enddemorecord();
36 
37 extern void setupdemoplayback();
38 extern void readdemo();
39 extern void enddemoplayback();
40 
42 extern void stopdemo();
43 
44 // demos management:
45 
47 extern void cleardemos(int n);
48 
50 extern void listdemos(int cn);
51 
56 extern void senddemo(clientinfo *ci, int num);
57 
58 } // ns server
Definition: client_management.hpp:217
Vector template.
Definition: cube_vector.hpp:22
void stopdemo()
Wrapper for either enddemoplayback or enddemorecord, depending on m_demo.
Definition: demos.cpp:250
void enddemorecord()
Definition: demos.cpp:63
void setupdemorecord()
Definition: demos.cpp:94
bool demonextmatch
Whether we want to record a demo next match.
Definition: demos.cpp:31
Definition: demos.hpp:15
void enddemoplayback()
Definition: demos.cpp:165
void senddemo(clientinfo *ci, int num)
Send a specific demo to the client.
Definition: demos.cpp:155
vector< demofile > demos
Definition: demos.cpp:29
void setupdemoplayback()
Definition: demos.cpp:178
SharedVar< int > maxdemosize
Legacy file system streams.
Definition: stream.hpp:22
unsigned char uchar
Basic type definitions.
Definition: cube_types.hpp:7
void cleardemos(int n)
Remove all demos until demo number n or all if n = 0.
Definition: demos.cpp:129
void listdemos(int cn)
Send a list of demos to that client.
Definition: demos.cpp:120
void recordpacket(int chan, void *data, int len)
Definition: demos.cpp:86
uchar * data
Definition: demos.hpp:18
int len
Definition: demos.hpp:19
stream * demoplayback
Definition: demos.cpp:32
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
void readdemo()
Definition: demos.cpp:215
SharedVar< int > maxdemos
string info
Definition: demos.hpp:17
stream * demorecord
The streams for demo playback or demo recording.
Definition: demos.cpp:32