(svn r27729) -Codechange: Do not count static NewGRF when checking for the maximum...
[openttd.git] / src / network / core / game.h
blobc82c5aefed04d50653541b2693006d267588892b
1 /* $Id$ */
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 */
10 /**
11 * @file game.h Information about a game that is sent between a
12 * game server, game client and masterserver.
15 #ifndef NETWORK_CORE_GAME_H
16 #define NETWORK_CORE_GAME_H
18 #include "config.h"
19 #include "../../newgrf_config.h"
20 #include "../../date_type.h"
22 #ifdef ENABLE_NETWORK
24 /**
25 * The game information that is not generated on-the-fly and has to
26 * be sent to the clients.
28 struct NetworkServerGameInfo {
29 char map_name[NETWORK_NAME_LENGTH]; ///< Map which is played ["random" for a randomized map]
30 byte clients_on; ///< Current count of clients on server
33 /**
34 * The game information that is sent from the server to the clients.
36 struct NetworkGameInfo : NetworkServerGameInfo {
37 GRFConfig *grfconfig; ///< List of NewGRF files used
38 Date start_date; ///< When the game started
39 Date game_date; ///< Current date
40 uint16 map_width; ///< Map width
41 uint16 map_height; ///< Map height
42 char server_name[NETWORK_NAME_LENGTH]; ///< Server name
43 char hostname[NETWORK_HOSTNAME_LENGTH]; ///< Hostname of the server (if any)
44 char server_revision[NETWORK_REVISION_LENGTH]; ///< The version number the server is using (e.g.: 'r304' or 0.5.0)
45 bool dedicated; ///< Is this a dedicated server?
46 bool version_compatible; ///< Can we connect to this server or not? (based on server_revision)
47 bool compatible; ///< Can we connect to this server or not? (based on server_revision _and_ grf_match
48 bool use_password; ///< Is this server passworded?
49 byte game_info_version; ///< Version of the game info
50 byte server_lang; ///< Language of the server (we should make a nice table for this)
51 byte clients_max; ///< Max clients allowed on server
52 byte companies_on; ///< How many started companies do we have
53 byte companies_max; ///< Max companies allowed on server
54 byte spectators_on; ///< How many spectators do we have?
55 byte spectators_max; ///< Max spectators allowed on server
56 byte map_set; ///< Graphical set
59 #endif /* ENABLE_NETWORK */
61 #endif /* NETWORK_CORE_GAME_H */