author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9481 | 25ed9b0c242a |
child 9898 | 75347c78b276 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
9111
48ce04029fe4
(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:
9085
diff
changeset
|
3 |
/** @file network.h Basic functions/variables used all over the place. */ |
48ce04029fe4
(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:
9085
diff
changeset
|
4 |
|
211 | 5 |
#ifndef NETWORK_H |
6 |
#define NETWORK_H |
|
7 |
||
8276
245f1b131d64
(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:
8265
diff
changeset
|
8 |
#include "../player_type.h" |
245f1b131d64
(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:
8265
diff
changeset
|
9 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
10 |
#ifdef ENABLE_NETWORK |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
11 |
|
6247 | 12 |
void NetworkStartUp(); |
13 |
void NetworkShutDown(); |
|
6178
c29a7d37c3ce
(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:
5959
diff
changeset
|
14 |
|
8121
3bc6351e7369
(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:
7998
diff
changeset
|
15 |
extern bool _networking; ///< are we in networking mode? |
8276
245f1b131d64
(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:
8265
diff
changeset
|
16 |
extern bool _network_server; ///< network-server is active |
245f1b131d64
(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:
8265
diff
changeset
|
17 |
extern bool _network_available; ///< is network mode available? |
245f1b131d64
(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:
8265
diff
changeset
|
18 |
extern bool _network_dedicated; ///< are we a dedicated server? |
9428
1ba05b499957
(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:
9420
diff
changeset
|
19 |
extern bool _is_network_server; ///< Does this client wants to be a network-server? |
4830
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
20 |
|
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
21 |
#else /* ENABLE_NETWORK */ |
668bcb0a30b2
(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 */ |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
23 |
|
6247 | 24 |
static inline void NetworkStartUp() {} |
25 |
static inline void NetworkShutDown() {} |
|
4830
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
26 |
|
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
27 |
#define _networking 0 |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
28 |
#define _network_server 0 |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
29 |
#define _network_available 0 |
5711
8598c2d7b501
(svn r8198) -Codechange: two global variables are not needed when network is disabled.
rubidium
parents:
5619
diff
changeset
|
30 |
#define _network_dedicated 0 |
9428
1ba05b499957
(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:
9420
diff
changeset
|
31 |
#define _is_network_server 0 |
4830
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
32 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
33 |
#endif /* ENABLE_NETWORK */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
34 |
|
8276
245f1b131d64
(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:
8265
diff
changeset
|
35 |
/** As which player do we play? */ |
245f1b131d64
(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:
8265
diff
changeset
|
36 |
extern PlayerID _network_playas; |
211 | 37 |
|
38 |
#endif /* NETWORK_H */ |