From 7e3e0fd95d01a50a2c0f184a86d3fe9bafffdbab Mon Sep 17 00:00:00 2001 From: Felix Rueegg Date: Thu, 31 Oct 2013 21:44:58 +0100 Subject: [PATCH] Removed doomclassic networking functions --- doomclassic/doom/doomlib.cpp | 10 ++++++---- doomclassic/doom/doomlib.h | 14 +++++++------- doomclassic/doom/i_net_win32.cpp | 5 +++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/doomclassic/doom/doomlib.cpp b/doomclassic/doom/doomlib.cpp index 5952897f..9cbd8baf 100644 --- a/doomclassic/doom/doomlib.cpp +++ b/doomclassic/doom/doomlib.cpp @@ -141,9 +141,9 @@ namespace DoomLib Globals *globaldata[4]; - RecvFunc Recv; - SendFunc Send; - SendRemoteFunc SendRemote; + //RecvFunc Recv; + //SendFunc Send; + //SendRemoteFunc SendRemote; bool Active = true; @@ -419,12 +419,14 @@ void DoomLib::SetPlayer( int id ) } } +#if 0 void DoomLib::SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote ) { Recv = rf; Send = sf; SendRemote = sendRemote; } +#endif int DoomLib::GetPlayer() { @@ -544,7 +546,7 @@ void DoomLib::SendNetwork() { if ( !globalNetworking ) { return; } - DoomLib::SendRemote(); + //DoomLib::SendRemote(); } void DoomLib::RunSound() { diff --git a/doomclassic/doom/doomlib.h b/doomclassic/doom/doomlib.h index 1af57c05..c03cf5e8 100644 --- a/doomclassic/doom/doomlib.h +++ b/doomclassic/doom/doomlib.h @@ -93,9 +93,9 @@ struct ExpansionData { namespace DoomLib { - typedef int ( *RecvFunc)( char* buff, DWORD *numRecv ); - typedef int ( *SendFunc)( const char* buff, DWORD size, sockaddr_in *target, int toNode ); - typedef int ( *SendRemoteFunc)(); + //typedef int ( *RecvFunc)( char* buff, DWORD *numRecv ); + //typedef int ( *SendFunc)( const char* buff, DWORD size, sockaddr_in *target, int toNode ); + //typedef int ( *SendRemoteFunc)(); void InitGlobals( void *ptr = NULL ); void InitGame( int argc, char ** argv ); @@ -108,7 +108,7 @@ namespace DoomLib void Draw(); void Shutdown(); - void SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote ); + //void SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote ); void SetPlayer( int id ); int GetPlayer(); @@ -126,9 +126,9 @@ namespace DoomLib void RunSound(); - extern RecvFunc Recv; - extern SendFunc Send; - extern SendRemoteFunc SendRemote; + //extern RecvFunc Recv; + //extern SendFunc Send; + //extern SendRemoteFunc SendRemote; extern void* (*Z_Malloc)( int size, int tag, void* user ); extern void (*Z_FreeTag)(int lowtag ); diff --git a/doomclassic/doom/i_net_win32.cpp b/doomclassic/doom/i_net_win32.cpp index b97a7506..fcea41d6 100644 --- a/doomclassic/doom/i_net_win32.cpp +++ b/doomclassic/doom/i_net_win32.cpp @@ -84,7 +84,8 @@ int DOOMPORT = 1002; // DHM - Nerve :: On original XBox, ports 1000 - 1255 saved unsigned long GetServerIP() { - return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr; + //return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr; + return 0; } void (*netget) (void); @@ -99,7 +100,7 @@ int UDPsocket (void) int s; // allocate a socket - s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); + //s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); if ( !IsValidSocket( s ) ) { int err = GetLastSocketError(); I_Error( "can't create socket, error %d", err );