123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- #ifndef __D_NET__
- #define __D_NET__
- #include "d_player.h"
- #define DOOMCOM_ID 0x12345678l
- #define MAXNETNODES 8
- typedef enum
- {
- CMD_SEND = 1,
- CMD_GET = 2
- } command_t;
- typedef struct
- {
-
- unsigned checksum;
-
- byte retransmitfrom;
- byte starttic;
- byte player;
- byte numtics;
- ticcmd_t cmds[BACKUPTICS];
- } doomdata_t;
- #define STARTUPLEN 12
- typedef struct
- {
- byte monsters_remember;
- byte variable_friction;
- byte weapon_recoil;
- byte allow_pushers;
- byte over_under;
- byte player_bobbing;
- byte fastparm;
- byte demo_insurance;
- unsigned long rngseed;
- char filler[sizeof(ticcmd_t)*BACKUPTICS-STARTUPLEN];
- } startup_t;
- typedef enum {
-
- nm_plcolour = 3,
- nm_savegamename = 4,
- } netmisctype_t;
- typedef struct
- {
- netmisctype_t type;
- size_t len;
- byte value[sizeof(ticcmd_t)*BACKUPTICS - sizeof(netmisctype_t) - sizeof(size_t)];
- } netmisc_t;
- typedef struct
- {
-
- long id;
-
- short intnum;
-
-
- short command;
-
- short remotenode;
-
- short datalength;
-
-
- short numnodes;
-
- short ticdup;
-
- short extratics;
-
- short deathmatch;
-
- short savegame;
- short episode;
- short map;
- short skill;
-
- short consoleplayer;
- short numplayers;
-
-
-
-
-
-
- short angleoffset;
-
- short drone;
-
- doomdata_t data;
- } doomcom_t;
- #ifdef HAVE_NET
- void NetUpdate (void);
- #else
- void D_BuildNewTiccmds(void);
- #endif
- void TryRunTics (void);
- void D_InitNetGame (void);
- void D_CheckNetGame(void);
- void D_NetSendMisc(netmisctype_t type, size_t len, void* data);
- boolean D_NetGetWad(const char* name);
- extern doomcom_t *doomcom;
- extern doomdata_t *netbuffer;
- #endif
|