DOOMNET.H 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // doomnet.h
  2. #define PEL_WRITE_ADR 0x3c8
  3. #define PEL_DATA 0x3c9
  4. #define I_ColorBlack(r,g,b) {outp(PEL_WRITE_ADR,0);outp(PEL_DATA,r);outp(PEL_DATA,g);outp(PEL_DATA,b);};
  5. #define MAXNETNODES 8 // max computers in a game
  6. #define MAXPLAYERS 4 // 4 players max + drones
  7. #define CMD_SEND 1
  8. #define CMD_GET 2
  9. #define DOOMCOM_ID 0x12345678l
  10. typedef struct
  11. {
  12. long id;
  13. short intnum; // DOOM executes an int to send commands
  14. // communication between DOOM and the driver
  15. short command; // CMD_SEND or CMD_GET
  16. short remotenode; // dest for send, set by get (-1 = no packet)
  17. short datalength; // bytes in doomdata to be sent / bytes read
  18. // info common to all nodes
  19. short numnodes; // console is allways node 0
  20. short ticdup; // 1 = no duplication, 2-5 = dup for slow nets
  21. short extratics; // 1 = send a backup tic in every packet
  22. short deathmatch; // 1 = deathmatch
  23. short savegame; // -1 = new game, 0-5 = load savegame
  24. short episode; // 1-3
  25. short map; // 1-9
  26. short skill; // 1-5
  27. // info specific to this node
  28. short consoleplayer; // 0-3 = player number
  29. short numplayers; // 1-4
  30. short angleoffset; // 1 = left, 0 = center, -1 = right
  31. short drone; // 1 = drone
  32. // packet data to be sent
  33. char data[512];
  34. } doomcom_t;
  35. extern doomcom_t doomcom;
  36. extern void interrupt (*olddoomvect) (void);
  37. extern int vectorishooked;
  38. int CheckParm (char *check);
  39. void LaunchDOOM (void);
  40. void interrupt NetISR (void);