ROTTNET.H 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. Copyright (C) 1994-1995 Apogee Software, Ltd.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. // rottnet.h
  16. #ifndef rottnet_public
  17. #define rottnet_public
  18. #if __WATCOMC__
  19. #include "develop.h"
  20. #else
  21. #define SHAREWARE 0
  22. #include "global.h"
  23. #endif
  24. #define PEL_WRITE_ADR 0x3c8
  25. #define PEL_DATA 0x3c9
  26. #define I_ColorBlack(r,g,b) {outp(PEL_WRITE_ADR,0);outp(PEL_DATA,r);outp(PEL_DATA,g);outp(PEL_DATA,b);};
  27. #define MAXNETNODES 14 // max computers in a game
  28. #if ( SHAREWARE == 1 )
  29. #define MAXPLAYERS 5 // 5 players max + drones
  30. #else
  31. #define MAXPLAYERS 11 // 11 players max + drones
  32. #endif
  33. #define CMD_SEND 1
  34. #define CMD_GET 2
  35. #define CMD_OUTQUEBUFFERSIZE 3
  36. #define CMD_INQUEBUFFERSIZE 4
  37. #define ROTTCOM_ID 0x12345678l
  38. #define MAXPACKETSIZE 2048
  39. #define MAXCOMBUFFERSIZE 2048
  40. #if __WATCOMC__
  41. #pragma pack (1)
  42. #endif
  43. typedef struct
  44. {
  45. short intnum; // ROTT executes an int to send commands
  46. // communication between ROTT and the driver
  47. short command; // CMD_SEND or CMD_GET
  48. short remotenode; // dest for send, set by get (-1 = no packet)
  49. short datalength; // bytes in rottdata to be sent / bytes read
  50. // info specific to this node
  51. short consoleplayer; // 0-3 = player number
  52. short numplayers; // 1-4
  53. short client; // 0 = server 1 = client
  54. short gametype; // 0 = modem 1 = network
  55. short ticstep; // 1 for every tic 2 for every other tic ...
  56. short remoteridicule; // 0 = remote ridicule is off 1= rr is on
  57. // packet data to be sent
  58. char data[MAXPACKETSIZE];
  59. } rottcom_t;
  60. #if __WATCOMC__
  61. #pragma pack (4)
  62. #endif
  63. #define MODEM_GAME 0
  64. #define NETWORK_GAME 1
  65. #define ROTTLAUNCHER ("ROTT.EXE")
  66. #if (__WATCOMC__ == 0)
  67. extern rottcom_t rottcom;
  68. extern boolean pause;
  69. void ShutdownROTTCOM ( void );
  70. int CheckParm (char *check);
  71. void LaunchROTT (void);
  72. void NetISR (void);
  73. long GetVector (void);
  74. #else
  75. extern rottcom_t * rottcom;
  76. #endif
  77. #endif