author | belugas |
Mon, 30 Jun 2008 16:59:35 +0000 | |
changeset 11107 | 6db1c5112e97 |
parent 10882 | f047317b321c |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
10402
diff
changeset
|
3 |
/** @file network.h Basic functions/variables used all over the place. */ |
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
10402
diff
changeset
|
4 |
|
211 | 5 |
#ifndef NETWORK_H |
6 |
#define NETWORK_H |
|
7 |
||
8772
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
8 |
#include "../player_type.h" |
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
9 |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
10 |
#ifdef ENABLE_NETWORK |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
11 |
|
6573 | 12 |
void NetworkStartUp(); |
13 |
void NetworkShutDown(); |
|
6504
5578f2fa1a73
(svn r8949) -Codechange: only test the first NETWORK_REVISION_LENGTH - 1 characters when determining network compatability. This makes it possible to have 'long' branch names while still being able to play network games.
rubidium
parents:
6210
diff
changeset
|
14 |
|
8617
931e0970d509
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
8494
diff
changeset
|
15 |
extern bool _networking; ///< are we in networking mode? |
8772
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
16 |
extern bool _network_server; ///< network-server is active |
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
17 |
extern bool _network_available; ///< is network mode available? |
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
18 |
extern bool _network_dedicated; ///< are we a dedicated server? |
10792
95b6eb9fcc9e
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
rubidium
parents:
10784
diff
changeset
|
19 |
extern bool _is_network_server; ///< Does this client wants to be a network-server? |
4830
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
20 |
|
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
21 |
#else /* ENABLE_NETWORK */ |
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
22 |
/* Network function stubs when networking is disabled */ |
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
23 |
|
6573 | 24 |
static inline void NetworkStartUp() {} |
25 |
static inline void NetworkShutDown() {} |
|
4830
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
26 |
|
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
27 |
#define _networking 0 |
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
28 |
#define _network_server 0 |
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
29 |
#define _network_available 0 |
5962
72d6d787d1f0
(svn r8198) -Codechange: two global variables are not needed when network is disabled.
rubidium
parents:
5870
diff
changeset
|
30 |
#define _network_dedicated 0 |
10792
95b6eb9fcc9e
(svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers.
rubidium
parents:
10784
diff
changeset
|
31 |
#define _is_network_server 0 |
4830
0ff2a14e90be
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
32 |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
33 |
#endif /* ENABLE_NETWORK */ |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
34 |
|
8772
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
35 |
/** As which player do we play? */ |
8ae63fc3bbfb
(svn r11840) -Codechange: split network.h so not everything in there needs to be included when wanting to know whether we are a server.
rubidium
parents:
8761
diff
changeset
|
36 |
extern PlayerID _network_playas; |
211 | 37 |
|
38 |
#endif /* NETWORK_H */ |