2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
2009-02-10 10:01:48 -08:00
|
|
|
Copyright (C) 2005-2009 Warzone Resurrection Project
|
2007-01-15 12:09:25 -08:00
|
|
|
|
|
|
|
Warzone 2100 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; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Warzone 2100 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 Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
/*
|
|
|
|
* Netplay.h
|
|
|
|
*
|
|
|
|
* Alex Lee sep97.
|
2006-09-13 02:09:05 -07:00
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
#ifndef _netplay_h
|
|
|
|
#define _netplay_h
|
|
|
|
|
2007-08-08 11:50:28 -07:00
|
|
|
#include "nettypes.h"
|
2009-12-18 16:23:37 -08:00
|
|
|
#include <physfs.h>
|
2007-08-08 11:50:28 -07:00
|
|
|
|
2009-04-19 14:42:52 -07:00
|
|
|
// Lobby Connection errors
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ERROR_NOERROR,
|
|
|
|
ERROR_CONNECTION,
|
|
|
|
ERROR_FULL,
|
|
|
|
ERROR_CHEAT,
|
|
|
|
ERROR_KICKED,
|
2009-05-02 13:49:18 -07:00
|
|
|
ERROR_WRONGVERSION,
|
2009-10-04 19:49:58 -07:00
|
|
|
ERROR_WRONGPASSWORD, // NOTE WRONG_PASSWORD results in conflict
|
|
|
|
ERROR_HOSTDROPPED,
|
2009-12-18 16:23:37 -08:00
|
|
|
ERROR_WRONGDATA,
|
|
|
|
ERROR_UNKNOWNFILEISSUE
|
2009-04-19 14:42:52 -07:00
|
|
|
} LOBBY_ERROR_TYPES;
|
|
|
|
|
|
|
|
|
2008-02-15 12:55:38 -08:00
|
|
|
typedef enum
|
|
|
|
{
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_DROID, //0 a new droid
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_DROIDINFO, //1 update a droid order.
|
|
|
|
NET_DROIDDEST, //2 issue a droid destruction
|
|
|
|
NET_DROIDMOVE, //3 move a droid, don't change anything else though..
|
|
|
|
NET_GROUPORDER, //4 order a group of droids.
|
|
|
|
NET_TEMPLATE, //5 a new template
|
|
|
|
NET_TEMPLATEDEST, //6 remove template
|
|
|
|
NET_FEATUREDEST, //7 destroy a game feature.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_PING, //8 ping players.
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_CHECK_DROID, //9 check & update bot position and damage.
|
|
|
|
NET_CHECK_STRUCT, //10 check & update struct damage.
|
|
|
|
NET_CHECK_POWER, //11 power levels for a player.
|
|
|
|
NET_PLAYER_STATS, //12 player stats: HACK-NOTE: lib/netplay/netplay.c depends on this being 12
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_BUILD, //13 build a new structure
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_STRUCTDEST, //14 specify a strucutre to destroy
|
|
|
|
NET_BUILDFINISHED, //15 a building is complete.
|
|
|
|
NET_RESEARCH, //16 Research has been completed.
|
|
|
|
NET_TEXTMSG, //17 A simple text message between machines.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_UNUSED_18, //18
|
|
|
|
NET_UNUSED_19, //19
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_PLAYERCOMPLETE, //20 All Setup information about player x has been sent
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_UNUSED_21, //
|
|
|
|
NET_STRUCT, //22 a complete structure
|
|
|
|
NET_UNUSED_23, //
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_FEATURES, //24 information regarding features.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_PLAYERRESPONDING, //25 computer that sent this is now playing warzone!
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_OPTIONS, //26 welcome a player to a game.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_KICK, //27 kick a player .
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_SECONDARY, //28 set a droids secondary order
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_FIREUP, //29 campaign game has started, we can go too.. Shortcut message, not to be used in dmatch.
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_ALLIANCE, //30 alliance data.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_GIFT, //31 a luvly gift between players.
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_DEMOLISH, //32 a demolish is complete.
|
|
|
|
NET_COLOURREQUEST, //33 player requests a colour change.
|
|
|
|
NET_ARTIFACTS, //34 artifacts randomly placed.
|
|
|
|
NET_DMATCHWIN, //35 winner of a deathmatch. NOTUSED
|
|
|
|
NET_SCORESUBMIT, //36 submission of scores to host.
|
|
|
|
NET_DESTROYXTRA, //37 destroy droid with destroyer intact.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_VTOL, //38 vtol rearmed
|
|
|
|
NET_UNUSED_39, //
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_WHITEBOARD, //40 whiteboard.
|
|
|
|
NET_SECONDARY_ALL, //41 complete secondary order.
|
|
|
|
NET_DROIDEMBARK, //42 droid embarked on a Transporter
|
|
|
|
NET_DROIDDISEMBARK, //43 droid disembarked from a Transporter
|
|
|
|
NET_RESEARCHSTATUS, //44 research state.
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_LASSAT, //45 lassat firing.
|
2009-12-18 16:23:37 -08:00
|
|
|
NET_UNUSED_46, //46 old map request, now unused.
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_AITEXTMSG, //47 chat between AIs
|
|
|
|
NET_TEAMS_ON, //48 locked teams mode
|
|
|
|
NET_BEACONMSG, //49 place beacon
|
|
|
|
NET_SET_TEAMS, //50 set locked teams
|
|
|
|
NET_TEAMREQUEST, //51 request team membership
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_JOIN, //52 join a game
|
2008-02-15 12:55:38 -08:00
|
|
|
NET_ACCEPTED, //53 accepted into game
|
|
|
|
NET_PLAYER_INFO, //54 basic player info
|
|
|
|
NET_PLAYER_JOINED, //55 notice about player joining
|
2009-02-21 14:09:58 -08:00
|
|
|
NET_PLAYER_LEAVING, //56 A player is leaving, (nicely)
|
|
|
|
NET_PLAYER_DROPPED, //57 notice about player dropped / disconnected
|
|
|
|
NET_GAME_FLAGS, //58 game flags
|
|
|
|
NET_READY_REQUEST, //59 player ready to start an mp game
|
2009-04-10 21:41:14 -07:00
|
|
|
//60 to prevent conflict
|
|
|
|
NET_VERSION_CHECK = 61, //61 version check
|
|
|
|
NET_REQUEST_VERSION, //62 Host requests version check
|
2009-04-19 11:45:28 -07:00
|
|
|
NET_REQUEST_PASSWORD, //63 Host requests password
|
|
|
|
NET_PASSWORD_CHECK, //64 password check
|
2009-06-07 11:10:13 -07:00
|
|
|
NET_POSITIONREQUEST, //65 position in GUI player list
|
2009-10-04 19:49:58 -07:00
|
|
|
NET_DATA_CHECK, //66 Data integrity check
|
2009-11-28 12:40:53 -08:00
|
|
|
NET_HOST_DROPPED, //67 Host has dropped
|
2009-12-18 16:23:37 -08:00
|
|
|
NET_FUTURE1, //68 future use
|
|
|
|
NET_FUTURE2, //69 "
|
|
|
|
NET_FUTURE3, //70 "
|
|
|
|
NET_FILE_REQUESTED, //71 Player has requested a file (map/mod/?)
|
|
|
|
NET_FILE_CANCELLED, //72 Player cancelled a file request
|
|
|
|
NET_FILE_PAYLOAD, //73 sending file to the player that needs it
|
2009-04-10 21:41:14 -07:00
|
|
|
NUM_GAME_PACKETS // *MUST* be last.
|
2008-02-15 12:55:38 -08:00
|
|
|
} MESSAGE_TYPES;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
// Constants
|
2009-03-20 12:28:04 -07:00
|
|
|
// @NOTE / FIXME: We need a way to detect what should happen if the msg buffer exceeds this.
|
2009-11-26 10:20:40 -08:00
|
|
|
#define MaxMsgSize 16384 // max size of a message in bytes.
|
2007-06-28 10:47:08 -07:00
|
|
|
#define StringSize 64 // size of strings used.
|
2010-01-04 01:02:23 -08:00
|
|
|
#define MaxGames 12 // max number of concurrently playable games to allow.
|
2009-05-09 10:22:44 -07:00
|
|
|
#define extra_string_size 239 // extra 255 char for future use
|
2009-04-19 11:45:28 -07:00
|
|
|
#define modlist_string_size 255 // For a concatenated list of mods
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
#define SESSION_JOINDISABLED 1
|
|
|
|
|
|
|
|
typedef struct { //Available game storage... JUST FOR REFERENCE!
|
2007-05-20 15:55:12 -07:00
|
|
|
int32_t dwSize;
|
|
|
|
int32_t dwFlags;
|
2009-04-29 11:57:21 -07:00
|
|
|
char host[40]; // host's ip address (can fit a full IPv4 and IPv6 address + terminating NUL)
|
2007-05-20 15:55:12 -07:00
|
|
|
int32_t dwMaxPlayers;
|
|
|
|
int32_t dwCurrentPlayers;
|
2008-10-14 05:58:59 -07:00
|
|
|
int32_t dwUserFlags[4];
|
2007-06-28 10:47:08 -07:00
|
|
|
} SESSIONDESC;
|
|
|
|
|
2008-08-03 14:34:18 -07:00
|
|
|
/**
|
2008-09-11 11:25:34 -07:00
|
|
|
* @note when changing this structure, NETsendGAMESTRUCT, NETrecvGAMESTRUCT and
|
2008-08-03 14:34:18 -07:00
|
|
|
* the lobby server should be changed accordingly.
|
|
|
|
*/
|
2009-04-19 11:45:28 -07:00
|
|
|
typedef struct
|
|
|
|
{
|
2009-04-29 13:03:40 -07:00
|
|
|
/* Version of this structure and thus the binary lobby protocol.
|
|
|
|
* @NOTE: <em>MUST</em> be the first item of this struct.
|
|
|
|
*/
|
|
|
|
uint32_t GAMESTRUCT_VERSION;
|
|
|
|
|
2006-09-13 02:09:05 -07:00
|
|
|
char name[StringSize];
|
2007-06-28 10:47:08 -07:00
|
|
|
SESSIONDESC desc;
|
2009-04-19 11:45:28 -07:00
|
|
|
// END of old GAMESTRUCT format
|
|
|
|
// NOTE: do NOT save the following items in game.c--it will break savegames.
|
2009-05-09 10:22:44 -07:00
|
|
|
char secondaryHosts[2][40];
|
2009-04-19 11:45:28 -07:00
|
|
|
char extra[extra_string_size]; // extra string (future use)
|
|
|
|
char versionstring[StringSize]; //
|
|
|
|
char modlist[modlist_string_size]; // ???
|
|
|
|
uint32_t game_version_major; //
|
|
|
|
uint32_t game_version_minor; //
|
|
|
|
uint32_t privateGame; // if true, it is a private game
|
|
|
|
uint32_t pureGame; // NO mods allowed if true
|
|
|
|
uint32_t Mods; // number of concatenated mods?
|
2009-05-09 10:22:44 -07:00
|
|
|
// Game ID, used on the lobby server to link games with multiple address families to eachother
|
|
|
|
uint32_t gameId;
|
2009-04-19 11:45:28 -07:00
|
|
|
uint32_t future2; // for future use
|
|
|
|
uint32_t future3; // for future use
|
|
|
|
uint32_t future4; // for future use
|
2007-06-28 10:47:08 -07:00
|
|
|
} GAMESTRUCT;
|
|
|
|
|
|
|
|
// ////////////////////////////////////////////////////////////////////////
|
|
|
|
// Message information. ie. the packets sent between machines.
|
|
|
|
|
|
|
|
#define NET_ALL_PLAYERS 255
|
2009-06-07 11:10:13 -07:00
|
|
|
#define NET_HOST_ONLY 0
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
typedef struct {
|
2009-03-20 12:28:04 -07:00
|
|
|
uint16_t size; // used size of body
|
|
|
|
uint8_t type; // type of packet
|
|
|
|
uint8_t destination; // player to send to, or NET_ALL_PLAYERS
|
|
|
|
uint8_t source; // player it is sent from
|
|
|
|
char body[MaxMsgSize]; // msg buffer
|
|
|
|
BOOL status; // If the packet compiled or not (this is _not_ sent!)
|
2007-06-24 06:38:22 -07:00
|
|
|
} NETMSG;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2009-12-18 16:23:37 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
PHYSFS_file *pFileHandle; // handle
|
|
|
|
PHYSFS_sint32 fileSize_32; // size
|
|
|
|
int32_t currPos; // current position
|
|
|
|
BOOL isSending; // sending to this player
|
|
|
|
BOOL isCancelled; // player cancelled
|
|
|
|
int32_t filetype; // future use (1=map 2=mod 3=...)
|
|
|
|
} WZFile;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2009-12-18 16:23:37 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int32_t player; // the client we sent data to
|
|
|
|
int32_t done; // how far done we are (100= finished)
|
|
|
|
int32_t byteCount; // current byte count
|
|
|
|
} wzFileStatus;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
WZ_FILE_OK,
|
|
|
|
ALREADY_HAVE_FILE,
|
|
|
|
STUCK_IN_FILE_LOOP
|
|
|
|
} wzFileEnum;
|
2007-06-28 10:47:08 -07:00
|
|
|
// ////////////////////////////////////////////////////////////////////////
|
2009-06-07 11:10:13 -07:00
|
|
|
// Player information. Filled when players join, never re-ordered. selectedPlayer global points to
|
|
|
|
// currently controlled player. This array is indexed by GUI slots in pregame.
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char name[StringSize]; ///< Player name
|
|
|
|
int32_t position; ///< Map starting position
|
|
|
|
int32_t colour; ///< Which colour slot this player is using
|
2009-07-12 03:36:32 -07:00
|
|
|
BOOL allocated; ///< Allocated as a human player
|
2009-06-07 11:10:13 -07:00
|
|
|
uint32_t heartattacktime; ///< Time cardiac arrest started
|
|
|
|
BOOL heartbeat; ///< If we are still alive or not
|
|
|
|
BOOL kick; ///< If we should kick them
|
|
|
|
int32_t connection; ///< Index into connection list
|
|
|
|
int32_t team; ///< Which team we are on
|
|
|
|
BOOL ready; ///< player ready to start?
|
|
|
|
uint32_t versionCheckTime; ///< Time when check sent. Uses 0xffffffff for nothing sent yet
|
|
|
|
BOOL playerVersionFlag; ///< We kick on false
|
2009-12-18 16:23:37 -08:00
|
|
|
BOOL needFile; ///< if We need a file sent to us
|
|
|
|
WZFile wzFile; ///< for each player, we keep track of map progress
|
2007-06-28 10:47:08 -07:00
|
|
|
} PLAYER;
|
|
|
|
|
|
|
|
// ////////////////////////////////////////////////////////////////////////
|
|
|
|
// all the luvly Netplay info....
|
|
|
|
typedef struct {
|
2009-06-07 11:10:13 -07:00
|
|
|
GAMESTRUCT games[MaxGames]; ///< The collection of games
|
|
|
|
PLAYER players[MAX_PLAYERS]; ///< The array of players.
|
|
|
|
uint32_t playercount; ///< Number of players in game.
|
|
|
|
uint32_t hostPlayer; ///< Index of host in player array
|
|
|
|
uint32_t bComms; ///< Actually do the comms?
|
|
|
|
BOOL isHost; ///< True if we are hosting the game
|
|
|
|
int32_t maxPlayers; ///< Maximum number of players in this game
|
2009-12-18 16:13:42 -08:00
|
|
|
BOOL isUPNP; // if we want the UPnP detection routines to run
|
2009-12-18 16:37:09 -08:00
|
|
|
BOOL isHostAlive; /// if the host is still alive
|
2009-04-19 11:45:28 -07:00
|
|
|
char gamePassword[StringSize]; //
|
|
|
|
bool GamePassworded; // if we have a password or not.
|
|
|
|
bool ShowedMOTD; // only want to show this once
|
2009-06-07 11:10:13 -07:00
|
|
|
char MOTDbuffer[255]; // buffer for MOTD
|
2009-05-04 14:52:01 -07:00
|
|
|
char* MOTD;
|
2007-07-15 06:48:22 -07:00
|
|
|
} NETPLAY;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
// ////////////////////////////////////////////////////////////////////////
|
|
|
|
// variables
|
|
|
|
|
|
|
|
extern NETPLAY NetPlay;
|
2007-08-08 11:50:28 -07:00
|
|
|
extern NETMSG NetMsg;
|
|
|
|
|
2009-12-03 21:50:40 -08:00
|
|
|
// update flags
|
|
|
|
extern bool netPlayersUpdated;
|
|
|
|
extern int mapDownloadProgress;
|
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
// ////////////////////////////////////////////////////////////////////////
|
|
|
|
// functions available to you.
|
2008-04-11 11:35:53 -07:00
|
|
|
extern int NETinit(BOOL bFirstCall); // init
|
2009-02-21 14:09:58 -08:00
|
|
|
extern BOOL NETsend(NETMSG *msg, UDWORD player); // send to player
|
2008-03-24 09:02:11 -07:00
|
|
|
extern BOOL NETbcast(NETMSG *msg); // broadcast to everyone
|
2008-02-13 12:25:12 -08:00
|
|
|
extern BOOL NETrecv(uint8_t *type); // recv a message if possible
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2009-12-18 16:23:37 -08:00
|
|
|
extern UBYTE NETsendFile(char *fileName, UDWORD player); // send file chunk.
|
2008-01-11 13:39:41 -08:00
|
|
|
extern UBYTE NETrecvFile(void); // recv file chunk
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2009-06-07 11:10:13 -07:00
|
|
|
extern int NETclose(void); // close current game
|
2008-04-11 11:35:53 -07:00
|
|
|
extern int NETshutdown(void); // leave the game in play.
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2009-11-21 11:04:16 -08:00
|
|
|
extern void NETaddRedirects(void);
|
|
|
|
extern void NETremRedirects(void);
|
2010-01-05 15:31:55 -08:00
|
|
|
extern void NETdiscoverUPnPDevices(void);
|
2009-11-21 11:04:16 -08:00
|
|
|
|
2009-02-21 14:09:58 -08:00
|
|
|
extern UDWORD NETgetBytesSent(void); // return bytes sent/recv. call regularly for good results
|
|
|
|
extern UDWORD NETgetPacketsSent(void); // return packets sent/recv. call regularly for good results
|
2006-09-13 02:09:05 -07:00
|
|
|
extern UDWORD NETgetBytesRecvd(void); // return bytes sent/recv. call regularly for good results
|
|
|
|
extern UDWORD NETgetPacketsRecvd(void); // return packets sent/recv. call regularly for good results
|
2009-02-21 14:09:58 -08:00
|
|
|
extern UDWORD NETgetRecentBytesSent(void); // more immediate functions.
|
2006-09-13 02:09:05 -07:00
|
|
|
extern UDWORD NETgetRecentPacketsSent(void);
|
|
|
|
extern UDWORD NETgetRecentBytesRecvd(void);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
// from netjoin.c
|
2006-11-04 15:16:51 -08:00
|
|
|
extern SDWORD NETgetGameFlags(UDWORD flag); // return one of the four flags(dword) about the game.
|
2008-10-14 05:58:59 -07:00
|
|
|
extern int32_t NETgetGameFlagsUnjoined(unsigned int gameid, unsigned int flag); // return one of the four flags(dword) about the game.
|
2006-11-04 15:16:51 -08:00
|
|
|
extern BOOL NETsetGameFlags(UDWORD flag, SDWORD value); // set game flag(1-4) to value.
|
2006-09-13 02:09:05 -07:00
|
|
|
extern BOOL NEThaltJoining(void); // stop new players joining this game
|
2007-05-13 10:31:12 -07:00
|
|
|
extern BOOL NETfindGame(void); // find games being played(uses GAME_GUID);
|
2006-11-03 17:11:26 -08:00
|
|
|
extern BOOL NETjoinGame(UDWORD gameNumber, const char* playername); // join game given with playername
|
|
|
|
extern BOOL NEThostGame(const char* SessionName, const char* PlayerName,// host a game
|
2006-11-04 15:16:51 -08:00
|
|
|
SDWORD one, SDWORD two, SDWORD three, SDWORD four, UDWORD plyrs);
|
2009-06-07 11:10:13 -07:00
|
|
|
extern BOOL NETchangePlayerName(UDWORD player, char *newName);// change a players name.
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2006-04-08 12:14:30 -07:00
|
|
|
#include "netlog.h"
|
|
|
|
|
2007-04-21 06:46:28 -07:00
|
|
|
extern void NETsetMasterserverName(const char* hostname);
|
2009-04-19 18:56:53 -07:00
|
|
|
extern const char* NETgetMasterserverName(void);
|
2007-04-21 06:46:28 -07:00
|
|
|
extern void NETsetMasterserverPort(unsigned int port);
|
2009-04-19 18:56:53 -07:00
|
|
|
extern unsigned int NETgetMasterserverPort(void);
|
2007-04-21 06:46:28 -07:00
|
|
|
extern void NETsetGameserverPort(unsigned int port);
|
2009-04-19 18:56:53 -07:00
|
|
|
extern unsigned int NETgetGameserverPort(void);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2008-02-13 09:22:43 -08:00
|
|
|
extern BOOL NETsetupTCPIP(const char *machine);
|
2009-04-19 11:45:28 -07:00
|
|
|
extern void NETsetGamePassword(const char *password);
|
2009-06-07 11:10:13 -07:00
|
|
|
extern void NETBroadcastPlayerInfo(uint32_t index);
|
|
|
|
extern void NETCheckVersion(uint32_t player);
|
2010-01-04 03:05:37 -08:00
|
|
|
extern bool NETisCorrectVersion(uint32_t game_version_major, uint32_t game_version_minor);
|
|
|
|
extern bool NETgameIsCorrectVersion(GAMESTRUCT* check_game);
|
2009-06-07 11:10:13 -07:00
|
|
|
extern void NET_InitPlayers(void);
|
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
#endif
|