[chocolate-doom] 74/79: Remove new networking code from stable version

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit 6b974721716d00fac70cab3671cc0de75af339e2
Author: Simon Howard <fraggle at gmail.com>
Date:   Fri Jan 20 00:58:17 2006 +0000

    Remove new networking code from stable version
    
    Subversion-branch: /branches/CHOCOLATE_DOOM_0_1/chocolate-doom
    Subversion-revision: 302
---
 src/Makefile.am |  10 ----
 src/d_main.c    |  11 ++--
 src/d_net.c     |  51 ++---------------
 src/m_misc.c    |   9 +--
 src/net_defs.h  | 171 --------------------------------------------------------
 5 files changed, 15 insertions(+), 237 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index c34bba5..345ca0c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,16 +57,6 @@ m_misc.c             m_misc.h              \
 mmus2mid.c           mmus2mid.h            \
 m_random.c           m_random.h            \
 m_swap.c             m_swap.h              \
-net_client.c         net_client.h          \
-net_common.c         net_common.h          \
-net_defs.h                                 \
-net_gui.c            net_gui.h             \
-net_io.c             net_io.h              \
-net_loop.c           net_loop.h            \
-net_packet.c         net_packet.h          \
-net_sdl.c            net_sdl.h             \
-net_server.c         net_server.h          \
-net_structrw.c       net_structrw.h        \
 p_ceilng.c                                 \
 p_doors.c                                  \
 p_enemy.c                                  \
diff --git a/src/d_main.c b/src/d_main.c
index b683687..1c04137 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_main.c 295 2006-01-14 02:06:48Z fraggle $
+// $Id: d_main.c 302 2006-01-20 00:58:17Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.39.2.1  2006/01/20 00:58:17  fraggle
+// Remove new networking code from stable version
+//
 // Revision 1.39  2006/01/14 02:06:48  fraggle
 // Include the game version in the settings structure.
 //
@@ -173,7 +176,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_main.c 295 2006-01-14 02:06:48Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 302 2006-01-20 00:58:17Z fraggle $";
 
 #define	BGCOLOR		7
 #define	FGCOLOR		8
@@ -226,7 +229,6 @@ static const char rcsid[] = "$Id: d_main.c 295 2006-01-14 02:06:48Z fraggle $";
 #include "wi_stuff.h"
 #include "st_stuff.h"
 #include "am_map.h"
-#include "net_client.h"
 
 #include "p_setup.h"
 #include "r_local.h"
@@ -1589,9 +1591,6 @@ void D_DoomMain (void)
     printf ("I_Init: Setting up machine state.\n");
     I_Init ();
 
-    printf ("NET_Init: Initialise network subsystem.\n");
-    NET_Init ();
-
     printf ("D_CheckNetGame: Checking network game status.\n");
     D_CheckNetGame ();
 
diff --git a/src/d_net.c b/src/d_net.c
index 7327850..c7ff111 100644
--- a/src/d_net.c
+++ b/src/d_net.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_net.c 291 2006-01-13 23:56:00Z fraggle $
+// $Id: d_net.c 302 2006-01-20 00:58:17Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.16.2.1  2006/01/20 00:58:17  fraggle
+// Remove new networking code from stable version
+//
 // Revision 1.16  2006/01/13 23:56:00  fraggle
 // Add text-mode I/O functions.
 // Use text-mode screen for the waiting screen.
@@ -89,7 +92,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_net.c 291 2006-01-13 23:56:00Z fraggle $";
+static const char rcsid[] = "$Id: d_net.c 302 2006-01-20 00:58:17Z fraggle $";
 
 
 #include "d_main.h"
@@ -102,13 +105,6 @@ static const char rcsid[] = "$Id: d_net.c 291 2006-01-13 23:56:00Z fraggle $";
 #include "doomdef.h"
 #include "doomstat.h"
 
-#include "net_client.h"
-#include "net_gui.h"
-#include "net_io.h"
-#include "net_server.h"
-#include "net_sdl.h"
-#include "net_loop.h"
-
 #define	NCMD_EXIT		0x80000000
 #define	NCMD_RETRANSMIT		0x40000000
 #define	NCMD_SETUP		0x20000000
