OpenTTD Source: src/network/network_gui.h Source File

OpenTTD Source 1.11.0-RC1

network_gui.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10 #ifndef NETWORK_GUI_H
11 #define NETWORK_GUI_H
12
13 #include "../company_type.h"
14 #include "../economy_type.h"
15 #include "../window_type.h"
16 #include "network_type.h"
17
18 void ShowNetworkNeedPassword(NetworkPasswordType npt);
19 void ShowNetworkChatQueryWindow(DestType type, int dest);
20 void ShowJoinStatusWindow();
21 void ShowNetworkGameWindow();
22 void ShowClientList();
23 void ShowNetworkCompanyPasswordWindow(Window *parent);
24
25
27 struct NetworkCompanyInfo : NetworkCompanyStats {
28 char company_name[NETWORK_COMPANY_NAME_LENGTH];
29 Year inaugurated_year;
30 Money company_value;
31 Money money;
32 Money income;
33 uint16 performance;
34 bool use_password;
35 char clients[NETWORK_CLIENTS_LENGTH];
36 };
37
38 NetworkCompanyInfo *GetLobbyCompanyInfo(CompanyID company);
39
40 #endif /* NETWORK_GUI_H */
NetworkCompanyStats
Simple calculated statistics of a company.
Definition: network_type.h:57
NetworkCompanyInfo::inaugurated_year
Year inaugurated_year
What year the company started in.
Definition: network_gui.h:29
DestType
DestType
Destination of our chat messages.
Definition: network_type.h:81
NetworkCompanyInfo::company_value
Money company_value
The company value.
Definition: network_gui.h:30
Year
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
Definition: date_type.h:18
ShowNetworkChatQueryWindow
void ShowNetworkChatQueryWindow(DestType type, int dest)
Show the chat window.
Definition: network_chat_gui.cpp:553
Owner
Owner
Enum for all companies/owners.
Definition: company_type.h:18
NetworkCompanyInfo::clients
char clients[NETWORK_CLIENTS_LENGTH]
The clients that control this company (Name1, name2, ..)
Definition: network_gui.h:35
NETWORK_CLIENTS_LENGTH
static const uint NETWORK_CLIENTS_LENGTH
The maximum length for the list of clients that controls a company, in bytes including '\0'.
Definition: config.h:46
GetLobbyCompanyInfo
NetworkCompanyInfo * GetLobbyCompanyInfo(CompanyID company)
Get the company information of a given company to fill for the lobby.
Definition: network_gui.cpp:1630
NetworkCompanyInfo::company_name
char company_name[NETWORK_COMPANY_NAME_LENGTH]
Company name.
Definition: network_gui.h:28
NetworkPasswordType
NetworkPasswordType
The type of password we're asking for.
Definition: network_type.h:72
NetworkCompanyInfo::money
Money money
The amount of money the company has.
Definition: network_gui.h:31
NetworkCompanyInfo::performance
uint16 performance
What was his performance last month?
Definition: network_gui.h:33
OverflowSafeInt< int64, INT64_MAX, INT64_MIN >
NetworkCompanyInfo::income
Money income
How much did the company earned last year.
Definition: network_gui.h:32
Window
Data structure for an opened window.
Definition: window_gui.h:276
NetworkCompanyInfo
Company information stored at the client side.
Definition: network_gui.h:27
network_type.h
NETWORK_COMPANY_NAME_LENGTH
static const uint NETWORK_COMPANY_NAME_LENGTH
The maximum length of the company name, in bytes including '\0'.
Definition: config.h:41
NetworkCompanyInfo::use_password
bool use_password
Is there a password.
Definition: network_gui.h:34