home *** CD-ROM | disk | FTP | other *** search
/ Doom Fever / Doom_Fever-1995_Maple_Media.iso / dmutil / ser4_src.zip / DOOMNET.H < prev    next >
C/C++ Source or Header  |  1994-03-19  |  2KB  |  67 lines

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