@@ -448,11 +444,6 @@ void NetUpdate (void)
     int				realstart;
     int				gameticdiv;
     
-    // Temporary hack - hook new client/server code into Doom
-
-    NET_CL_Run();
-    NET_SV_Run();
-    
     // check time
     nowtime = I_GetTime ()/ticdup;
     newtics = nowtime - gametime;
@@ -633,37 +624,8 @@ extern	int			viewangleoffset;
 
 void D_CheckNetGame (void)
 {
-    net_addr_t *addr = NULL;
     int             i;
 
-    // temporary hack 
-
-    if (M_CheckParm("-server") > 0)
-    {
-        NET_SV_Init();
-
-        addr = net_loop_client_module.ResolveAddress("");
-    }
-
-    if (M_CheckParm("-client") > 0)
-    {
-        addr = net_sdl_module.ResolveAddress("127.0.0.1");
-    }
-   
-    if (addr != NULL)
-    {
-        if (NET_CL_Connect(addr))
-        {
-            printf("connected to %s\n", NET_AddrToString(addr));
-
-            NET_WaitForStart();
-        }
-        else
-        {
-            printf("failed to connect\n");
-        }
-    }
-
     for (i=0 ; i<MAXNETNODES ; i++)
     {
 	nodeingame[i] = false;
@@ -714,9 +676,6 @@ void D_QuitNetGame (void)
     if (debugfile)
 	fclose (debugfile);
 
-    NET_SV_Shutdown();
-    NET_CL_Disconnect();
-
     if (!netgame || !usergame || consoleplayer == -1 || demoplayback)
 	return;
 	
diff --git a/src/m_misc.c b/src/m_misc.c
index f4db150..05d0d3a 100644
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_misc.c 280 2006-01-10 22:14:13Z fraggle $
+// $Id: m_misc.c 302 2006-01-20 00:58:17Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -23,6 +23,9 @@
 //
 //
 // $Log$
+// Revision 1.17.2.1  2006/01/20 00:58:17  fraggle
+// Remove new networking code from stable version
+//
 // Revision 1.17  2006/01/10 22:14:13  fraggle
 // Shut up compiler warnings
 //
@@ -98,7 +101,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_misc.c 280 2006-01-10 22:14:13Z fraggle $";
+rcsid[] = "$Id: m_misc.c 302 2006-01-20 00:58:17Z fraggle $";
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -120,7 +123,6 @@ rcsid[] = "$Id: m_misc.c 280 2006-01-10 22:14:13Z fraggle $";
 
 #include "m_swap.h"
 #include "m_argv.h"
-#include "net_client.h"
 
 #include "w_wad.h"
 
@@ -391,7 +393,6 @@ static default_t extra_defaults_list[] =
     {"novert",             &novert},
     {"mouse_acceleration", &mouse_acceleration,   DEFAULT_FLOAT},
     {"show_endoom",        &show_endoom},
-    {"player_name",        &net_player_name,      DEFAULT_STRING},
 };
 
 static default_collection_t extra_defaults =
diff --git a/src/net_defs.h b/src/net_defs.h
deleted file mode 100644
index be4ad0d..0000000
--- a/src/net_defs.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: net_defs.h 295 2006-01-14 02:06:48Z fraggle $
-//
-// Copyright(C) 2005 Simon Howard
-//
-// This program 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.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
-//
-// $Log$
-// Revision 1.9  2006/01/14 02:06:48  fraggle
-// Include the game version in the settings structure.
-//
-// Revision 1.8  2006/01/11 01:37:53  fraggle
-// ticcmd diffs: allow compare and patching ticcmds, and reading/writing
-// ticdiffs to packets.
-//
-// Revision 1.7  2006/01/10 19:59:26  fraggle
-// Reliable packet transport mechanism
-//
-// Revision 1.6  2006/01/08 04:52:26  fraggle
-// Allow the server to reject clients
-//
-// Revision 1.5  2006/01/08 02:53:05  fraggle
-// Send keepalives if the connection is not doing anything else.
-// Send all packets using a new NET_Conn_SendPacket to support this.
-//
-// Revision 1.4  2006/01/01 23:54:31  fraggle
-// Client disconnect code
-//
-// Revision 1.3  2005/12/30 18:58:22  fraggle
-// Fix client code to correctly send reply to server on connection.
-// Add "waiting screen" while waiting for the game to start.
-// Hook in the new networking code into the main game code.
-//
-// Revision 1.2  2005/12/29 17:48:25  fraggle
-// Add initial client/server connect code.  Reorganise sources list in
-// Makefile.am.
-//
-// Revision 1.1  2005/10/30 19:56:15  fraggle
-// Add foundation code for the new networking system
-//
-//
-// DESCRIPTION:
-//     Definitions for use in networking code.
-//
-//-----------------------------------------------------------------------------
-
-#ifndef NET_DEFS_H
-#define NET_DEFS_H 
-
-#include "doomtype.h"
-#include "d_ticcmd.h"
-
-typedef struct _net_module_s net_module_t;
-typedef struct _net_packet_s net_packet_t;
-typedef struct _net_addr_s net_addr_t;
-typedef struct _net_context_s net_context_t;
-
-struct _net_packet_s
-{
-    byte *data;
-    int len;
-    int alloced;
-    int pos;
-};
-
-struct _net_module_s
-{
-    // Initialise this module for use as a client
-
-    boolean (*InitClient)(void);
-
-    // Initialise this module for use as a server
-
-    boolean (*InitServer)(void);
-
-    // Send a packet
-
-    void (*SendPacket)(net_addr_t *addr, net_packet_t *packet);
-
-    // Check for new packets to receive
-    //
-    // Returns true if packet received
-
-    boolean (*RecvPacket)(net_addr_t **addr, net_packet_t **packet);
-
-    // Converts an address to a string
-
-    void (*AddrToString)(net_addr_t *addr, char *buffer, int buffer_len);
-
-    // Free back an address when no longer in use
-
-    void (*FreeAddress)(net_addr_t *addr);
-
-    // Try to resolve a name to an address
-
-    net_addr_t *(*ResolveAddress)(char *addr);
-};
-
-// net_addr_t
-
-struct _net_addr_s
-{
-    net_module_t *module;
-    void *handle;
-};
-
-// magic number sent when connecting to check this is a valid client
-
-#define NET_MAGIC_NUMBER 3436803284U
-
-// header field value indicating that the packet is a reliable packet
-
-#define NET_RELIABLE_PACKET (1 << 15)
-
-// packet types
-
-typedef enum 
-{
-    NET_PACKET_TYPE_SYN,
-    NET_PACKET_TYPE_ACK,
-    NET_PACKET_TYPE_REJECTED,
-    NET_PACKET_TYPE_KEEPALIVE,
-    NET_PACKET_TYPE_WAITING_DATA,
-    NET_PACKET_TYPE_GAMESTART,
-    NET_PACKET_TYPE_GAMEDATA,
-    NET_PACKET_TYPE_DISCONNECT,
-    NET_PACKET_TYPE_DISCONNECT_ACK,
-    NET_PACKET_TYPE_RELIABLE_ACK,
-} net_packet_type_t;
-
-typedef struct 
-{
-    int ticdup;
-    int extratics;
-    int deathmatch;
-    int episode;
-    int map;
-    int skill;
-    int gameversion;
-} net_gamesettings_t;
-
-#define NET_TICDIFF_FORWARD      (1 << 0)
-#define NET_TICDIFF_SIDE         (1 << 1)
-#define NET_TICDIFF_TURN         (1 << 2)
-#define NET_TICDIFF_BUTTONS      (1 << 3)
-#define NET_TICDIFF_CONSISTANCY  (1 << 4)
-#define NET_TICDIFF_CHATCHAR     (1 << 5)
-
-typedef struct
-{
-    unsigned int diff;
-    ticcmd_t cmd;
-} net_ticdiff_t;
-
-#endif /* #ifndef NET_DEFS_H */
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list