shithub: choc

Download patch

ref: 65b4f070df684851e8c5fdcb9d7721c8e9e23816
parent: c04e3c8be21e3819e2c75f2b6154728c4dd0a72b
author: Simon Howard <[email protected]>
date: Wed Sep 24 15:12:59 EDT 2008

Add I_InitNetwork function into d_net.c temporarily.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1275

--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -580,6 +580,28 @@
 }
 
 /*
+====================
+=
+= I_InitNetwork
+=
+====================
+*/
+
+static void I_InitNetwork(void)
+{
+    doomcom = malloc(sizeof(*doomcom));
+    memset(doomcom, 0, sizeof(*doomcom));
+    netgame = false;
+    doomcom->id = DOOMCOM_ID;
+    doomcom->numplayers = 1;
+    doomcom->numnodes = 1;
+    doomcom->deathmatch = false;
+    doomcom->consoleplayer = 0;
+    doomcom->ticdup = 1;
+    doomcom->extratics = 0;
+}
+
+/*
 ===================
 =
 = D_CheckNetGame
@@ -603,9 +625,7 @@
     }
 
 // I_InitNetwork sets doomcom and netgame
-#ifdef I_NET
     I_InitNetwork();
-#endif 
     if (doomcom->id != DOOMCOM_ID)
         I_Error("Doomcom buffer invalid!");
     netbuffer = &doomcom->data;
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -682,14 +682,6 @@
 // asyncronous interrupt functions should maintain private ques that are
 // read by the syncronous functions to be converted into events
 
-void I_Init(void);
-// called by D_DoomMain
-// determines the hardware configuration and sets up the video mode
-
-void I_InitNetwork(void);
-void I_NetCmd(void);
-
-void I_Update(void);
 // Copy buffer to video
 
 byte *I_AllocLow(int length);