OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
13 #include "../stdafx.h"
15 #include "../window_func.h"
21 #include "../safeguards.h"
49 if (prev_item ==
nullptr) {
52 prev_item->
next = item;
69 if (prev_item ==
nullptr) {
79 NetworkRebuildHostList();
106 prev_item = &item->
next;
122 item->info.compatible = item->info.version_compatible;
124 for (
GRFConfig *c = item->
info.grfconfig; c !=
nullptr; c = c->next) {
133 item->info.compatible =
false;
int gamescript_version
Version of the gamescript.
std::string connection_string
Address of the server.
GRFTextWrapper info
NOSAVE: GRF info (author, copyright, ...) (Action 0x08)
void ClearGRFConfigList(GRFConfig **config)
Clear a GRF Config list, freeing all nodes.
std::string filename
Filename - either with or without full path.
@ GCS_NOT_FOUND
GRF file was not found in the local cache.
static ServerAddress Parse(const std::string &connection_string, uint16_t default_port, CompanyID *company_id=nullptr)
Convert a string containing either "hostname", "hostname:port" or invite code to a ServerAddress,...
@ 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.
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.
static const uint16_t NETWORK_DEFAULT_PORT
The default port of the game server (TCP & UDP)
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.
NetworkGameInfo info
The game information of this server.
int _network_game_list_version
Current version of all items in the list.
const GRFConfig * FindGRFConfig(uint32_t grfid, FindGRFConfigMode mode, const MD5Hash *md5sum, uint32_t desired_version)
Find a NewGRF in the scanned 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.
constexpr debug_inline bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.