2006-09-01 13:35:43 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file network_gui.h GUIs related to networking. */
|
|
|
|
|
2006-09-01 13:35:43 +00:00
|
|
|
#ifndef NETWORK_GUI_H
|
|
|
|
#define NETWORK_GUI_H
|
|
|
|
|
2006-10-12 14:59:27 +00:00
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
|
|
2008-05-30 18:20:26 +00:00
|
|
|
#include "../window_type.h"
|
|
|
|
#include "network_type.h"
|
2006-10-12 14:59:27 +00:00
|
|
|
|
2006-09-01 13:35:43 +00:00
|
|
|
void ShowNetworkNeedPassword(NetworkPasswordType npt);
|
2008-09-30 20:39:50 +00:00
|
|
|
void ShowNetworkGiveMoneyWindow(CompanyID company);
|
2007-04-26 07:41:24 +00:00
|
|
|
void ShowNetworkChatQueryWindow(DestType type, int dest);
|
2007-03-07 11:47:46 +00:00
|
|
|
void ShowJoinStatusWindow();
|
|
|
|
void ShowNetworkGameWindow();
|
|
|
|
void ShowClientList();
|
2008-05-15 19:24:15 +00:00
|
|
|
void ShowNetworkCompanyPasswordWindow(Window *parent);
|
2006-10-12 14:59:27 +00:00
|
|
|
|
2008-12-22 18:40:57 +00:00
|
|
|
|
|
|
|
/** Company information stored at the client side */
|
|
|
|
struct NetworkCompanyInfo : NetworkCompanyStats {
|
|
|
|
char company_name[NETWORK_COMPANY_NAME_LENGTH]; ///< Company name
|
|
|
|
Year inaugurated_year; ///< What year the company started in
|
|
|
|
Money company_value; ///< The company value
|
|
|
|
Money money; ///< The amount of money the company has
|
|
|
|
Money income; ///< How much did the company earned last year
|
|
|
|
uint16 performance; ///< What was his performance last month?
|
|
|
|
bool use_password; ///< Is there a password
|
|
|
|
char clients[NETWORK_CLIENTS_LENGTH]; ///< The clients that control this company (Name1, name2, ..)
|
|
|
|
};
|
|
|
|
|
|
|
|
NetworkCompanyInfo *GetLobbyCompanyInfo(CompanyID company);
|
|
|
|
|
2006-10-12 14:59:27 +00:00
|
|
|
#else /* ENABLE_NETWORK */
|
|
|
|
/* Network function stubs when networking is disabled */
|
|
|
|
|
2007-04-26 07:41:24 +00:00
|
|
|
static inline void ShowNetworkChatQueryWindow(byte desttype, int dest) {}
|
2007-03-07 11:47:46 +00:00
|
|
|
static inline void ShowClientList() {}
|
|
|
|
static inline void ShowNetworkGameWindow() {}
|
2008-05-15 19:24:15 +00:00
|
|
|
static inline void ShowNetworkCompanyPasswordWindow(Window *parent) {}
|
2006-10-12 14:59:27 +00:00
|
|
|
|
|
|
|
#endif /* ENABLE_NETWORK */
|
2006-09-01 13:35:43 +00:00
|
|
|
|
2006-09-28 18:42:35 +00:00
|
|
|
#endif /* NETWORK_GUI_H */
|