author | rubidium |
Tue, 30 Sep 2008 20:39:50 +0000 | |
changeset 10207 | c291a21b304e |
parent 9898 | 75347c78b276 |
child 10208 | 72c00af5c95d |
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(); |
|
9898
75347c78b276
(svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support.
rubidium
parents:
9481
diff
changeset
|
14 |
void NetworkDrawChatMessage(); |
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
|
15 |
|
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
|
16 |
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
|
17 |
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
|
18 |
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
|
19 |
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
|
20 |
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
|
21 |
|
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
22 |
#else /* ENABLE_NETWORK */ |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
23 |
/* 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
|
24 |
|
6247 | 25 |
static inline void NetworkStartUp() {} |
26 |
static inline void NetworkShutDown() {} |
|
9898
75347c78b276
(svn r14047) -Codechange: move chatmessage handling to the network directory as that's the only case chat messages are used. Furthermore remove any trace of chatmessages when compiling without network support.
rubidium
parents:
9481
diff
changeset
|
27 |
static inline void NetworkDrawChatMessage() {} |
4830
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
28 |
|
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
29 |
#define _networking 0 |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
30 |
#define _network_server 0 |
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
31 |
#define _network_available 0 |
5711
8598c2d7b501
(svn r8198) -Codechange: two global variables are not needed when network is disabled.
rubidium
parents:
5619
diff
changeset
|
32 |
#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
|
33 |
#define _is_network_server 0 |
4830
668bcb0a30b2
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
Darkvater
parents:
4829
diff
changeset
|
34 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
35 |
#endif /* ENABLE_NETWORK */ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
239
diff
changeset
|
36 |
|
10207
c291a21b304e
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents:
9898
diff
changeset
|
37 |
/** As which company do we play? */ |
c291a21b304e
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium
parents:
9898
diff
changeset
|
38 |
extern CompanyID _network_playas; |
211 | 39 |
|
40 |
#endif /* NETWORK_H */ |