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/>.
10 /** @file network_gui.h GUIs related to networking. */
15 #include "../company_type.h"
16 #include "../economy_type.h"
17 #include "../window_type.h"
18 #include "network_type.h"
22 void ShowNetworkNeedPassword(NetworkPasswordType npt
);
23 void ShowNetworkGiveMoneyWindow(CompanyID company
);
24 void ShowNetworkChatQueryWindow(DestType type
, int dest
);
25 void ShowJoinStatusWindow();
26 void ShowNetworkGameWindow();
27 void ShowClientList();
28 void ShowNetworkCompanyPasswordWindow(Window
*parent
);
31 /** Company information stored at the client side */
32 struct NetworkCompanyInfo
: NetworkCompanyStats
{
33 char company_name
[NETWORK_COMPANY_NAME_LENGTH
]; ///< Company name
34 Year inaugurated_year
; ///< What year the company started in
35 Money company_value
; ///< The company value
36 Money money
; ///< The amount of money the company has
37 Money income
; ///< How much did the company earned last year
38 uint16 performance
; ///< What was his performance last month?
39 bool use_password
; ///< Is there a password
40 char clients
[NETWORK_CLIENTS_LENGTH
]; ///< The clients that control this company (Name1, name2, ..)
43 NetworkCompanyInfo
*GetLobbyCompanyInfo(CompanyID company
);
45 #else /* ENABLE_NETWORK */
46 /* Network function stubs when networking is disabled */
48 static inline void ShowNetworkChatQueryWindow(byte desttype
, int dest
) {}
49 static inline void ShowClientList() {}
50 static inline void ShowNetworkGameWindow() {}
51 static inline void ShowNetworkCompanyPasswordWindow(Window
*parent
) {}
53 #endif /* ENABLE_NETWORK */
55 #endif /* NETWORK_GUI_H */