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