author | celestar |
Thu, 11 Jan 2007 13:16:26 +0000 | |
branch | custombridgeheads |
changeset 5648 | 1608018c5ff2 |
parent 5643 | 3778051e8095 |
child 6050 | 77bd608748c8 |
permissions | -rw-r--r-- |
5642 | 1 |
/* $Id$ */ |
2 |
||
3 |
#ifndef NETWORK_CORE_GAME_H |
|
4 |
#define NETWORK_CORE_GAME_H |
|
5 |
||
6 |
#ifdef ENABLE_NETWORK |
|
7 |
||
5648
1608018c5ff2
(svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents:
5643
diff
changeset
|
8 |
#include "config.h" |
1608018c5ff2
(svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents:
5643
diff
changeset
|
9 |
#include "../../date.h" |
1608018c5ff2
(svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents:
5643
diff
changeset
|
10 |
#include "../../newgrf_config.h" |
1608018c5ff2
(svn r8059) [cbh] - Sync with r7788:8032 from trunk
celestar
parents:
5643
diff
changeset
|
11 |
|
5642 | 12 |
/** |
13 |
* @file game.h Information about a game that is sent between a |
|
14 |
* game server, game client and masterserver. |
|
15 |
*/ |
|
16 |
||
17 |
/** |
|
18 |
* This is the struct used by both client and server |
|
19 |
* some fields will be empty on the client (like game_password) by default |
|
20 |
* and only filled with data a player enters. |
|
21 |
*/ |
|
22 |
typedef struct NetworkGameInfo { |
|
23 |
byte game_info_version; ///< Version of the game info |
|
24 |
char server_name[NETWORK_NAME_LENGTH]; ///< Server name |
|
25 |
char hostname[NETWORK_HOSTNAME_LENGTH]; ///< Hostname of the server (if any) |
|
26 |
char server_revision[NETWORK_REVISION_LENGTH]; ///< The version number the server is using (e.g.: 'r304' or 0.5.0) |
|
27 |
bool version_compatible; ///< Can we connect to this server or not? (based on server_revision) |
|
28 |
bool compatible; ///< Can we connect to this server or not? (based on server_revision _and_ grf_match |
|
29 |
byte server_lang; ///< Language of the server (we should make a nice table for this) |
|
30 |
byte use_password; ///< Is set to != 0 if it uses a password |
|
31 |
char server_password[NETWORK_PASSWORD_LENGTH]; ///< On the server: the game password, on the client: != "" if server has password |
|
32 |
byte clients_max; ///< Max clients allowed on server |
|
33 |
byte clients_on; ///< Current count of clients on server |
|
34 |
byte companies_max; ///< Max companies allowed on server |
|
35 |
byte companies_on; ///< How many started companies do we have |
|
36 |
byte spectators_max; ///< Max spectators allowed on server |
|
37 |
byte spectators_on; ///< How many spectators do we have? |
|
38 |
Date game_date; ///< Current date |
|
39 |
Date start_date; ///< When the game started |
|
40 |
char map_name[NETWORK_NAME_LENGTH]; ///< Map which is played ["random" for a randomized map] |
|
41 |
uint16 map_width; ///< Map width |
|
42 |
uint16 map_height; ///< Map height |
|
43 |
byte map_set; ///< Graphical set |
|
44 |
bool dedicated; ///< Is this a dedicated server? |
|
45 |
char rcon_password[NETWORK_PASSWORD_LENGTH]; ///< RCon password for the server. "" if rcon is disabled |
|
46 |
struct GRFConfig *grfconfig; ///< List of NewGRF files used |
|
47 |
} NetworkGameInfo; |
|
48 |
||
49 |
#endif /* ENABLE_NETWORK */ |
|
50 |
||
51 |
#endif /* NETWORK_CORE_GAME_H */ |