| 1 |
$#include "network.h" |
| 2 |
|
| 3 |
void InitNetwork1(void); |
| 4 |
void ExitNetwork1(void); |
| 5 |
|
| 6 |
bool IsNetworkGame(); |
| 7 |
|
| 8 |
int NetworkSetupServerAddress(const std::string serveraddr); |
| 9 |
void NetworkInitClientConnect(void); |
| 10 |
void NetworkInitServerConnect(int openslots); |
| 11 |
void NetworkServerStartGame(void); |
| 12 |
void NetworkProcessClientRequest(void); |
| 13 |
$int GetNetworkState() {return (int)NetLocalState;} |
| 14 |
int GetNetworkState(); |
| 15 |
void NetworkServerResyncClients(void); |
| 16 |
void NetworkDetachFromServer(void); |
| 17 |
|
| 18 |
class CServerSetup { |
| 19 |
unsigned char ResourcesOption; |
| 20 |
unsigned char UnitsOption; |
| 21 |
unsigned char FogOfWar; |
| 22 |
unsigned char RevealMap; |
| 23 |
unsigned char GameTypeOption; |
| 24 |
unsigned char Difficulty; |
| 25 |
unsigned char MapRichness; |
| 26 |
unsigned CompOpt[PlayerMax]; |
| 27 |
unsigned Ready[PlayerMax]; |
| 28 |
unsigned long LastFrame[PlayerMax]; |
| 29 |
}; |
| 30 |
extern CServerSetup LocalSetupState; |
| 31 |
extern CServerSetup ServerSetupState; |
| 32 |
extern int NetLocalHostsSlot; |
| 33 |
tolua_readonly int NetPlayerNameSize; |
| 34 |
struct CNetworkHost { |
| 35 |
unsigned long Host; /// Host address |
| 36 |
unsigned short Port; /// Port on host |
| 37 |
unsigned short PlyNr; /// Player nummer |
| 38 |
char PlyName[NetPlayerNameSize]; /// Name of player |
| 39 |
}; |
| 40 |
extern CNetworkHost Hosts[PlayerMax]; |
| 41 |
|
| 42 |
$extern string NetworkMapName; |
| 43 |
string NetworkMapName; |
| 44 |
|
| 45 |
$void NetworkGamePrepareGameSettings(void); |
| 46 |
void NetworkGamePrepareGameSettings(void); |
| 47 |
|