annotate packets.h @ 3:5a977ccbc7a9 default tip

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:29 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1 /* $Id: packets.h,v 1.1.1.1 1997/12/06 05:41:29 darius Exp $ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
2
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
3 /*--------------------------------------------------------------------------
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4 NETREK II -- Paradise 2.1 FILE: packets.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 Permission to use, copy, modify, and distribute this software and its
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7 documentation for any NON-COMMERCIAL purpose (following the terms of
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8 the GNU General Public License (read the file 'COPYING')) and without
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9 fee is hereby granted, provided that this copyright notice appear in all
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 copies. No representations are made about the suitability of this
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11 software for any purpose. This software is provided "as is" without
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12 express or implied warranty.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 Xtrek Copyright 1986 Chris Guthrie
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15 Netrek (Xtrek II) Copyright 1989 Kevin P. Smith
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 Scott Silvey
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17 Paradise II (Netrek II) Copyright 1993 Larry Denys
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18 Kurt Olsen
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19 Brandon Gillespie
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20 Paradise II by:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 Larry Denys, Kurt Olsen, Brandon Gillespie, and Rob Forsman
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22 and:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 Heath Kehoe, Mike Lutz, Mike McGrath, Ted Hadley, and Mark Kolb
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24 --------------------------------------------------------------------------*/
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27 * Include file for socket I/O xtrek.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 * Kevin P. Smith 1/29/89
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32 #ifndef packets_h_
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33 #define packets_h_
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
35 #define STATUS_TOKEN "\t@@@" /* ATM */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
36
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
37 /* the following typedefs allow portability to machines without the
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
38 ubiquitous 32-bit architecture (KSR1, Cray, DEC Alpha) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
39
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
40 typedef unsigned int CARD32;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
41 typedef unsigned short CARD16;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
42 typedef unsigned char CARD8;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
43
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
44 typedef int INT32;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
45 typedef short INT16;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
46 #if __STDC__ || defined(sgi) || defined(RS6K)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
47 typedef signed char INT8;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
48 #else
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
49 /* stupid compilers */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
50 typedef char INT8;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
51 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
52
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
53 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
54 * TCP and UDP use identical packet formats; the only difference is that,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
55 * when in UDP mode, all packets sent from server to client have a sequence
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
56 * number appended to them.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
57 *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
58 * (note: ALL packets, whether sent on the TCP or UDP channel, will have
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
59 * the sequence number. Thus it's important that client & server agree on
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
60 * when to switch. This was done to keep critical and non-critical data
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
61 * in sync.)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
62 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
63
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
64 /* the various pad members of the structures are used for explicit
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
65 data alignment. They do not contain any data. All structures are
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
66 aligned to 4 bytes. If your compiler forces 8 byte alignment, you
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
67 will not be adhering to the netrek protocol.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
68 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
69
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
70 /* packets sent from xtrek server to remote client */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
71 #define SP_MESSAGE 1
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
72 #define SP_PLAYER_INFO 2 /* general player info not elsewhere */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
73 #define SP_KILLS 3 /* # kills a player has */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
74 #define SP_PLAYER 4 /* x,y for player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
75 #define SP_TORP_INFO 5 /* torp status */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
76 #define SP_TORP 6 /* torp location */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
77 #define SP_PHASER 7 /* phaser status and direction */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
78 #define SP_PLASMA_INFO 8 /* player login information */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
79 #define SP_PLASMA 9 /* like SP_TORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
80 #define SP_WARNING 10 /* like SP_MESG */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
81 #define SP_MOTD 11 /* line from .motd screen */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
82 #define SP_YOU 12 /* info on you? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
83 #define SP_QUEUE 13 /* estimated loc in queue? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
84 #define SP_STATUS 14 /* galaxy status numbers */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
85 #define SP_PLANET 15 /* planet armies & facilities */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
86 #define SP_PICKOK 16 /* your team & ship was accepted */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
87 #define SP_LOGIN 17 /* login response */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
88 #define SP_FLAGS 18 /* give flags for a player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
89 #define SP_MASK 19 /* tournament mode mask */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
90 #define SP_PSTATUS 20 /* give status for a player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
91 #define SP_BADVERSION 21 /* invalid version number */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
92 #define SP_HOSTILE 22 /* hostility settings for a player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
93 #define SP_STATS 23 /* a player's statistics */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
94 #define SP_PL_LOGIN 24 /* new player logs in */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
95 #define SP_RESERVED 25 /* for future use */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
96 #define SP_PLANET_LOC 26 /* planet name, x, y */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
97
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
98 #define SP_SCAN 27 /* scan packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
99 #define SP_UDP_REPLY 28 /* notify client of UDP status */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
100 #define SP_SEQUENCE 29 /* sequence # packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
101 #define SP_SC_SEQUENCE 30 /* this trans is semi-critical info */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
102 #define SP_RSA_KEY 31 /* RSA data packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
103
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
104 #define SP_MOTD_PIC 32 /* motd bitmap pictures */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
105 #define SP_STATS2 33 /* new stats packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
106 #define SP_STATUS2 34 /* new status packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
107 #define SP_PLANET2 35 /* new planet packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
108 #define SP_NEW_MOTD 36 /* New MOTD info notification uses */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
109 #define SP_THINGY 37 /* thingy location */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
110 #define SP_THINGY_INFO 38 /* thingy status */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
111 #define SP_SHIP_CAP 39 /* ship capabilities */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
112
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
113 #ifdef SHORT_PACKETS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
114 #define SP_S_REPLY 40 /* reply to send-short request */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
115 #define SP_S_MESSAGE 41 /* var. Message Packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
116 #define SP_S_WARNING 42 /* Warnings with 4 Bytes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
117 #define SP_S_YOU 43 /* hostile,armies,whydead,etc .. */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
118 #define SP_S_YOU_SS 44 /* your ship status */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
119 #define SP_S_PLAYER 45 /* variable length player packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
120 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
121
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
122 #define SP_PING 46 /* ping packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
123
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
124 #ifdef SHORT_PACKETS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
125 #define SP_S_TORP 47 /* variable length torp packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
126 #define SP_S_TORP_INFO 48 /* SP_S_TORP with TorpInfo */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
127 #define SP_S_8_TORP 49 /* optimized SP_S_TORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
128 #define SP_S_PLANET 50 /* see SP_PLANET */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
129
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
130 /* variable length packets */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
131 #define VPLAYER_SIZE 4
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
132 #define SHORTVERSION 10 /* other number blocks, like UDP Version */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
133 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
134
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
135 #define SP_GPARAM 51 /* game params packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
136
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
137 /* the following is a family of packets with the same type, but a
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
138 discriminating subtype */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
139 #define SP_PARADISE_EXT1 52
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
140 #define SP_PE1_MISSING_BITMAP 0
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
141 #define SP_PE1_NUM_MISSILES 1
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
142 /* end of packet 52 subtypes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
143 #define SP_TERRAIN2 53 /* Terrain packets */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
144 #define SP_TERRAIN_INFO2 54 /* Terrain info */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
145
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
146 #ifdef FEATURE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
147 /* feature_spacket, response to feature_cpacket requests. identical structures */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
148 #define SP_FEATURE 60
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
149 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
150
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
151 #ifdef RECORDER
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
152 /* special type tells us when to update the display on playback.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
153 Not sent or received, only placed in the recorder file */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
154 #define REC_UPDATE 127
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
155 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
156
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
157 /* packets sent from remote client to xtrek server */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
158 #define CP_MESSAGE 1 /* send a message */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
159 #define CP_SPEED 2 /* set speed */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
160 #define CP_DIRECTION 3 /* change direction */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
161 #define CP_PHASER 4 /* phaser in a direction */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
162 #define CP_PLASMA 5 /* plasma (in a direction) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
163 #define CP_TORP 6 /* fire torp in a direction */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
164 #define CP_QUIT 7 /* self destruct */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
165 #define CP_LOGIN 8 /* log in (name, password) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
166 #define CP_OUTFIT 9 /* outfit to new ship */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
167 #define CP_WAR 10 /* change war status */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
168 #define CP_PRACTR 11 /* create practice robot? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
169 #define CP_SHIELD 12 /* raise/lower sheilds */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
170 #define CP_REPAIR 13 /* enter repair mode */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
171 #define CP_ORBIT 14 /* orbit planet/starbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
172 #define CP_PLANLOCK 15 /* lock on planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
173 #define CP_PLAYLOCK 16 /* lock on player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
174 #define CP_BOMB 17 /* bomb a planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
175 #define CP_BEAM 18 /* beam armies up/down */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
176 #define CP_CLOAK 19 /* cloak on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
177 #define CP_DET_TORPS 20 /* detonate enemy torps */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
178 #define CP_DET_MYTORP 21 /* detonate one of my torps */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
179 #define CP_COPILOT 22 /* toggle copilot mode */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
180 #define CP_REFIT 23 /* refit to different ship type */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
181 #define CP_TRACTOR 24 /* tractor on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
182 #define CP_REPRESS 25 /* pressor on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
183 #define CP_COUP 26 /* coup home planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
184 #define CP_SOCKET 27 /* new socket for reconnection */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
185 #define CP_OPTIONS 28 /* send my options to be saved */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
186 #define CP_BYE 29 /* I'm done! */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
187 #define CP_DOCKPERM 30 /* set docking permissions */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
188 #define CP_UPDATES 31 /* set number of usecs per update */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
189 #define CP_RESETSTATS 32 /* reset my stats packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
190 #define CP_RESERVED 33 /* for future use */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
191
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
192 #define CP_SCAN 34 /* ATM: request for player scan */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
193
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
194 #define CP_UDP_REQ 35 /* request UDP on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
195 #define CP_SEQUENCE 36 /* sequence # packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
196 #define CP_RSA_KEY 37 /* request MOTD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
197 #define CP_ASK_MOTD 38 /* request MOTD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
198
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
199 #define CP_PING_RESPONSE 42 /* client response */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
200
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
201 #ifdef SHORT_PACKETS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
202 #define CP_S_REQ 43
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
203 #define CP_S_THRS 44
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
204 #define CP_S_MESSAGE 45 /* vari. Message Packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
205 #define CP_S_RESERVED 46
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
206 #define CP_S_DUMMY 47
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
207 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
208
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
209 #ifdef FEATURE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
210 #define CP_FEATURE 60
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
211 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
212
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
213 #define SOCKVERSION 4
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
214 #define UDPVERSION 10 /* changing this blocks other */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
215 /* versions */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
216
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
217 struct packet_handler {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
218 void (*handler) ();
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
219 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
220
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
221
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
222 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
223 * These are server --> client packets
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
224 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
225
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
226 struct mesg_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
227 INT8 type; /* SP_MESSAGE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
228 CARD8 m_flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
229 CARD8 m_recpt;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
230 CARD8 m_from;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
231 char mesg[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
232 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
233
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
234 struct plyr_info_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
235 INT8 type; /* SP_PLAYER_INFO */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
236 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
237 INT8 shiptype;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
238 INT8 team;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
239 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
240
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
241 struct kills_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
242 INT8 type; /* SP_KILLS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
243 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
244 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
245 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
246 CARD32 kills; /* where 1234=12.34 kills and 0=0.00 kills */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
247 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
248
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
249 struct player_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
250 INT8 type; /* SP_PLAYER */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
251 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
252 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
253 INT8 speed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
254 INT32 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
255 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
256
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
257 struct torp_info_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
258 INT8 type; /* SP_TORP_INFO */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
259 INT8 war;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
260 INT8 status; /* TFREE, TDET, etc... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
261 INT8 pad1; /* pad needed for cross cpu compatibility */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
262 INT16 tnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
263 INT16 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
264 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
265
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
266 struct torp_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
267 INT8 type; /* SP_TORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
268 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
269 INT16 tnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
270 INT32 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
271 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
272
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
273 /* Shapes of thingys. It would be best to add to the end of this list and
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
274 try to coordinate your additions with other hackers. */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
275 enum thingy_types {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
276 SHP_BLANK, SHP_MISSILE, SHP_BOOM, SHP_TORP, SHP_PLASMA, SHP_MINE,
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
277 SHP_PBOOM, SHP_FIGHTER, SHP_WARP_BEACON
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
278 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
279
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
280 struct thingy_info_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
281 INT8 type; /* SP_THINGY_INFO */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
282 INT8 war;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
283 INT16 shape; /* a thingy_types */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
284 INT16 tnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
285 INT16 owner;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
286 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
287
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
288 struct thingy_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
289 INT8 type; /* SP_THINGY */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
290 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
291 INT16 tnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
292 INT32 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
293 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
294
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
295 struct phaser_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
296 INT8 type; /* SP_PHASER */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
297 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
298 INT8 status; /* PH_HIT, etc... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
299 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
300 INT32 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
301 INT32 target;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
302 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
303
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
304 struct plasma_info_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
305 INT8 type; /* SP_PLASMA_INFO */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
306 INT8 war;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
307 INT8 status; /* TFREE, TDET, etc... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
308 INT8 pad1; /* pad needed for cross cpu compatibility */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
309 INT16 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
310 INT16 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
311 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
312
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
313 struct plasma_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
314 INT8 type; /* SP_PLASMA */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
315 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
316 INT16 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
317 INT32 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
318 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
319
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
320 struct warning_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
321 INT8 type; /* SP_WARNING */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
322 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
323 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
324 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
325 char mesg[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
326 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
327
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
328 struct motd_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
329 INT8 type; /* SP_MOTD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
330 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
331 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
332 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
333 char line[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
334 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
335
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
336 struct you_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
337 INT8 type; /* SP_YOU */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
338 INT8 pnum; /* Guy needs to know this... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
339 INT8 hostile;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
340 INT8 swar;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
341 INT8 armies;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
342 INT8 tractor; /* ATM - visible tractor (was pad1) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
343 CARD8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
344 CARD8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
345 CARD32 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
346 INT32 damage;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
347 INT32 shield;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
348 INT32 fuel;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
349 INT16 etemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
350 INT16 wtemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
351 INT16 whydead;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
352 INT16 whodead;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
353 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
354
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
355 struct queue_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
356 INT8 type; /* SP_QUEUE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
357 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
358 INT16 pos;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
359 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
360
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
361 struct status_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
362 INT8 type; /* SP_STATUS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
363 INT8 tourn;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
364 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
365 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
366 CARD32 armsbomb;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
367 CARD32 planets;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
368 CARD32 kills;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
369 CARD32 losses;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
370 CARD32 time;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
371 CARD32 timeprod;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
372 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
373
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
374 struct planet_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
375 INT8 type; /* SP_PLANET */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
376 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
377 INT8 owner;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
378 INT8 info;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
379 INT16 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
380 INT16 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
381 INT32 armies;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
382 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
383
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
384 /* terrain info for Paradise terrain */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
385 /* 5/16/95 rpg */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
386
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
387 struct terrain_info_packet2 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
388 CARD8 type; /* SP_TERRAIN_INFO2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
389 CARD8 pad;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
390 CARD16 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
391 CARD16 xdim;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
392 CARD16 ydim;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
393 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
394
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
395 struct terrain_packet2 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
396 CARD8 type; /* SP_TERRAIN2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
397 CARD8 sequence;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
398 CARD8 total_pkts;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
399 CARD8 length;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
400 CARD8 terrain_type[128]; /* Ugh... this needs to be fixed 5/16/95 rpg */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
401 /* CARD16 terrain_alt1[128]; */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
402 /* CARD16 terrain_alt2[128]; */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
403 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
404
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
405 struct pickok_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
406 INT8 type; /* SP_PICKOK */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
407 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
408 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
409 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
410 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
411
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
412 struct login_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
413 INT8 type; /* SP_LOGIN */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
414 INT8 accept; /* 1/0 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
415 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
416 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
417 INT32 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
418 char keymap[96];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
419 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
420
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
421 struct flags_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
422 INT8 type; /* SP_FLAGS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
423 INT8 pnum; /* whose flags are they? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
424 INT8 tractor; /* ATM - visible tractors */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
425 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
426 CARD32 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
427 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
428
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
429 struct mask_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
430 INT8 type; /* SP_MASK */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
431 INT8 mask;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
432 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
433 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
434 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
435
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
436 struct pstatus_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
437 INT8 type; /* SP_PSTATUS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
438 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
439 INT8 status;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
440 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
441 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
442
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
443 struct badversion_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
444 INT8 type; /* SP_BADVERSION */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
445 INT8 why;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
446 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
447 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
448 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
449
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
450 struct hostile_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
451 INT8 type; /* SP_HOSTILE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
452 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
453 INT8 war;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
454 INT8 hostile;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
455 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
456
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
457 struct stats_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
458 INT8 type; /* SP_STATS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
459 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
460 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
461 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
462 INT32 tkills; /* Tournament kills */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
463 INT32 tlosses; /* Tournament losses */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
464 INT32 kills; /* overall */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
465 INT32 losses; /* overall */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
466 INT32 tticks; /* ticks of tournament play time */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
467 INT32 tplanets; /* Tournament planets */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
468 INT32 tarmies; /* Tournament armies */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
469 INT32 sbkills; /* Starbase kills */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
470 INT32 sblosses; /* Starbase losses */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
471 INT32 armies; /* non-tourn armies */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
472 INT32 planets; /* non-tourn planets */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
473 INT32 maxkills; /* max kills as player * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
474 INT32 sbmaxkills; /* max kills as sb * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
475 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
476
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
477 struct plyr_login_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
478 INT8 type; /* SP_PL_LOGIN */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
479 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
480 INT8 rank;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
481 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
482 char name[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
483 char monitor[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
484 char login[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
485 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
486
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
487 struct reserved_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
488 INT8 type; /* SP_RESERVED */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
489 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
490 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
491 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
492 INT8 data[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
493 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
494
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
495 struct planet_loc_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
496 INT8 type; /* SP_PLANET_LOC */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
497 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
498 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
499 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
500 INT32 x;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
501 INT32 y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
502 char name[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
503 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
504
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
505 struct scan_spacket { /* ATM */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
506 INT8 type; /* SP_SCAN */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
507 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
508 INT8 success;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
509 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
510 INT32 p_fuel;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
511 INT32 p_armies;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
512 INT32 p_shield;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
513 INT32 p_damage;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
514 INT32 p_etemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
515 INT32 p_wtemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
516 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
517
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
518 struct udp_reply_spacket { /* UDP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
519 INT8 type; /* SP_UDP_REPLY */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
520 INT8 reply;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
521 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
522 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
523 INT32 port;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
524 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
525
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
526 struct sequence_spacket { /* UDP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
527 INT8 type; /* SP_SEQUENCE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
528 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
529 CARD16 sequence;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
530 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
531 struct sc_sequence_spacket { /* UDP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
532 INT8 type; /* SP_CP_SEQUENCE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
533 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
534 CARD16 sequence;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
535 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
536
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
537 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
538 * Game configuration.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
539 * KAO 1/23/93
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
540 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
541
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
542 struct ship_cap_spacket { /* Server configuration of client */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
543 INT8 type; /* screw motd method */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
544 INT8 operation; /* 0 = add/change a ship, 1 = remove a ship */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
545 INT16 s_type; /* SP_SHIP_CAP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
546 INT16 s_torpspeed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
547 INT16 s_phaserrange;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
548 INT32 s_maxspeed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
549 INT32 s_maxfuel;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
550 INT32 s_maxshield;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
551 INT32 s_maxdamage;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
552 INT32 s_maxwpntemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
553 INT32 s_maxegntemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
554 INT16 s_width;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
555 INT16 s_height;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
556 INT16 s_maxarmies;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
557 INT8 s_letter;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
558 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
559 char s_name[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
560 INT8 s_desig1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
561 INT8 s_desig2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
562 INT16 s_bitmap;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
563 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
564
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
565 struct motd_pic_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
566 INT8 type; /* SP_MOTD_PIC */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
567 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
568 INT16 x, y, page;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
569 INT16 width, height;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
570 INT8 bits[1016];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
571 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
572
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
573
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
574 /* This is used to send paradise style stats */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
575 struct stats_spacket2 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
576 INT8 type; /* SP_STATS2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
577 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
578 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
579 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
580
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
581 INT32 genocides; /* number of genocides participated in */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
582 INT32 maxkills; /* max kills ever * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
583 INT32 di; /* destruction inflicted for all time * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
584 INT32 kills; /* Kills in tournament play */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
585 INT32 losses; /* Losses in tournament play */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
586 INT32 armsbomb; /* Tournament armies bombed */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
587 INT32 resbomb; /* resources bombed off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
588 INT32 dooshes; /* armies killed while being carried */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
589 INT32 planets; /* Tournament planets conquered */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
590 INT32 tticks; /* Tournament ticks */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
591 /* SB/WB/JS stats are entirely separate */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
592 INT32 sbkills; /* Kills as starbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
593 INT32 sblosses; /* Losses as starbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
594 INT32 sbticks; /* Time as starbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
595 INT32 sbmaxkills; /* Max kills as starbase * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
596 INT32 wbkills; /* Kills as warbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
597 INT32 wblosses; /* Losses as warbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
598 INT32 wbticks; /* Time as warbase */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
599 INT32 wbmaxkills; /* Max kills as warbase * 100 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
600 INT32 jsplanets; /* planets assisted with in JS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
601 INT32 jsticks; /* ticks played as a JS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
602 INT32 rank; /* Ranking of the player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
603 INT32 royal; /* royaly, specialty, rank */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
604 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
605
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
606 /* status info for paradise stats */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
607 struct status_spacket2 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
608 INT8 type; /* SP_STATUS2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
609 INT8 tourn;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
610 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
611 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
612 CARD32 dooshes; /* total number of armies dooshed */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
613 CARD32 armsbomb; /* all t-mode armies bombed */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
614 CARD32 resbomb; /* resources bombed */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
615 CARD32 planets; /* all t-mode planets taken */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
616 CARD32 kills; /* all t-mode kills made */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
617 CARD32 losses; /* all t-mode losses */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
618 CARD32 sbkills; /* total kills in SB's */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
619 CARD32 sblosses; /* total losses in Sb's */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
620 CARD32 sbtime; /* total time in SB's */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
621 CARD32 wbkills; /* kills in warbases */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
622 CARD32 wblosses; /* losses in warbases */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
623 CARD32 wbtime; /* total time played in wb's */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
624 CARD32 jsplanets; /* total planets taken by jump ships */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
625 CARD32 jstime; /* total time in a jump ship */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
626 CARD32 time; /* t mode time in this game */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
627 CARD32 timeprod; /* t-mode ship ticks--sort of like */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
628 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
629
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
630
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
631 /* planet info for a paradise planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
632 struct planet_spacket2 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
633 INT8 type; /* SP_PLANET2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
634 INT8 pnum; /* planet number */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
635 INT8 owner; /* owner of the planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
636 INT8 info; /* who has touched planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
637 INT32 flags; /* planet's flags */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
638 INT32 timestamp; /* timestamp for info on planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
639 INT32 armies; /* armies on the planet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
640 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
641
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
642 struct obvious_packet {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
643 INT8 type; /* SP_NEW_MOTD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
644 INT8 pad1; /* CP_ASK_MOTD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
645 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
646
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
647 struct rsa_key_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
648 INT8 type; /* SP_RSA_KEY */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
649 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
650 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
651 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
652 CARD8 data[KEY_SIZE];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
653 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
654
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
655
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
656 struct ping_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
657 INT8 type; /* SP_PING */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
658 CARD8 number; /* id (ok to wrap) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
659 CARD16 lag; /* delay of last ping in ms */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
660
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
661 CARD8 tloss_sc; /* total loss server-client 0-100% */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
662 CARD8 tloss_cs; /* total loss client-server 0-100% */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
663
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
664 CARD8 iloss_sc; /* inc. loss server-client 0-100% */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
665 CARD8 iloss_cs; /* inc. loss client-server 0-100% */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
666 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
667
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
668 struct paradiseext1_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
669 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
670 CARD8 subtype;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
671 INT16 pad;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
672 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
673
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
674 struct pe1_missing_bitmap_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
675 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
676 CARD8 subtype;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
677
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
678 INT16 page;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
679
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
680 INT16 x, y;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
681 INT16 width, height;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
682 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
683
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
684 struct pe1_num_missiles_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
685 INT8 type; /* SP_PARADISE_EXT1 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
686 CARD8 subtype; /* SP_PE1_NUM_MISSILES */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
687
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
688 INT16 num; /* number of missiles */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
689 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
690
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
691 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
692 * These are the client --> server packets
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
693 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
694
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
695 struct mesg_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
696 INT8 type; /* CP_MESSAGE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
697 INT8 group;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
698 INT8 indiv;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
699 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
700 char mesg[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
701 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
702
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
703 struct speed_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
704 INT8 type; /* CP_SPEED */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
705 INT8 speed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
706 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
707 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
708 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
709
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
710 struct dir_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
711 INT8 type; /* CP_DIRECTION */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
712 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
713 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
714 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
715 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
716
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
717 struct phaser_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
718 INT8 type; /* CP_PHASER */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
719 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
720 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
721 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
722 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
723
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
724 struct plasma_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
725 INT8 type; /* CP_PLASMA */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
726 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
727 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
728 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
729 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
730
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
731 struct torp_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
732 INT8 type; /* CP_TORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
733 CARD8 dir; /* direction to fire torp */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
734 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
735 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
736 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
737
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
738 struct quit_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
739 INT8 type; /* CP_QUIT */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
740 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
741 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
742 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
743 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
744
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
745 struct login_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
746 INT8 type; /* CP_LOGIN */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
747 INT8 query;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
748 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
749 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
750 char name[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
751 char password[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
752 char login[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
753 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
754
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
755 struct outfit_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
756 INT8 type; /* CP_OUTFIT */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
757 INT8 team;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
758 INT8 ship;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
759 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
760 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
761
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
762 struct war_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
763 INT8 type; /* CP_WAR */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
764 INT8 newmask;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
765 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
766 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
767 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
768
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
769 struct practr_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
770 INT8 type; /* CP_PRACTR */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
771 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
772 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
773 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
774 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
775
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
776 struct shield_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
777 INT8 type; /* CP_SHIELD */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
778 INT8 state; /* up/down */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
779 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
780 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
781 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
782
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
783 struct repair_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
784 INT8 type; /* CP_REPAIR */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
785 INT8 state; /* on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
786 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
787 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
788 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
789
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
790 struct orbit_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
791 INT8 type; /* CP_ORBIT */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
792 INT8 state; /* on/off */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
793 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
794 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
795 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
796
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
797 struct planlock_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
798 INT8 type; /* CP_PLANLOCK */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
799 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
800 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
801 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
802 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
803
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
804 struct playlock_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
805 INT8 type; /* CP_PLAYLOCK */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
806 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
807 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
808 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
809 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
810
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
811 struct bomb_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
812 INT8 type; /* CP_BOMB */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
813 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
814 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
815 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
816 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
817
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
818 struct beam_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
819 INT8 type; /* CP_BEAM */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
820 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
821 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
822 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
823 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
824
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
825 struct cloak_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
826 INT8 type; /* CP_CLOAK */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
827 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
828 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
829 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
830 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
831
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
832 struct det_torps_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
833 INT8 type; /* CP_DET_TORPS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
834 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
835 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
836 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
837 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
838
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
839 struct det_mytorp_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
840 INT8 type; /* CP_DET_MYTORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
841 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
842 INT16 tnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
843 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
844
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
845 struct copilot_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
846 INT8 type; /* CP_COPLIOT */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
847 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
848 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
849 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
850 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
851
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
852 struct refit_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
853 INT8 type; /* CP_REFIT */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
854 INT8 ship;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
855 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
856 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
857 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
858
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
859 struct tractor_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
860 INT8 type; /* CP_TRACTOR */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
861 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
862 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
863 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
864 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
865
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
866 struct repress_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
867 INT8 type; /* CP_REPRESS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
868 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
869 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
870 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
871 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
872
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
873 struct coup_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
874 INT8 type; /* CP_COUP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
875 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
876 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
877 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
878 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
879
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
880 struct socket_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
881 INT8 type; /* CP_SOCKET */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
882 INT8 version;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
883 INT8 udp_version; /* was pad2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
884 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
885 CARD32 socket;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
886 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
887
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
888 struct options_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
889 INT8 type; /* CP_OPTIONS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
890 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
891 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
892 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
893 CARD32 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
894 INT8 keymap[96];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
895 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
896
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
897 struct bye_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
898 INT8 type; /* CP_BYE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
899 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
900 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
901 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
902 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
903
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
904 struct dockperm_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
905 INT8 type; /* CP_DOCKPERM */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
906 INT8 state;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
907 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
908 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
909 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
910
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
911 struct updates_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
912 INT8 type; /* CP_UPDATES */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
913 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
914 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
915 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
916 CARD32 usecs;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
917 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
918
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
919 struct resetstats_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
920 INT8 type; /* CP_RESETSTATS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
921 INT8 verify; /* 'Y' - just to make sure he meant it */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
922 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
923 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
924 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
925
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
926 struct reserved_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
927 INT8 type; /* CP_RESERVED */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
928 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
929 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
930 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
931 INT8 data[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
932 INT8 resp[16];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
933 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
934
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
935 struct scan_cpacket { /* ATM */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
936 INT8 type; /* CP_SCAN */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
937 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
938 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
939 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
940 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
941
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
942 struct udp_req_cpacket { /* UDP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
943 INT8 type; /* CP_UDP_REQ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
944 INT8 request;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
945 INT8 connmode; /* respond with port # or just send UDP
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
946 packet? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
947 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
948 INT32 port; /* compensate for hosed recvfrom() */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
949 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
950
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
951 struct sequence_cpacket { /* UDP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
952 INT8 type; /* CP_SEQUENCE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
953 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
954 CARD16 sequence;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
955 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
956
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
957 struct rsa_key_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
958 INT8 type; /* CP_RSA_KEY */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
959 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
960 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
961 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
962 CARD8 global[KEY_SIZE];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
963 CARD8 public[KEY_SIZE];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
964 CARD8 resp[KEY_SIZE];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
965 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
966
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
967 /* the CP_ASK_MOTD packet is the same as temp_spacket */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
968
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
969 struct ping_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
970 INT8 type; /* CP_PING_RESPONSE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
971 CARD8 number; /* id */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
972 INT8 pingme; /* if client wants server to ping */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
973 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
974
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
975 INT32 cp_sent; /* # packets sent to server */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
976 INT32 cp_recv; /* # packets recv from server */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
977 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
978
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
979
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
980 #ifdef FEATURE
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
981 /* feature_cpacket and _spacket are identical! */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
982 struct feature_cpacket { /* CP_FEATURE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
983 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
984 char feature_type; /* either 'C' or 'S' */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
985 CARD8 arg1; /* could be INT8 depending on feature */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
986 CARD8 arg2; /* but only BEEP_LITE uses it, for now */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
987 INT32 value;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
988 char name[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
989 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
990
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
991 struct feature_spacket { /* SP_FEATURE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
992 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
993 char feature_type; /* either 'C' or 'S' */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
994 CARD8 arg1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
995 CARD8 arg2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
996 INT32 value;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
997 char name[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
998 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
999 #endif /* FEATURE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1000
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1001 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1002 * short stuff
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1003 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1004
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1005 #ifdef SHORT_PACKETS
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1006 struct shortreq_cpacket { /* CP_S_REQ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1007 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1008 INT8 req;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1009 INT8 version;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1010 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1011 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1012
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1013 struct threshold_cpacket { /* CP_S_THRS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1014 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1015 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1016 CARD16 thresh;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1017 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1018
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1019 struct shortreply_spacket { /* SP_S_REPLY */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1020 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1021 INT8 repl;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1022 CARD16 winside;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1023 INT32 gwidth;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1024 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1025
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1026 struct youshort_spacket { /* SP_S_YOU */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1027 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1028
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1029 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1030 INT8 hostile;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1031 INT8 swar;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1032
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1033 INT8 armies;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1034 INT8 whydead;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1035 INT8 whodead;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1036
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1037 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1038
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1039 CARD32 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1040 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1041
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1042 struct youss_spacket { /* SP_S_YOU_SS */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1043 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1044 INT8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1045
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1046 CARD16 damage;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1047 CARD16 shield;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1048 CARD16 fuel;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1049 CARD16 etemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1050 CARD16 wtemp;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1051 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1052
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1053 #define VPLANET_SIZE 6
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1054
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1055 struct planet_s_spacket { /* body of SP_S_PLANET */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1056 INT8 pnum;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1057 INT8 owner;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1058 INT8 info;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1059 CARD8 armies; /* more than 255 Armies ? ... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1060 INT16 flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1061 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1062 struct warning_s_spacket { /* SP_S_WARNING */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1063 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1064 CARD8 whichmessage;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1065 INT8 argument, argument2;/* for phaser etc ... */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1066 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1067
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1068 struct player_s_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1069 INT8 type; /* SP_S_PLAYER Header */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1070 INT8 packets; /* How many player-packets are in this packet
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1071 ( only the first 6 bits are relevant ) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1072 CARD8 dir;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1073 INT8 speed;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1074 INT32 x, y; /* To get the absolute Position */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1075 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1076
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1077 /* The format of the body:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1078 struct player_s_body_spacket { Body of new Player Packet
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1079 CARD8 pnum; 0-4 = pnum, 5 local or galactic, 6 = 9. x-bit, 7 9. y-bit
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1080 CARD8 speeddir; 0-3 = speed , 4-7 direction of ship
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1081 CARD8 x; low 8 bits from X-Pixelcoordinate
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1082 CARD8 y; low 8 bits from Y-Pixelcoordinate
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1083 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1084 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1085
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1086 struct torp_s_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1087 INT8 type; /* SP_S_TORP */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1088 CARD8 bitset; /* bit=1 that torp is in packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1089 CARD8 whichtorps; /* Torpnumber of first torp / 8 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1090 CARD8 data[21]; /* For every torp 2*9 bit coordinates */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1091 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1092
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1093 struct mesg_s_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1094 INT8 type; /* SP_S_MESSAGE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1095 CARD8 m_flags;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1096 CARD8 m_recpt;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1097 CARD8 m_from;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1098 CARD8 length; /* Length of whole packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1099 INT8 mesg;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1100 INT8 pad2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1101 INT8 pad3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1102 INT8 pad[76];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1103 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1104
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1105 struct mesg_s_cpacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1106 INT8 type; /* CP_S__MESSAGE */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1107 INT8 group;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1108 INT8 indiv;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1109 INT8 length; /* Size of whole packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1110 INT8 mesg[80];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1111 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1112
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1113 #endif
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1114
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1115 #endif