mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 09:10:54 +00:00
net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
dd05f2d23b
commit
2bed6c79c9
6 changed files with 190 additions and 189 deletions
|
@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
#include "net_defs.h"
|
#include "net_defs.h"
|
||||||
|
|
||||||
#include "net_loop.h"
|
|
||||||
#include "net_dgrm.h"
|
#include "net_dgrm.h"
|
||||||
|
#include "net_loop.h"
|
||||||
|
|
||||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
{
|
{
|
||||||
|
@ -43,8 +43,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
Loop_CanSendUnreliableMessage,
|
Loop_CanSendUnreliableMessage,
|
||||||
Loop_Close,
|
Loop_Close,
|
||||||
Loop_Shutdown
|
Loop_Shutdown
|
||||||
}
|
},
|
||||||
,
|
|
||||||
{
|
{
|
||||||
"Datagram",
|
"Datagram",
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
// net_dgrm.h
|
// net_dgrm.h
|
||||||
|
|
||||||
|
|
||||||
int Datagram_Init (void);
|
int Datagram_Init (void);
|
||||||
void Datagram_Listen (qboolean state);
|
void Datagram_Listen (qboolean state);
|
||||||
void Datagram_SearchForHosts (qboolean xmit);
|
void Datagram_SearchForHosts (qboolean xmit);
|
||||||
|
|
|
@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// net_loop.c
|
// net_loop.c
|
||||||
|
|
||||||
#include "arch_def.h"
|
#include "arch_def.h"
|
||||||
|
@ -26,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "net_defs.h"
|
#include "net_defs.h"
|
||||||
#include "net_loop.h"
|
#include "net_loop.h"
|
||||||
|
|
||||||
qboolean localconnectpending = false;
|
static qboolean localconnectpending = false;
|
||||||
qsocket_t *loop_client = NULL;
|
static qsocket_t *loop_client = NULL;
|
||||||
qsocket_t *loop_server = NULL;
|
static qsocket_t *loop_server = NULL;
|
||||||
|
|
||||||
int Loop_Init (void)
|
int Loop_Init (void)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +167,7 @@ int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
|
||||||
bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
|
bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
|
||||||
|
|
||||||
if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
|
if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
|
||||||
Sys_Error("Loop_SendMessage: overflow\n");
|
Sys_Error("Loop_SendMessage: overflow");
|
||||||
|
|
||||||
buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
|
buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
|
||||||
|
|
||||||
|
@ -247,3 +248,4 @@ void Loop_Close (qsocket_t *sock)
|
||||||
else
|
else
|
||||||
loop_server = NULL;
|
loop_server = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
#include "net_defs.h"
|
#include "net_defs.h"
|
||||||
|
|
||||||
#include "net_loop.h"
|
|
||||||
#include "net_dgrm.h"
|
#include "net_dgrm.h"
|
||||||
#include "net_sdlnet.h"
|
#include "net_loop.h"
|
||||||
|
|
||||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
{
|
{
|
||||||
|
@ -46,8 +45,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
Loop_CanSendUnreliableMessage,
|
Loop_CanSendUnreliableMessage,
|
||||||
Loop_Close,
|
Loop_Close,
|
||||||
Loop_Shutdown
|
Loop_Shutdown
|
||||||
}
|
},
|
||||||
,
|
|
||||||
{
|
{
|
||||||
"Datagram",
|
"Datagram",
|
||||||
false,
|
false,
|
||||||
|
@ -68,6 +67,7 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
|
|
||||||
int net_numdrivers = 2;
|
int net_numdrivers = 2;
|
||||||
|
|
||||||
|
#include "net_sdlnet.h"
|
||||||
|
|
||||||
net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
#include "net_defs.h"
|
#include "net_defs.h"
|
||||||
|
|
||||||
#include "net_loop.h"
|
|
||||||
#include "net_dgrm.h"
|
#include "net_dgrm.h"
|
||||||
|
#include "net_loop.h"
|
||||||
|
|
||||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
{
|
{
|
||||||
|
@ -44,8 +44,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||||
Loop_CanSendUnreliableMessage,
|
Loop_CanSendUnreliableMessage,
|
||||||
Loop_Close,
|
Loop_Close,
|
||||||
Loop_Shutdown
|
Loop_Shutdown
|
||||||
}
|
},
|
||||||
,
|
|
||||||
{
|
{
|
||||||
"Datagram",
|
"Datagram",
|
||||||
false,
|
false,
|
||||||
|
@ -95,6 +95,7 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
||||||
WINS_GetSocketPort,
|
WINS_GetSocketPort,
|
||||||
WINS_SetSocketPort
|
WINS_SetSocketPort
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"Winsock IPX",
|
"Winsock IPX",
|
||||||
false,
|
false,
|
||||||
|
@ -118,7 +119,6 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
||||||
WIPX_GetSocketPort,
|
WIPX_GetSocketPort,
|
||||||
WIPX_SetSocketPort
|
WIPX_SetSocketPort
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int net_numlandrivers = 2;
|
int net_numlandrivers = 2;
|
||||||
|
|
Loading…
Reference in a new issue