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