OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
13 #include "../stdafx.h"
15 #include "../window_func.h"
21 #include "../safeguards.h"
48 if (prev_item ==
nullptr) {
51 prev_item->
next = item;
68 if (prev_item ==
nullptr) {
78 NetworkRebuildHostList();
105 prev_item = &item->
next;
121 item->info.compatible = item->info.version_compatible;
123 for (
GRFConfig *c = item->
info.grfconfig; c !=
nullptr; c = c->next) {
132 item->info.compatible =
false;
std::string connection_string
Address of the server.
GRFTextWrapper info
NOSAVE: GRF info (author, copyright, ...) (Action 0x08)
static const uint16 NETWORK_DEFAULT_PORT
The default port of the game server (TCP & UDP)
const GRFConfig * FindGRFConfig(uint32 grfid, FindGRFConfigMode mode, const uint8 *md5sum, uint32 desired_version)
Find a NewGRF in the scanned list.
void ClearGRFConfigList(GRFConfig **config)
Clear a GRF Config list, freeing all nodes.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
@ GCS_NOT_FOUND
GRF file was not found in the local cache.
@ GCF_COPY
The data is copied from a grf in _all_grfs.
void UpdateNetworkGameWindow()
Update the network new window because a new server is found on the network.
NetworkGameList * NetworkGameListAddItem(const std::string &connection_string)
Add a new item to the linked gamelist.
static ServerAddress Parse(const std::string &connection_string, uint16 default_port, CompanyID *company_id=nullptr)
Convert a string containing either "hostname", "hostname:port" or invite code to a ServerAddress,...
void NetworkAfterNewGRFScan()
Rebuild the GRFConfig's of the servers in the game list as we did a rescan and might have found new N...
NetworkGameList * _network_game_list
Game list of this client.
Information about GRF, used in the game and (part of it) in savegames.
int version
Used to see which servers are no longer available on the Game Coordinator and can be removed.
void NetworkGameListRemoveExpired()
Remove all servers that have not recently been updated.
@ GCS_UNKNOWN
The status of this grf file is unknown.
GRFTextWrapper name
NOSAVE: GRF name (Action 0x08)
@ WC_NETWORK_WINDOW
Network window; Window numbers:
void InvalidateWindowClassesData(WindowClass cls, int data, bool gui_scope)
Mark window data of all windows of a given class as invalid (in need of re-computing) Note that by de...
Structure with information shown in the game list (GUI)
NetworkGameList * next
Next pointer to make a linked game list.
@ FGCM_EXACT
Only find Grfs matching md5sum.
char * filename
Filename - either with or without full path.
NetworkGameInfo info
The game information of this server.
int _network_game_list_version
Current version of all items in the list.
void NetworkGameListRemoveItem(NetworkGameList *remove)
Remove an item from the gamelist linked list.
std::string connection_string
The connection string for this ServerAddress.
GRFConfig * grfconfig
List of NewGRF files used.