1 /* $Id: plan-14.c,v 1.158 2005/06/26 14:30:00 oohara Exp $ */
2 /* [easy] Strikers 1341 */
3
4 #include <stdio.h>
5 /* malloc */
6 #include <stdlib.h>
7
8 #include "scheduler.h"
9 #include "tenm_table.h"
10 #include "strikers.h"
11 #include "stage-title.h"
12 #include "warning.h"
13 #include "normal-enemy.h"
14 #include "const.h"
15
16 #include "plan-14.h"
17
18 static tenm_object *plan_14_more_1_new(void);
19 static int plan_14_more_1_act(tenm_object *my, const tenm_object *player);
20
21 int
plan_14(int t)22 plan_14(int t)
23 {
24 int i;
25 int s;
26 double x;
27
28 /* sanity check */
29 if (t < 0)
30 return SCHEDULER_ERROR;
31
32 if (t == 30)
33 tenm_table_add(stage_title_new());
34
35 if ((t >= 160) && (t < 370))
36 {
37 s = t - 160;
38 if (s % 14 == 0)
39 {
40 x = ((double) (WINDOW_WIDTH)) - 40.0 - 2.0 * ((double) s);
41 tenm_table_add(normal_enemy_new(x, -19.0,
42 BALL_SOLDIER, 0,
43 0, -1, 0, -1, 0, 1, 2,
44 /* move 0 */
45 9999, -2.0, 6.0, 0.0, 0.0,
46 0.0, 0.0, 0.0, 0.0, 0,
47 /* shoot 0 */
48 45 - (s % 42), 9999, 0, 0, 0, 1,
49 /* shoot 1 */
50 9999, 9999, 0, 0, 1, 1));
51 }
52 if ((s % 14 == 7) && (s % 42 < 35))
53 {
54 x = ((double) (WINDOW_WIDTH)) - 240.0 - 2.0 * ((double) ((s / 42) * 42))
55 + 2.0 * ((double) (s % 42));
56 tenm_table_add(normal_enemy_new(x, -19.0,
57 BALL_SOLDIER, 0,
58 0, -1, 0, -1, 0, 1, 2,
59 /* move 0 */
60 9999, 4.0 - 2.0, 6.0, 0.0, 0.0,
61 0.0, 0.0, 0.0, 0.0, 0,
62 /* shoot 0 */
63 45 - (s % 42), 37, s % 37, 0, 0, 1,
64 /* shoot 1 */
65 9999, 37, (45 - (s % 42) + s) % 37,
66 0, 1, 1));
67 }
68 }
69
70 if (t == 470)
71 {
72 for (i = -1; i <= 1; i++)
73 tenm_table_add(normal_enemy_new(70.0 + 40.0 * ((double) i),
74 -59.0 - 40.0 * ((double) i),
75 BALL_SOLDIER, 0,
76 70, -1, 0, -1, 0, 3, 2,
77 /* move 0 */
78 70, 0.0, 4.0, 0.0, 0.0,
79 0.0, 0.0, 0.0, 0.0, 1,
80 /* move 1 */
81 170, 0.0, 0.0, 0.0, 0.0,
82 0.0, 0.0, 0.0, 0.0, 2,
83 /* move 2 */
84 9999, 5.0, -1.0, 0.0, 0.0,
85 0.0, 0.0, 0.0, 0.0, 2,
86 /* shoot 0 */
87 240, 9999, 0, 0, 0, 1,
88 /* shoot 1 */
89 9999, 9999, 9989 + i * 5, 0, 1, 1));
90 for (i = -1; i <= 1; i++)
91 tenm_table_add(normal_enemy_new(230.0 + 40.0 * ((double) i),
92 -59.0 + 40.0 * ((double) i),
93 BALL_SOLDIER, 0,
94 70, -1, 0, -1, 0, 3, 2,
95 /* move 0 */
96 70, 0.0, 4.0, 0.0, 0.0,
97 0.0, 0.0, 0.0, 0.0, 1,
98 /* move 1 */
99 200, 0.0, 0.0, 0.0, 0.0,
100 0.0, 0.0, 0.0, 0.0, 2,
101 /* move 2 */
102 9999,
103 1.1, 4.0,
104 0.0, 0.0,
105 0.0, 0.0, 0.0, 0.0, 2,
106 /* shoot 0 */
107 270, 9999, 0, 0, 0, 1,
108 /* shoot 1 */
109 9999, 9999, 9989 + i * 5, 0, 1, 1));
110 tenm_table_add(normal_enemy_new(150.0, -19.0,
111 BALL_CAPTAIN, 0,
112 70, -1, 0, -1, 0, 3, 1,
113 /* move 0 */
114 70, 0.0, 4.0, 0.0, 0.0,
115 0.0, 0.0, 0.0, 0.0, 1,
116 /* move 1 */
117 90, 0.0, 0.0, 0.0, 0.0,
118 0.0, 0.0, 0.0, 0.0, 2,
119 /* move 2 */
120 9999, -4.0, 0.0, 0.0, 0.0,
121 0.0, 0.0, 0.0, 0.0, 2,
122 /* shoot 0 */
123 9999, 38, 0, 0, 1, 0));
124
125
126 for (i = -1; i <= 1; i++)
127 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH)
128 - (70.0 + 40.0 * ((double) i)),
129 -59.0 - 40.0 * ((double) i),
130 BALL_SOLDIER, 0,
131 70, -1, 0, -1, 0, 3, 2,
132 /* move 0 */
133 70, 0.0, 4.0, 0.0, 0.0,
134 0.0, 0.0, 0.0, 0.0, 1,
135 /* move 1 */
136 170, 0.0, 0.0, 0.0, 0.0,
137 0.0, 0.0, 0.0, 0.0, 2,
138 /* move 2 */
139 9999, -5.0, -1.0, 0.0, 0.0,
140 0.0, 0.0, 0.0, 0.0, 2,
141 /* shoot 0 */
142 240, 9999, 0, 0, 0, 1,
143 /* shoot 1 */
144 9999, 9999, 9989 + i * 5, 0, 1, 1));
145 for (i = -1; i <= 1; i++)
146 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH)
147 - (230.0 + 40.0 * ((double) i)),
148 -59.0 + 40.0 * ((double) i),
149 BALL_SOLDIER, 0,
150 70, -1, 0, -1, 0, 3, 2,
151 /* move 0 */
152 70, 0.0, 4.0, 0.0, 0.0,
153 0.0, 0.0, 0.0, 0.0, 1,
154 /* move 1 */
155 200, 0.0, 0.0, 0.0, 0.0,
156 0.0, 0.0, 0.0, 0.0, 2,
157 /* move 2 */
158 9999,
159 -1.1, 4.0,
160 0.0, 0.0,
161 0.0, 0.0, 0.0, 0.0, 2,
162 /* shoot 0 */
163 270, 9999, 0, 0, 0, 1,
164 /* shoot 1 */
165 9999, 9999, 9989 + i * 5, 0, 1, 1));
166 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) - 150.0, -19.0,
167 BALL_CAPTAIN, 0,
168 70, -1, 0, -1, 0, 3, 1,
169 /* move 0 */
170 70, 0.0, 4.0, 0.0, 0.0,
171 0.0, 0.0, 0.0, 0.0, 1,
172 /* move 1 */
173 90, 0.0, 0.0, 0.0, 0.0,
174 0.0, 0.0, 0.0, 0.0, 2,
175 /* move 2 */
176 9999, 4.0, 0.0, 0.0, 0.0,
177 0.0, 0.0, 0.0, 0.0, 2,
178 /* shoot 0 */
179 9999, 38, 0, 0, 1, 0));
180
181 for (i = -1; i <= 1; i++)
182 tenm_table_add(normal_enemy_new(237.0 + 40.0 * ((double) i),
183 -210.0 - 40.0 * ((double) i),
184 BALL_SOLDIER, 0,
185 70, -1, 0, -1, 0, 3, 2,
186 /* move 0 */
187 70, 0.0, 4.0, 0.0, 0.0,
188 0.0, 0.0, 0.0, 0.0, 1,
189 /* move 1 */
190 140, 0.0, 0.0, 0.0, 0.0,
191 0.0, 0.0, 0.0, 0.0, 2,
192 /* move 2 */
193 9999, 4.0, 3.0, 0.0, 0.0,
194 0.0, 0.0, 0.0, 0.0, 2,
195 /* shoot 0 */
196 210, 9999, 0, 0, 0, 1,
197 /* shoot 1 */
198 9999, 9999, 9989 + i * 5, 0, 1, 1));
199 for (i = -1; i <= 1; i++)
200 tenm_table_add(normal_enemy_new(403.0 + 40.0 * ((double) i),
201 -210.0 + 40.0 * ((double) i),
202 BALL_SOLDIER, 0,
203 70, -1, 0, -1, 0, 3, 2,
204 /* move 0 */
205 70, 0.0, 4.0, 0.0, 0.0,
206 0.0, 0.0, 0.0, 0.0, 1,
207 /* move 1 */
208 140, 0.0, 0.0, 0.0, 0.0,
209 0.0, 0.0, 0.0, 0.0, 2,
210 /* move 2 */
211 9999, -4.0, 3.0, 0.0, 0.0,
212 0.0, 0.0, 0.0, 0.0, 2,
213 /* shoot 0 */
214 210, 9999, 0, 0, 0, 1,
215 /* shoot 0 */
216 9999, 9999, 9989 + i * 5, 0, 1, 1));
217 tenm_table_add(normal_enemy_new(((double) (WINDOW_WIDTH / 2)), -170.0,
218 BALL_CAPTAIN, 0,
219 70, -1, 0, -1, 0, 3, 1,
220 /* move 0 */
221 70, 0.0, 4.0, 0.0, 0.0,
222 0.0, 0.0, 0.0, 0.0, 1,
223 /* move 1 */
224 90, 0.0, 0.0, 0.0, 0.0,
225 0.0, 0.0, 0.0, 0.0, 2,
226 /* move 2 */
227 9999, 0.0, -4.0, 0.0, 0.0,
228 0.0, 0.0, 0.0, 0.0, 2,
229 /* shoot 0 */
230 9999, 38, 19, 0, 1, 0));
231 }
232
233 if (t == 890)
234 tenm_table_add(plan_14_more_1_new());
235
236 return SCHEDULER_SUCCESS;
237 }
238
239 static tenm_object *
plan_14_more_1_new(void)240 plan_14_more_1_new(void)
241 {
242 tenm_object *new = NULL;
243 int *count = NULL;
244
245 count = (int *) malloc(sizeof(int) * 6);
246 if (count == NULL)
247 {
248 fprintf(stderr, "plan_14_more_1_new: malloc(count) failed\n");
249 return NULL;
250 }
251
252 /* list of count
253 * [0] mode
254 * [1 -- 2] timer
255 * [3] number of enemies killed
256 * [4] number of right captains created
257 * [5] number of right captains killed
258 */
259 count[0] = 0;
260 count[1] = -1;
261 count[2] = 0;
262 count[3] = 0;
263 count[4] = 0;
264 count[5] = 0;
265
266 new = tenm_object_new("plan 14 more 1", 0, 0,
267 1, 0.0, 0.0,
268 6, count, 0, NULL, 0, NULL,
269 (int (*)(tenm_object *, double))
270 NULL,
271 (int (*)(tenm_object *, tenm_object *))
272 NULL,
273 (int (*)(tenm_object *, const tenm_object *))
274 (&plan_14_more_1_act),
275 (int (*)(tenm_object *, int))
276 NULL);
277 if (new == NULL)
278 {
279 fprintf(stderr, "plan_14_more_1_new: tenm_object_new failed\n");
280 if (count != NULL)
281 free(count);
282 return NULL;
283 }
284
285 return new;
286 }
287
288 static int
plan_14_more_1_act(tenm_object * my,const tenm_object * player)289 plan_14_more_1_act(tenm_object *my, const tenm_object *player)
290 {
291 int i;
292 int t_shoot;
293 double dx;
294 double dy;
295
296 /* sanity check */
297 if (my == NULL)
298 {
299 fprintf(stderr, "plan_11_more_1_act: my is NULL\n");
300 return 0;
301 }
302 if (player == NULL)
303 return 0;
304
305 (my->count[1])++;
306
307 if (my->count[0] == 0)
308 {
309 if (my->count[1] % 82 == 0)
310 {
311 if (my->count[1] < 328)
312 tenm_table_add(normal_enemy_new(75.0, -24.0,
313 BALL_CAPTAIN, 0,
314 0, my->table_index, 3, -1, 0, 1, 1,
315 /* move 0 */
316 9999, 0.0, 5.2, 0.0, 0.0,
317 0.0, 0.0, 0.0, 0.0, 0,
318 /* shoot 0 */
319 9999, 37, my->count[0] % 37, 0, 1, 0));
320 if (my->count[1] < 492)
321 tenm_table_add(normal_enemy_new(-24.0, 240.0,
322 BALL_CAPTAIN, 0,
323 0, my->table_index, 3, -1, 0, 1, 1,
324 /* move 0 */
325 9999, 4.8, 2.0, 0.0, 0.0,
326 0.0, 0.0, 0.0, 0.0, 0,
327 /* shoot 0 */
328 9999, 37, my->count[0] % 37, 0, 1, 0));
329 }
330
331 if ((my->count[4] < 5) && (my->count[1] < 482)
332 && (my->count[4] <= my->count[5]))
333 {
334 (my->count[2])++;
335 if (my->count[2] >= 35)
336 {
337 (my->count[4])++;
338 my->count[2] = 0;
339
340 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) - 75.0, -24.0,
341 BALL_CAPTAIN, 0,
342 0, my->table_index, 5, -1, 0, 3, 2,
343 /* move 0 */
344 9, 0.0, 6.0, 0.0, 0.0,
345 0.0, 0.0, 0.0, 0.0, 1,
346 /* move 1 */
347 627 - my->count[1], 0.0, 0.0, 0.0, 0.0,
348 0.0, 0.0, 0.0, 0.0, 2,
349 /* move 2 */
350 9999, 0.0, -6.0, 0.0, 0.0,
351 0.0, 0.0, 0.0, 0.0, 2,
352 /* shoot 0 */
353 636 - my->count[1],
354 37, my->count[0] % 37, 0, 1, 1,
355 /* shoot 1 */
356 9999, 9999, 0, 0, 0, 1));
357 }
358 }
359
360 if ((my->count[1] >= 328) && (my->count[1] < 376) && (my->count[5] >= 2)
361 && ((my->count[1] - 328) % 12 == 0))
362 {
363 tenm_table_add(normal_enemy_new(-19.0, 0.0,
364 BALL_SOLDIER, 0,
365 0, my->table_index, 3, -1, 0, 1, 2,
366 /* move 0 */
367 9999, 3.6, 1.5, 0.0, 0.0,
368 0.0, 0.0, 0.0, 0.0, 0,
369 /* shoot 0 */
370 121 - (my->count[1] - 328),
371 9999, 0, 0, 0, 1,
372 /* shoot 1 */
373 9999, 9999, 0, 0, 1, 1));
374 tenm_table_add(normal_enemy_new(-19.0, 170.0,
375 BALL_SOLDIER, 0,
376 0, my->table_index, 3, -1, 0, 1, 2,
377 /* move 0 */
378 9999, 3.6, 1.5, 0.0, 0.0,
379 0.0, 0.0, 0.0, 0.0, 0,
380 /* shoot 0 */
381 121 - (my->count[1] - 328),
382 9999, 0, 0, 0, 1,
383 /* shoot 1 */
384 9999, 9999, 0, 0, 1, 1));
385 }
386 if ((my->count[1] >= 384) && (my->count[1] < 420) && (my->count[5] >= 4)
387 && ((my->count[1] - 384) % 6 == 0))
388 {
389 tenm_table_add(normal_enemy_new(-19.0, 85.0,
390 BALL_SOLDIER, 0,
391 0, my->table_index, 3, -1, 0, 1, 3,
392 /* move 0 */
393 9999, 7.2, 3.0, 0.0, 0.0,
394 0.0, 0.0, 0.0, 0.0, 0,
395 /* shoot 0 */
396 30, 9999, 0, 0, 0, 1,
397 /* shoot 1 */
398 15, 9999, 0, 0, 1, 2,
399 /* shoot 2 */
400 9999, 9999, 0, 0, 0, 2));
401 }
402 }
403 else if (my->count[0] == 1)
404 {
405 if (my->count[1] == 0)
406 {
407 tenm_table_add(normal_enemy_new(160.0, -23.0,
408 BRICK, 0,
409 0, -1, 0, -1, 0, 3, 2,
410 /* move 0 */
411 14, 0.0, 6.0, 0.0, 0.0,
412 0.0, 0.0, 0.0, 0.0, 1,
413 /* move 1 */
414 500, 0.0, 0.0, 0.0, 0.0,
415 0.0, 0.0, 0.0, 0.0, 2,
416 /* move 2 */
417 9999, 0.0, -6.0, 0.0, 0.0,
418 0.0, 0.0, 0.0, 0.0, 2,
419 /* shoot 0 */
420 514, 74, 37, 0, 1, 1,
421 /* shoot 1 */
422 9999, 9999, 0, 0, 0, 1));
423 tenm_table_add(normal_enemy_new(320.0, -23.0,
424 BRICK, 0,
425 0, -1, 0, -1, 0, 3, 2,
426 /* move 0 */
427 14, 0.0, 6.0, 0.0, 0.0,
428 0.0, 0.0, 0.0, 0.0, 1,
429 /* move 1 */
430 500, 0.0, 0.0, 0.0, 0.0,
431 0.0, 0.0, 0.0, 0.0, 2,
432 /* move 2 */
433 9999, 0.0, -6.0, 0.0, 0.0,
434 0.0, 0.0, 0.0, 0.0, 2,
435 /* shoot 0 */
436 514, 74, 0, 0, 1, 1,
437 /* shoot 1 */
438 9999, 9999, 0, 0, 0, 1));
439 tenm_table_add(normal_enemy_new(480.0, -23.0,
440 BRICK, 0,
441 0, -1, 0, -1, 0, 3, 2,
442 /* move 0 */
443 14, 0.0, 6.0, 0.0, 0.0,
444 0.0, 0.0, 0.0, 0.0, 1,
445 /* move 1 */
446 500, 0.0, 0.0, 0.0, 0.0,
447 0.0, 0.0, 0.0, 0.0, 2,
448 /* move 2 */
449 9999, 0.0, -6.0, 0.0, 0.0,
450 0.0, 0.0, 0.0, 0.0, 2,
451 /* shoot 0 */
452 514, 74, 37, 0, 1, 1,
453 /* shoot 1 */
454 9999, 9999, 0, 0, 0, 1));
455 }
456
457 if ((my->count[1] >= 0) && (my->count[1] < 144)
458 && ((my->count[1] - 0) % 12 == 0))
459 {
460 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) + 19.0, 0.0,
461 BALL_SOLDIER, 0,
462 0, -1, 0, -1, 0, 3, 2,
463 /* move 0 */
464 176, -3.6, 1.5, 0.0, 0.0,
465 0.0, 0.0, 0.0, 0.0, 1,
466 /* move 1 */
467 44, 0.0, -6.0, 0.0, 0.0,
468 0.0, 0.0, 0.0, 0.0, 2,
469 /* move 2 */
470 9999, 3.6, 1.5, 0.0, 0.0,
471 0.0, 0.0, 0.0, 0.0, 2,
472 /* shoot 0 */
473 320 - my->count[1], 9999, 0, 0, 0, 1,
474 /* shoot 1 */
475 9999, 9999, 0, 0, 1, 1));
476 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) + 19.0, 170.0,
477 BALL_SOLDIER, 0,
478 0, -1, 0, -1, 0, 3, 2,
479 /* move 0 */
480 176, -3.6, 1.5, 0.0, 0.0,
481 0.0, 0.0, 0.0, 0.0, 1,
482 /* move 1 */
483 44, 0.0, -6.0, 0.0, 0.0,
484 0.0, 0.0, 0.0, 0.0, 2,
485 /* move 2 */
486 9999, 3.6, 1.5, 0.0, 0.0,
487 0.0, 0.0, 0.0, 0.0, 2,
488 /* shoot 0 */
489 320 - my->count[1], 9999, 0, 0, 0, 1,
490 /* shoot 1 */
491 9999, 9999, 0, 0, 1, 1));
492 }
493
494 if ((my->count[1] >= 56) && (my->count[1] < 92)
495 && ((my->count[1] - 56) % 6 == 0))
496 {
497 if (my->count[1] == 86)
498 t_shoot = 15;
499 else
500 t_shoot = 9999;
501
502 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) + 19.0, 85.0,
503 BALL_SOLDIER, 0,
504 0, -1, 0, -1, 0, 1, 3,
505 /* move 0 */
506 9999, -7.2, 3.0, 0.0, 0.0,
507 0.0, 0.0, 0.0, 0.0, 0,
508 /* shoot 0 */
509 30, t_shoot, 0, 0, 0, 1,
510 /* shoot 1 */
511 15, 9999, 0, 0, 1, 2,
512 /* shoot 2 */
513 9999, 9999, 0, 0, 0, 2));
514 }
515
516 if ((my->count[1] >= 260) && (my->count[1] < 296)
517 && ((my->count[1] - 260) % 6 == 0))
518 {
519 if (my->count[1] == 290)
520 t_shoot = 15;
521 else
522 t_shoot = 9999;
523
524 tenm_table_add(normal_enemy_new(-17.6, 75.0,
525 BALL_SOLDIER, 0,
526 0, -1, 0, -1, 0, 1, 3,
527 /* move 0 */
528 9999, 7.2, 3.0, 0.0, 0.0,
529 0.0, 0.0, 0.0, 0.0, 0,
530 /* shoot 0 */
531 30, t_shoot, 0, 0, 0, 1,
532 /* shoot 1 */
533 15, 9999, 0, 0, 1, 2,
534 /* shoot 2 */
535 9999, 9999, 0, 0, 0, 2));
536 }
537 }
538 else if (my->count[0] == 2)
539 {
540 if (my->count[1] == 30)
541 {
542 for (i = 6; i < 9; i++)
543 {
544 if (i % 2 == 0)
545 t_shoot = 9959;
546 else
547 t_shoot = 0;
548
549 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) + 16.0
550 + 35.0 * ((double) i),
551 300.0 - 35.0 * ((double) i),
552 BALL_SOLDIER, 0,
553 106, -1, 0, -1, 0, 3, 3,
554 /* move 0 */
555 106, -6.0, 0.0, 0.0, 0.0,
556 0.0, 0.0, 0.0, 0.0, 1,
557 /* move 1 */
558 136, 0.0, 0.0, 0.0, 0.0,
559 0.0, 0.0, 0.0, 0.0, 2,
560 /* move 2 */
561 9999, 0.0 + 1.2, 3.0 + 0.5, 0.0, 0.0,
562 0.0, 0.0, 0.0, 0.0, 2,
563 /* shoot 0 */
564 72 - i * 8, 9999, 0, 0, 0, 1,
565 /* shoot 1 */
566 48, 9999, t_shoot, 0, 1, 2,
567 /* shoot 2 */
568 24, 9999, 0, 0, 0, 1));
569 }
570
571 for (i = 0; i < 6; i++)
572 {
573 if (i % 2 == 0)
574 t_shoot = 9959;
575 else
576 t_shoot = 0;
577
578 if (i < 3)
579 {
580 dx = 3.0;
581 dy = 0.0;
582 }
583 else
584 {
585 dx = 1.5;
586 dy = 1.5;
587 }
588
589 dx += 1.2;
590 dy += 0.5;
591
592 tenm_table_add(normal_enemy_new(((double) WINDOW_WIDTH) + 16.0
593 + 35.0 * ((double) i),
594 300.0 - 35.0 * ((double) i),
595 BALL_SOLDIER, 0,
596 106, -1, 0, -1, 0, 3, 3,
597 /* move 0 */
598 106, -6.0, 0.0, 0.0, 0.0,
599 0.0, 0.0, 0.0, 0.0, 1,
600 /* move 1 */
601 136, 0.0, 0.0, 0.0, 0.0,
602 0.0, 0.0, 0.0, 0.0, 2,
603 /* move 2 */
604 9999, dx, dy, 0.0, 0.0,
605 0.0, 0.0, 0.0, 0.0, 2,
606 /* shoot 0 */
607 48 - i * 8, 9999, t_shoot + i * 8,
608 0, 1, 1,
609 /* shoot 1 */
610 24, 9999, 0, 0, 0, 2,
611 /* shoot 2 */
612 48, 9999, t_shoot, 0, 1, 1));
613 }
614
615 for (i = 6; i < 9; i++)
616 {
617 if (i % 2 == 0)
618 t_shoot = 9959;
619 else
620 t_shoot = 0;
621
622 tenm_table_add(normal_enemy_new(-16.0 - 35.0 * ((double) i),
623 300.0 - 35.0 * ((double) i),
624 BALL_SOLDIER, 0,
625 106, -1, 0, -1, 0, 3, 3,
626 /* move 0 */
627 106, 6.0, 0.0, 0.0, 0.0,
628 0.0, 0.0, 0.0, 0.0, 1,
629 /* move 1 */
630 136, 0.0, 0.0, 0.0, 0.0,
631 0.0, 0.0, 0.0, 0.0, 2,
632 /* move 2 */
633 9999, 0.0 - 1.2, 3.0 + 0.5, 0.0, 0.0,
634 0.0, 0.0, 0.0, 0.0, 2,
635 /* shoot 0 */
636 72 - i * 8, 9999, 0, 0, 0, 1,
637 /* shoot 1 */
638 48, 9999, t_shoot, 0, 1, 2,
639 /* shoot 2 */
640 24, 9999, 0, 0, 0, 1));
641 }
642
643 for (i = 0; i < 6; i++)
644 {
645 if (i % 2 == 0)
646 t_shoot = 9959;
647 else
648 t_shoot = 0;
649
650 if (i < 3)
651 {
652 dx = -3.0;
653 dy = 0.0;
654 }
655 else
656 {
657 dx = -1.5;
658 dy = 1.5;
659 }
660
661 dx += -1.2;
662 dy += 0.5;
663
664 tenm_table_add(normal_enemy_new(-16.0 - 35.0 * ((double) i),
665 300.0 - 35.0 * ((double) i),
666 BALL_SOLDIER, 0,
667 106, -1, 0, -1, 0, 3, 3,
668 /* move 0 */
669 106, 6.0, 0.0, 0.0, 0.0,
670 0.0, 0.0, 0.0, 0.0, 1,
671 /* move 1 */
672 136, 0.0, 0.0, 0.0, 0.0,
673 0.0, 0.0, 0.0, 0.0, 2,
674 /* move 2 */
675 9999, dx, dy, 0.0, 0.0,
676 0.0, 0.0, 0.0, 0.0, 2,
677 /* shoot 0 */
678 48 - i * 8, 9999, t_shoot + i * 8,
679 0, 1, 1,
680 /* shoot 1 */
681 24, 9999, 0, 0, 0, 2,
682 /* shoot 2 */
683 48, 9999, t_shoot, 0, 1, 1));
684 }
685 }
686 }
687 else if (my->count[0] == 3)
688 {
689 if (my->count[1] == 0)
690 tenm_table_add(warning_new());
691
692 if (my->count[1] == 130)
693 {
694 tenm_table_add(strikers_new());
695 return 1;
696 }
697 }
698
699 if (my->count[0] == 0)
700 {
701 if (my->count[1] >= 642)
702 {
703 if ((my->count[3] >= 24) && (my->count[5] >= 5))
704 my->count[0] = 1;
705 else
706 my->count[0] = 2;
707
708 my->count[1] = -1;
709 my->count[2] = 0;
710 my->count[3] = 0;
711 my->count[4] = 0;
712 my->count[5] = 0;
713 }
714 }
715 else if (my->count[0] == 1)
716 {
717 if (my->count[1] >= 544)
718 {
719 my->count[0] = 2;
720
721 my->count[1] = -1;
722 my->count[2] = 0;
723 my->count[3] = 0;
724 my->count[4] = 0;
725 my->count[5] = 0;
726 }
727 }
728 else if (my->count[0] == 2)
729 {
730 if (my->count[1] >= 522)
731 {
732 my->count[0] = 3;
733
734 my->count[1] = -1;
735 my->count[2] = 0;
736 my->count[3] = 0;
737 my->count[4] = 0;
738 my->count[5] = 0;
739 }
740 }
741
742 return 0;
743 }
744