2006-09-01 13:35:43 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
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 */
|