OpenTTD
game.h
Go to the documentation of this file.
1 /* $Id$ */
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 
15 #ifndef NETWORK_CORE_GAME_H
16 #define NETWORK_CORE_GAME_H
17 
18 #include "config.h"
19 #include "../../newgrf_config.h"
20 #include "../../date_type.h"
21 
28  byte clients_on;
29 };
30 
38  uint16 map_width;
39  uint16 map_height;
40  char server_name[NETWORK_NAME_LENGTH];
41  char hostname[NETWORK_HOSTNAME_LENGTH];
42  char server_revision[NETWORK_REVISION_LENGTH];
43  bool dedicated;
45  bool compatible;
46  bool use_password;
48  byte server_lang;
49  byte clients_max;
50  byte companies_on;
54  byte map_set;
55 };
56 
57 const char * GetNetworkRevisionString();
58 
59 #endif /* NETWORK_CORE_GAME_H */
Date start_date
When the game started.
Definition: game.h:36
byte spectators_max
Max spectators allowed on server.
Definition: game.h:53
uint16 map_height
Map height.
Definition: game.h:39
byte game_info_version
Version of the game info.
Definition: game.h:47
The game information that is not generated on-the-fly and has to be sent to the clients.
Definition: game.h:26
byte server_lang
Language of the server (we should make a nice table for this)
Definition: game.h:48
bool version_compatible
Can we connect to this server or not? (based on server_revision)
Definition: game.h:44
uint16 map_width
Map width.
Definition: game.h:38
Configuration options of the network stuff.
const char * GetNetworkRevisionString()
Get the network version string used by this build.
Definition: network.cpp:1111
The game information that is sent from the server to the clients.
Definition: game.h:34
byte companies_max
Max companies allowed on server.
Definition: game.h:51
byte companies_on
How many started companies do we have.
Definition: game.h:50
Information about GRF, used in the game and (part of it) in savegames.
byte clients_max
Max clients allowed on server.
Definition: game.h:49
bool use_password
Is this server passworded?
Definition: game.h:46
byte clients_on
Current count of clients on server.
Definition: game.h:28
static const uint NETWORK_HOSTNAME_LENGTH
The maximum length of the host name, in bytes including &#39;\0&#39;.
Definition: config.h:44
bool dedicated
Is this a dedicated server?
Definition: game.h:43
char map_name[NETWORK_NAME_LENGTH]
Map which is played ["random" for a randomized map].
Definition: game.h:27
byte map_set
Graphical set.
Definition: game.h:54
Date game_date
Current date.
Definition: game.h:37
int32 Date
The type to store our dates in.
Definition: date_type.h:16
static const uint NETWORK_NAME_LENGTH
The maximum length of the server name and map name, in bytes including &#39;\0&#39;.
Definition: config.h:42
static const uint NETWORK_REVISION_LENGTH
The maximum length of the revision, in bytes including &#39;\0&#39;.
Definition: config.h:46
GRFConfig * grfconfig
List of NewGRF files used.
Definition: game.h:35
byte spectators_on
How many spectators do we have?
Definition: game.h:52
bool compatible
Can we connect to this server or not? (based on server_revision and grf_match.
Definition: game.h:45