-
Notifications
You must be signed in to change notification settings - Fork 0
/
eclass.c
363 lines (339 loc) · 8.84 KB
/
eclass.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
#include "config.h"
#include "allegro.h"
#include "display.h"
#define NO_ELONGATION 1024
/*
SHIP_FRIEND3,
SHIP_OLD3,
SHIP_OLD2,
SHIP_FIGHTER_FRIEND,
SHIP_EBASE,
SHIP_SCOUTCAR,
SHIP_SCOUT3,
SHIP_SCOUT2,
SHIP_BOMBER,
SHIP_ESCOUT,
SHIP_EINT,
SHIP_FIGHTER,
*/
struct eclass_struct eclass [NO_SHIP_TYPES] =
{
{ // SHIP_NONE
ECLASS_WSHIP,
FCLASS_NONE,
0,
0, // parts
0, // turrets
0, // engines
},
{ // SHIP_FRIEND3
ECLASS_WSHIP,
FCLASS_NONE,
65000,
3, // parts
3, // turrets
2, // engines
{40000, 40000, 40000,0,0}, // hp
// {130, 130, 130,0,0}, // energy_production
{390, 0, 0,0,0}, // energy_production
{
{DSPRITE_WSHIP_FRIEND3_1, 37, 47},
{DSPRITE_WSHIP_FRIEND3_2, 49, 12},
{DSPRITE_WSHIP_FRIEND3_3, 34, -17},
{DSPRITE_WSHIP_FRIEND3_4, 27, 31},
{DSPRITE_WSHIP_FRIEND3_5, 27, 31},
}, // indices and image offsets for dsprites
1, // fins
2, // generator_part (which part contains the shield generator)
13, // generator_y (where to draw the line to on the targetting display)
{5, 5}, // engine power
2, // engine_output
RP_FRIEND3_TURRET_1,
50000, // structure
NO_ELONGATION, // elongation
5, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_OLD3
ECLASS_WSHIP,
FCLASS_NONE,
65000,
3, // parts
3, // turrets
1, // engines
{40000, 40000, 40000,0,0}, // hp
// {130, 130, 130,0,0}, // energy_production
{390, 130, 130,0,0}, // energy_production
{
{DSPRITE_WSHIP_OLD3_1, 11, 24},
{DSPRITE_WSHIP_OLD3_2, 14, 8},
{DSPRITE_WSHIP_OLD3_3, 14, -7},
{DSPRITE_WSHIP_OLD3_4, 7, 17},
{DSPRITE_WSHIP_OLD3_5, 26, 15},
}, // indices and image offsets for dsprites
1, // fins
2, // generator_part (which part contains the shield generator)
18, // generator_y (where to draw the line to on the targetting display)
{5}, // engine power
2, // engine_output
RP_OLD3_TURRET_1,
50000, // structure
NO_ELONGATION, // elongation
5, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_OLD2
ECLASS_WSHIP,
FCLASS_NONE,
50000,
2, // parts
2, // turrets
1, // engines
{20000, 20000,0,0,0}, // hp
// {100, 100,0,0,0}, // energy_production
{200, 100,0,0,0}, // energy_production
{
{DSPRITE_WSHIP_OLD2_1, 11, 20},
{DSPRITE_WSHIP_OLD2_2, 13, 0},
{DSPRITE_WSHIP_OLD2_3, 4, 12},
{DSPRITE_WSHIP_OLD2_4, 24, -3},
}, // indices and image offsets for dsprites
1, // fins
1, // generator_part (which part contains the shield generator)
13, // generator_y (where to draw the line to on the targetting display)
{3}, // engine power
2, // engine_output
RP_OLD2_TURRET_1,
20000, // structure
NO_ELONGATION, // elongation
4, // blip_strength
0 // bullet_speed
},
{ // SHIP_FIGHTER_FRIEND
ECLASS_FIGHTER,
FCLASS_FIGHTER,
5000,
1, // parts
0, // turrets
2, // engines
{5000, 0,0,0,0,0},
{0, 0, 0,0,0}, // energy_production
{
{DSPRITE_FRIEND_1, 14, 12}
}, // indices and image offsets for dsprites
0, // fins
0, // generator_part (which part contains the shield generator) - not relevant for fighters
0, // generator_y - not relevant for fighters
{1, 1}, // engine power
170, // engine_output
0, // not used for fighters
0, // not used for fighters
NO_ELONGATION, // elongation
2, // blip_strength
9000 // bullet_speed (fighters only)
},
{ // SHIP_EBASE
ECLASS_WSHIP,
FCLASS_NONE,
150000,
5, // parts
5, // turrets
0, // engines
{60000, 60000,60000,60000,60000}, // hp
// {250, 250,250, 250, 250}, // energy_production
{1250, 0,0, 0, 0}, // energy_production
{
{DSPRITE_WSHIP_EBASE_1, 13, 33},
{DSPRITE_WSHIP_EBASE_2, 13, -22},
{DSPRITE_WSHIP_EBASE_3, 15, 20},
{DSPRITE_WSHIP_EBASE_4, 15, -9},
{DSPRITE_WSHIP_EBASE_5, 18, 9},
{DSPRITE_WSHIP_EBASE_6, 4, 9},
}, // indices and image offsets for dsprites
0, // fins
4, // generator_part (which part contains the shield generator)
0, // generator_y (where to draw the line to on the targetting display)
{0, 0, 0}, // engine power
0, // engine_output
RP_EBASE_TURRET_1,
200000, // structure
NO_ELONGATION, //-1300, // elongation - negative value indicates both front and back elongated
6, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_SCOUTCAR
ECLASS_WSHIP,
FCLASS_NONE,
60000,
2, // parts
1, // turrets
1, // engines
{20000, 20000,0,0,0}, // hp
// {50, 50,0,0,0}, // energy_production
{100, 0,0,0,0}, // energy_production
{
{DSPRITE_WSHIP_SCOUTCAR_1, 14, -5}, // note: parts are in opposite order because
{DSPRITE_WSHIP_SCOUTCAR_2, 14, 24}, // of carrier's single rear turret
{DSPRITE_WSHIP_SCOUTCAR_3, 6, 4},
{DSPRITE_WSHIP_SCOUTCAR_4, 15, -10},
}, // indices and image offsets for dsprites
1, // fins
0, // generator_part (which part contains the shield generator)
15, // generator_y (where to draw the line to on the targetting display)
{4}, // engine power
2, // engine_output
RP_SCOUTCAR_TURRET_1,
20000, // structure
1200, // elongation - positive value indicates only front elongated
6, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_SCOUT3
ECLASS_WSHIP,
FCLASS_NONE,
70000,
3, // parts
3, // turrets
3, // engines
{30000, 30000,30000,0,0}, // hp
// {150, 150,150,0,0}, // energy_production
{450, 0,0,0,0}, // energy_production
{
{DSPRITE_WSHIP_SCOUT3_1, 20, 23},
{DSPRITE_WSHIP_SCOUT3_2, 22, 8},
{DSPRITE_WSHIP_SCOUT3_3, 17, -4},
{DSPRITE_WSHIP_SCOUT3_4, 10, 21},
{DSPRITE_WSHIP_SCOUT3_5, 25, -7},
}, // indices and image offsets for dsprites
1, // fins
2, // generator_part (which part contains the shield generator)
15, // generator_y (where to draw the line to on the targetting display)
{3, 3, 5}, // engine power
2, // engine_output
RP_SCOUT3_TURRET_1,
40000, // structure
NO_ELONGATION, // elongation
5, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_SCOUT2
ECLASS_WSHIP,
FCLASS_NONE,
50000,
2, // parts
2, // turrets
2, // engines
{20000, 20000,0,0,0}, // hp
// {100, 100,0,0,0}, // energy_production
{200, 0,0,0,0}, // energy_production
{
{DSPRITE_WSHIP_SCOUT2_1, 20, 22},
{DSPRITE_WSHIP_SCOUT2_2, 19, 0},
{DSPRITE_WSHIP_SCOUT2_3, 8, 18},
{DSPRITE_WSHIP_SCOUT2_4, 20, -9},
}, // indices and image offsets for dsprites
1, // fins
1, // generator_part (which part contains the shield generator)
8, // generator_y (where to draw the line to on the targetting display)
{3, 3}, // engine power
2, // engine_output
RP_SCOUT2_TURRET_1,
20000, // structure
NO_ELONGATION, // elongation
4, // blip_strength
0 // bullet_speed (fighters only)
},
{ // SHIP_BOMBER
ECLASS_FIGHTER,
FCLASS_BOMBER,
13000,
1, // parts
0, // turrets
2, // engines
{7000, 0,0,0,0,0},
{0, 0, 0,0,0}, // energy_production
{
{DSPRITE_BOMBER_1, 16, 12}
}, // indices and image offsets for dsprites
0, // fins
0, // generator_part (which part contains the shield generator) - not relevant for fighters
0, // generator_y - not relevant for fighters
{1, 1}, // engine power
130, // engine_output
0, // not used for fighters
0, // not used for fighters
NO_ELONGATION, // elongation
3, // blip_strength
2000 // bullet_speed (fighters only)
},
{ // SHIP_ESCOUT
ECLASS_FIGHTER,
FCLASS_FIGHTER,
10000,
1, // parts
0, // turrets
1, // engines
{5000, 0,0,0,0,0},
{0, 0, 0,0,0}, // energy_production
{
{DSPRITE_ESCOUT_1, 18, 17}
}, // indices and image offsets for dsprites
0, // fins
0, // generator_part (which part contains the shield generator) - not relevant for fighters
0, // generator_y - not relevant for fighters
{1, 1}, // engine power
145, // engine_output
0, // not used for fighters
0, // not used for fighters
NO_ELONGATION, // elongation
2, // blip_strength
7000 // bullet_speed (fighters only)
},
{ // SHIP_EINT
ECLASS_FIGHTER,
FCLASS_FIGHTER,
12000,
1, // parts
0, // turrets
1, // engines
{4000, 0,0,0,0,0}, // hull
{0, 0, 0,0,0}, // energy_production
{
{DSPRITE_EINT_1, 10, 17}
}, // indices and image offsets for dsprites
0, // fins
0, // generator_part (which part contains the shield generator) - not relevant for fighters
0, // generator_y - not relevant for fighters
{1, 0}, // engine power
230, // engine_output
0, // not used for fighters
0, // not used for fighters
NO_ELONGATION, // elongation
2, // blip_strength
7000 // bullet_speed (fighters only)
},
{ // SHIP_FIGHTER
ECLASS_FIGHTER,
FCLASS_FIGHTER,
7000,
1, // parts
0, // turrets
1, // engines
{4000, 0,0,0,0,0}, // hull
{0, 0, 0,0,0}, // energy_production
{
{DSPRITE_FIGHTER_1, 11, 11}
}, // indices and image offsets for dsprites
0, // fins
0, // generator_part (which part contains the shield generator) - not relevant for fighters
0, // generator_y - not relevant for fighters
{1, 1}, // engine power
150, // engine_output
0, // not used for fighters
0, // not used for fighters
NO_ELONGATION, // elongation
2, // blip_strength
6000 // bullet_speed (fighters only)
},
// remember to set threat in calculate threat in level.c if adding an enemy!
};