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