annotate gppackets.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: gppackets.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 #ifndef gppackets_h_
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4 #define gppackets_h_
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 /* the definitions of {INT,CARD}{8,16,32} are in packets.h */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7 #include "packets.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9 struct gameparam_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11 INT8 subtype; /* this packet is not real */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12 /* generic game parameter packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13 INT16 pad;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 struct gp_sizes_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18 INT8 subtype; /* =0 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20 CARD8 nplayers;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 CARD8 nteams; /* max of 8 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 CARD8 nshiptypes;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24 CARD8 nranks; /* number of ranks */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25 CARD8 nroyal; /* number of royalties */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26 CARD8 nphasers;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 CARD8 ntorps;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 CARD8 nplasmas;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 CARD8 nthingies; /* per-player */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31 CARD8 gthingies; /* auxiliary thingies */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33 CARD32 gwidth; /* galaxy width */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34 /* 16 bytes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
35 CARD32 flags; /* some game parameter flags */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
36 #define GP_WRAPVERT (1<<0)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
37 #define GP_WRAPHORIZ (1<<1)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
38 #define GP_WRAPALL (GP_WRAPVERT|GP_WRAPHORIZ)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
39
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
40 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
41 The following bytes are room for growth. The size of this packet is
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
42 unimportant because it only gets sent once. hopefully we've got
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
43 plenty of room.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
44 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
45 INT32 ext1; /* maybe more flags? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
46 INT32 ext2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
47 INT32 ext3;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
48 /* 32 bytes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
49
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
50 INT32 ext4;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
51 INT32 ext5;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
52 INT32 ext6;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
53 INT32 ext7;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
54
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
55 INT32 ext8;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
56 INT32 ext9;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
57 INT32 ext10;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
58 INT32 ext11; /* 16 ints, 64 bytes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
59 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
60
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
61 struct gp_team_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
62 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
63 INT8 subtype; /* =1 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
64
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
65 CARD8 index; /* team index */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
66 char letter; /* team letter 'F' */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
67
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
68 char shortname[3]; /* non-null-terminated 3-letter abbrev 'FED' */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
69 CARD8 pad;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
70 /* 8 bytes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
71 char teamname[56]; /* padding to 64 byte packet */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
72 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
73
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
74 struct gp_teamlogo_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
75 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
76 This packet contains several adjacent rows of a team's logo bitmap
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
77 Data is in raw XBM format (scanline-padded to 8 bits). Maximum bitmap
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
78 size is 99x99, which takes 1287 (99x13) bytes.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
79 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
80 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
81 INT8 subtype; /* =2 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
82
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
83 INT8 logowidth; /* <= 99 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
84 INT8 logoheight; /* <= 99 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
85
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
86 INT8 y; /* y coord of the start of this packets info */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
87 INT8 thisheight; /* the height of this packet's info */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
88 INT8 teamindex; /* which team's logo this is */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
89
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
90 char data[768 - 7]; /* pad packet to 768 bytes. */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
91 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
92
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
93 struct gp_shipshape_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
94 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
95 INT8 subtype; /* =3 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
96
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
97 CARD8 shipno;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
98 INT8 race; /* -1 is independent */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
99 CARD8 nviews; /* typically 16 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
100
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
101 CARD8 width, height;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
102 CARD8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
103 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
104
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
105 struct gp_shipbitmap_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
106 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
107 INT8 subtype; /* =4 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
108
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
109 CARD8 shipno;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
110 INT8 race; /* -1 is independent */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
111 CARD8 thisview; /* 0..nviews-1 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
112
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
113 CARD8 bitmapdata[999];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
114 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
115
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
116 struct gp_rank_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
117 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
118 INT8 subtype; /* =5 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
119
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
120 INT8 rankn; /* rank number */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
121
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
122 char name[-3 + 64 - 20]; /* name of the rank */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
123
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
124 INT32 genocides;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
125 INT32 milliDI; /* DI*1000 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
126 INT32 millibattle; /* battle*1000 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
127 INT32 millistrat; /* strategy*1000 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
128 INT32 millispec; /* special ships*1000 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
129 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
130
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
131 struct gp_royal_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
132 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
133 INT8 subtype; /* =6 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
134
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
135 CARD8 rankn; /* rank number */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
136
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
137 char name[-3 + 64]; /* name of the rank */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
138 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
139
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
140 struct gp_teamplanet_spacket {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
141 INT8 type;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
142 INT8 subtype; /* =7 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
143
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
144 INT8 teamn; /* 0..7 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
145 CARD8 pad1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
146
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
147 INT32 ext1; /* extensions? */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
148
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
149 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
150 Bitmaps of the team logo and masks. The bitmap of the planet will be
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
151 constructed with (mask ? logo : planet), applied bitwise. This
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
152 calculation is equivalent to (logo&mask)|(planet&~mask)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
153 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
154
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
155 /* bitmap 30x30, X bitmap format (scanline padded to 8 bits) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
156 CARD8 tactical[120];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
157 CARD8 tacticalM[120];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
158
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
159 /* bitmap 16x16, X bitmap format (scanline padded to 8 bits) */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
160 CARD8 galactic[32];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
161 CARD8 galacticM[32];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
162 };
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
163
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
164 #endif