summaryrefslogtreecommitdiff
path: root/src/hexen/h2def.h
diff options
context:
space:
mode:
authorSimon Howard2011-10-14 18:14:34 +0000
committerSimon Howard2011-10-14 18:14:34 +0000
commit2344223e648ca693945fe014bb3162c272bf27ec (patch)
tree53269b0822b53fbef073bd4c4bea180d48d7907c /src/hexen/h2def.h
parent031c8ff2d2dcb1a94d730d28555989722aeffdea (diff)
downloadchocolate-doom-2344223e648ca693945fe014bb3162c272bf27ec.tar.gz
chocolate-doom-2344223e648ca693945fe014bb3162c272bf27ec.tar.bz2
chocolate-doom-2344223e648ca693945fe014bb3162c272bf27ec.zip
Convert Hexen to use common main loop code. Working multiplayer!
Subversion-branch: /branches/v2-branch Subversion-revision: 2423
Diffstat (limited to 'src/hexen/h2def.h')
-rw-r--r--src/hexen/h2def.h65
1 files changed, 4 insertions, 61 deletions
diff --git a/src/hexen/h2def.h b/src/hexen/h2def.h
index faa2d3f8..644c19e8 100644
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -53,6 +53,9 @@
#include "tables.h"
+#include "d_loop.h"
+#include "net_defs.h"
+
#define HEXEN_VERSION 110
#define HEXEN_VERSION_TEXT "v1.1"
@@ -95,7 +98,6 @@
*/
//#define NUMARTIFCTS 28
-#define MAXPLAYERS 8
#define BT_ATTACK 1
#define BT_USE 2
@@ -575,59 +577,6 @@ typedef struct player_s
#define CF_GODMODE 2
#define CF_NOMOMENTUM 4 // not really a cheat, just a debug aid
-
-#define BACKUPTICS 12
-
-typedef struct
-{
- unsigned checksum; // high bit is retransmit request
- byte retransmitfrom; // only valid if NCMD_RETRANSMIT
- byte starttic;
- byte player, numtics;
- ticcmd_t cmds[BACKUPTICS];
-} doomdata_t;
-
-typedef struct
-{
- int id;
- short intnum; // DOOM executes an int to execute commands
-
-// communication between DOOM and the driver
- short command; // CMD_SEND or CMD_GET
- short remotenode; // dest for send, set by get (-1 = no packet)
- short datalength; // bytes in doomdata to be sent
-
-// info common to all nodes
- short numnodes; // console is allways node 0
- short ticdup; // 1 = no duplication, 2-5 = dup for slow nets
- short extratics; // 1 = send a backup tic in every packet
- short deathmatch; // 1 = deathmatch
- short savegame; // -1 = new game, 0-5 = load savegame
- short episode; // 1-3
- short map; // 1-9
- short skill; // 1-5
-
-// info specific to this node
- short consoleplayer;
- short numplayers;
- short angleoffset; // 1 = left, 0 = center, -1 = right
- short drone; // 1 = drone
-
-// packet data to be sent
- doomdata_t data;
-} doomcom_t;
-
-#define DOOMCOM_ID 0x12345678l
-
-extern doomcom_t *doomcom;
-extern doomdata_t *netbuffer; // points inside doomcom
-
-#define MAXNETNODES 16 // max computers in a game
-
-#define CMD_SEND 1
-#define CMD_GET 2
-#define CMD_FRAG 3
-
#define SBARHEIGHT 39 // status bar height at bottom of screen
void NET_SendFrags(player_t * player);
@@ -705,15 +654,9 @@ extern int prevmap;
extern int levelstarttic; // gametic at level start
extern int leveltime; // tics in game play for par
-extern ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
-extern int ticdup;
-
-//#define MAXNETNODES 8
+extern ticcmd_t *netcmds;
-extern ticcmd_t localcmds[BACKUPTICS];
extern int rndindex;
-extern int gametic, maketic;
-extern int nettics[MAXNETNODES];
#define MAXDEATHMATCHSTARTS 16
extern mapthing_t *deathmatch_p;