OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

network.h
Go to the documentation of this file.
1 /* $Id: network.h 26449 2014-04-08 20:19:41Z planetmaker $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef NETWORK_H
13 #define NETWORK_H
14
15
16 #ifdef ENABLE_NETWORK
17
18 void NetworkStartUp();
19 void NetworkShutDown();
20 void NetworkDrawChatMessage();
21 bool HasClients();
22
23 extern bool _networking;
24 extern bool _network_server;
25 extern bool _network_available;
26 extern bool _network_dedicated;
27 extern bool _is_network_server;
28
29 #else /* ENABLE_NETWORK */
30 /* Network function stubs when networking is disabled */
31
32 static inline void NetworkStartUp() {}
33 static inline void NetworkShutDown() {}
34 static inline void NetworkDrawChatMessage() {}
35 static inline bool HasClients() { return false; }
36
37 #define _networking 0
38 #define _network_server 0
39 #define _network_available 0
40 #define _network_dedicated 0
41 #define _is_network_server 0
42
43 #endif /* ENABLE_NETWORK */
44 #endif /* NETWORK_H */