OpenTTD
game.h
Go to the documentation of this file.
1 /* $Id: game.h 17699 2009-10-04 20:00:56Z rubidium $ */
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 
22 #ifdef ENABLE_NETWORK
23 
30  byte clients_on;
31 };
32 
40  uint16 map_width;
41  uint16 map_height;
42  char server_name[NETWORK_NAME_LENGTH];
43  char hostname[NETWORK_HOSTNAME_LENGTH];
44  char server_revision[NETWORK_REVISION_LENGTH];
45  bool dedicated;
47  bool compatible;
48  bool use_password;
50  byte server_lang;
51  byte clients_max;
52  byte companies_on;
56  byte map_set;
57 };
58 
59 #endif /* ENABLE_NETWORK */
60 
61 #endif /* NETWORK_CORE_GAME_H */
Date start_date
When the game started.
Definition: game.h:38
byte spectators_max
Max spectators allowed on server.
Definition: game.h:55
uint16 map_height
Map height.
Definition: game.h:41
byte game_info_version
Version of the game info.
Definition: game.h:49
The game information that is not generated on-the-fly and has to be sent to the clients.
Definition: game.h:28
byte server_lang
Language of the server (we should make a nice table for this)
Definition: game.h:50
bool version_compatible
Can we connect to this server or not? (based on server_revision)
Definition: game.h:46
uint16 map_width
Map width.
Definition: game.h:40
Configuration options of the network stuff.
The game information that is sent from the server to the clients.
Definition: game.h:36
byte companies_max
Max companies allowed on server.
Definition: game.h:53
byte companies_on
How many started companies do we have.
Definition: game.h:52
Information about GRF, used in the game and (part of it) in savegames.
byte clients_max
Max clients allowed on server.
Definition: game.h:51
bool use_password
Is this server passworded?
Definition: game.h:48
byte clients_on
Current count of clients on server.
Definition: game.h:30
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:45
char map_name[NETWORK_NAME_LENGTH]
Map which is played ["random" for a randomized map].
Definition: game.h:29
byte map_set
Graphical set.
Definition: game.h:56
Date game_date
Current date.
Definition: game.h:39
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:37
byte spectators_on
How many spectators do we have?
Definition: game.h:54
bool compatible
Can we connect to this server or not? (based on server_revision and grf_match.
Definition: game.h:47