0
|
1 #include <stdlib.h>
|
|
2 #include <SDL.h>
|
|
3 #include "bool.h"
|
|
4 #include "schedule.h"
|
|
5 #include "Character.h"
|
|
6 #include "Character_state.h"
|
|
7 #include "sound.h"
|
|
8 #include "bom.h"
|
|
9 #include "tokuten.h"
|
|
10 #include "count2.h"
|
|
11 //#include "libps.h"
|
|
12 #include"debug.h"
|
|
13 #include "SDL_opengl.h"
|
|
14 enum {
|
|
15 FRAME_RATE = 32,
|
|
16 };
|
|
17
|
|
18 /*enemy schedule*/
|
|
19 //int kyeenemyno = -1;
|
|
20 void schedule()
|
|
21 {
|
|
22 CHARACTER *p;
|
|
23 int i;
|
|
24 if (stage == 0)
|
|
25 {
|
|
26 switch (filpcount) {
|
|
27 case 1:
|
|
28 SoundStop();
|
|
29 SoundPlay(0);
|
|
30 break;
|
|
31
|
|
32 case FRAME_RATE * 2:
|
|
33 Putenemy(1, 120, -128, 0, 4, chara_state0);
|
|
34 break;
|
|
35 case FRAME_RATE * 3:
|
|
36 Putenemy(1, 56, -128, 0, 8, chara_state0);
|
|
37 Putenemy(1, 184, -128, 0, 8, chara_state0);
|
|
38 break;
|
|
39 case FRAME_RATE * 4:
|
|
40 Putenemy(1, 120, -128, 0, 4, chara_state0);
|
|
41 break;
|
|
42 case FRAME_RATE * 5:
|
|
43 Putenemy(1, 224, -128, 1, 1, chara_state0);
|
|
44 Putenemy(1, 184, -128, 1, 1, chara_state0);
|
|
45 break;
|
|
46 case FRAME_RATE * 6:
|
|
47 Putenemy(1, 120, -128, 1, 2, chara_state0);
|
|
48 break;
|
|
49 case FRAME_RATE * 7:
|
|
50 Putenemy(1, 56, -128, 0, 1, chara_state0);
|
|
51 Putenemy(1, 184, -128, 0, 1, chara_state0);
|
|
52 break;
|
|
53 case FRAME_RATE * 8:
|
|
54 Putenemy(2, 120, -128, 0, 1, chara_state0);
|
|
55 break;
|
|
56
|
|
57 case FRAME_RATE * 12:
|
|
58 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
|
|
59 break;
|
|
60 case FRAME_RATE * 13:
|
|
61 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
|
|
62 break;
|
|
63 case FRAME_RATE * 14:
|
|
64 Putenemy(1, 1280 - 128 - 120, -128, 0, 1, chara_state4);
|
|
65 break;
|
|
66 case FRAME_RATE * 15:
|
|
67 Putenemy(2, 1280 - 128 - 120, -128, -1, 1, chara_state4);
|
|
68 break;
|
|
69 case FRAME_RATE * 16:
|
|
70 Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4);
|
|
71 break;
|
|
72 case FRAME_RATE * 17:
|
|
73 Putenemy(2, 1280 - 128 - 120, -128, 0, 1, chara_state4);
|
|
74 break;
|
|
75 case FRAME_RATE * 18:
|
|
76 Putenemy(1, 1280 - 128 - 120, -32, 0, 1, chara_state4);
|
|
77 Putenemy(1, 1280 - 128, -128, -2, 1, chara_state4);
|
|
78 Putenemy(1, 800, -88, -1, 1, chara_state4);
|
|
79 break;
|
|
80
|
|
81 case FRAME_RATE * 24:
|
|
82 Putenemy(1, 256, -128, 0, 1, chara_state4);
|
|
83 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
|
|
84 break;
|
|
85 case FRAME_RATE * 25:
|
|
86 Putenemy(2, 512, -128, 0, 1, chara_state4);
|
|
87 Putenemy(2, 1280 - 128, -128, 0, 1, chara_state4);
|
|
88 break;
|
|
89 case FRAME_RATE * 26:
|
|
90 Putenemy(1, 384, -128, 0, 1, chara_state4);
|
|
91 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
|
|
92 Putenemy(1, 512, -128, 0, 3, chara_state4);
|
|
93 Putenemy(1, 1280 - 256, -128, 0, 2, chara_state4);
|
|
94 break;
|
|
95 case FRAME_RATE * 27:
|
|
96 Putenemy(2, 512, -128, 0, 3, chara_state2);
|
|
97 Putenemy(2, 256 - 128, -128, 0, 2, chara_state2);
|
|
98 Putenemy(2, 768, -128, 0, 4, chara_state2);
|
|
99 Putenemy(2, 128, -128, 0, 3, chara_state2);
|
|
100 break;
|
|
101 case FRAME_RATE * 28:
|
|
102 Putenemy(1, 256, -128, 0, 1, chara_state4);
|
|
103 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
|
|
104 break;
|
|
105 case FRAME_RATE * 29:
|
|
106 Putenemy(2, 256, -128, 0, 1, chara_state4);
|
|
107 Putenemy(2, 1280 - 256 - 128, -128, 0, 1, chara_state4);
|
|
108 break;
|
|
109 case FRAME_RATE * 30:
|
|
110 Putenemy(1, 256, -128, 0, 1, chara_state4);
|
|
111 Putenemy(1, 1280 - 256 - 128, -128, 0, 1, chara_state4);
|
|
112 break;
|
|
113
|
|
114 case FRAME_RATE * 33:
|
|
115 Putenemy(1, 256, 1088, 0, -1, chara_state5);
|
|
116 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);//5/22/pm5:300
|
|
117 break;
|
|
118 case FRAME_RATE * 34:
|
|
119 Putenemy(2, 256, 1088, 0, -1, chara_state5);
|
|
120 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
121 break;
|
|
122 case FRAME_RATE * 35:
|
|
123 Putenemy(1, 256, 1088, 0, -1, chara_state5);
|
|
124 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
125 break;
|
|
126 case FRAME_RATE * 36:
|
|
127 Putenemy(2, 256, 1088, 0, -1, chara_state5);
|
|
128 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
129 break;
|
|
130 case FRAME_RATE * 37:
|
|
131 Putenemy(1, 256, 1088, 0, -1, chara_state5);
|
|
132 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
133 break;
|
|
134 case FRAME_RATE * 38:
|
|
135 Putenemy(2, 256, 1088, 0, -1, chara_state5);
|
|
136 Putenemy(2, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
137 break;
|
|
138 case FRAME_RATE * 39:
|
|
139 Putenemy(1, 256, 1088, 0, -1, chara_state5);
|
|
140 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state5);
|
|
141 break;
|
|
142
|
|
143 case FRAME_RATE * 50:
|
|
144 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
|
|
145 break;
|
|
146 case FRAME_RATE * 46:
|
|
147 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
|
|
148 break;
|
|
149 case FRAME_RATE * 54:
|
|
150 Putenemy(40, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state3);
|
|
151 break;
|
|
152
|
|
153 case FRAME_RATE * 60:
|
|
154 Putenemy(1, 256, 1088, 0, -1, chara_state6);
|
|
155 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
156 break;
|
|
157 case FRAME_RATE * 61:
|
|
158 Putenemy(1, 256, 1088, 0, -1, chara_state6);
|
|
159 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
160 break;
|
|
161 case FRAME_RATE * 62:
|
|
162 Putenemy(1, 256, 1088, 0, -1, chara_state6);
|
|
163 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
164 break;
|
|
165 case FRAME_RATE * 63:
|
|
166 Putenemy(1, 256, 1088, 0, -1, chara_state6);
|
|
167 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
168 break;
|
|
169 case FRAME_RATE * 64:
|
|
170 Putenemy(1, 256, 1088, 0, -1, chara_state6);
|
|
171 Putenemy(1, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
172 break;
|
|
173 case FRAME_RATE * 65:
|
|
174 Putenemy(40, 256, 1088, 0, -1, chara_state6);
|
|
175 Putenemy(40, 1280 - 256 - 128, 1088, 0, -1, chara_state6);
|
|
176 break;
|
|
177
|
|
178 case FRAME_RATE * 80:
|
|
179 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
180 break;
|
|
181 case FRAME_RATE * 66:
|
|
182 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
183 break;
|
|
184 case FRAME_RATE * 84:
|
|
185 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
186 break;
|
|
187 case FRAME_RATE * 70:
|
|
188 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
189 break;
|
|
190 case FRAME_RATE * 88:
|
|
191 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
192 break;
|
|
193 case FRAME_RATE * 74:
|
|
194 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
195 break;
|
|
196 case FRAME_RATE * 92:
|
|
197 Putenemy(42, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
198 break;
|
|
199 case FRAME_RATE * 78:
|
|
200 Putenemy(41, rand() % (1280 - 256) + 128, -128, 0, 1, chara_state7);
|
|
201 break;
|
|
202
|
|
203 case FRAME_RATE * 100:
|
|
204 Putenemy(41, 256, -128, 0, 1, chara_state7);
|
|
205 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
206 break;
|
|
207 case FRAME_RATE * 81:
|
|
208 Putenemy(42, 256, -128, 0, 1, chara_state7);
|
|
209 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
210 break;
|
|
211 case FRAME_RATE * 104:
|
|
212 Putenemy(41, 256, -128, 0, 1, chara_state7);
|
|
213 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
214 break;
|
|
215 case FRAME_RATE * 83:
|
|
216 Putenemy(42, 256, -128, 0, 1, chara_state7);
|
|
217 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
218 break;
|
|
219 case FRAME_RATE * 108:
|
|
220 Putenemy(41, 256, -128, 0, 1, chara_state7);
|
|
221 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
222 break;
|
|
223 case FRAME_RATE * 85:
|
|
224 Putenemy(42, 256, -128, 0, 1, chara_state7);
|
|
225 Putenemy(42, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
226 break;
|
|
227 case FRAME_RATE * 112:
|
|
228 Putenemy(41, 256, -128, 0, 1, chara_state7);
|
|
229 Putenemy(41, 1280 - 256 - 128, -128, 0, 1, chara_state7);
|
|
230 break;
|
|
231
|
|
232 case FRAME_RATE * 130:
|
|
233 SoundStop();
|
|
234 SoundPlay(4);
|
|
235 for(p = active_chara_list;p!=NULL;p=p->next)
|
|
236 {
|
|
237 p->f = FALSE;
|
|
238 p->state = delete_chara;
|
|
239 p->collision = noaction;
|
|
240 }
|
|
241 Putenemy(4, 520, -128, 0, 1, chara_state8); // 1面ボスをPutenemy
|
|
242 } //case文
|
|
243
|
|
244 //kyeenemynoはenemyオブジェクトのID。
|
|
245 //ボスが登場していないときはkyeenemynoに-1がセットされる。
|
|
246 //move.cではenemyオブジェクトのIDはtekinoで扱うが、
|
|
247 //ボスのenemyオブジェクトだけ特別にkyeenemynoにもIDがセットされる。
|
|
248 //kyeenemynoはボスの初期化時にセットされる。
|
|
249 if (filpcount > FRAME_RATE * 130) {
|
|
250 if (kyeenemyno->f == FALSE) {
|
|
251 // ボスが死ぬと実行される
|
|
252 //if (enemy[kyeenemyno].y < 240 + 32) {
|
|
253 // 条件を満たすとSuperbomが呼ばれるが何の条件かは
|
|
254 // 分からない。Superbomはoriginalのゲーム中では一回も
|
|
255 // 呼ばれない。if文をはずすと一瞬だけ大きな爆発が
|
|
256 // 起こるがショボイ。
|
|
257 // Superbom(enemy[kyeenemyno].x, enemy[kyeenemyno].y);
|
|
258 //}
|
|
259 stage = 1;
|
|
260 filpcount = 0;
|
|
261 //kyeenemyno = -1;
|
|
262 clear_result[0] = infg_level;
|
|
263 }
|
|
264 }
|
|
265 } //stage0.end
|
|
266
|
|
267 if (stage == 1) {
|
|
268 switch (filpcount) {
|
|
269 case 1:
|
|
270 SoundStop();
|
|
271 SoundPlay(1);
|
|
272 //SsSetTempo(seq[1], 0, 140);
|
|
273 break;
|
|
274
|
|
275 case FRAME_RATE * 3:
|
|
276 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
277 break;
|
|
278 case FRAME_RATE * 4:
|
|
279 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
280 break;
|
|
281 case FRAME_RATE * 5:
|
|
282 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
283 break;
|
|
284 case FRAME_RATE * 6:
|
|
285 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
286 break;
|
|
287 case FRAME_RATE * 7:
|
|
288 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
289 break;
|
|
290 case FRAME_RATE * 8:
|
|
291 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
292 break;
|
|
293 case FRAME_RATE * 9:
|
|
294 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
295 break;
|
|
296 case FRAME_RATE * 10:
|
|
297 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
298 break;
|
|
299 case FRAME_RATE * 11:
|
|
300 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
301 break;
|
|
302 case FRAME_RATE * 12:
|
|
303 Putenemy(2, 256, -128, -1, 2, chara_state7);
|
|
304 break;
|
|
305 case FRAME_RATE * 13:
|
|
306 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
307 break;
|
|
308 case FRAME_RATE * 14:
|
|
309 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
310 break;
|
|
311 case FRAME_RATE * 15:
|
|
312 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
313 break;
|
|
314 case FRAME_RATE * 16:
|
|
315 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
316 break;
|
|
317 case FRAME_RATE * 20:
|
|
318 Putenemy(2, 512, -128, 0, 2, chara_state4);
|
|
319 Putenemy(2, 1024, -128, 0, 1, chara_state4);
|
|
320 break;
|
|
321 case FRAME_RATE * 21:
|
|
322 Putenemy(42, 0, 384, 0, 0, chara_state401);
|
|
323 break;
|
|
324 case FRAME_RATE * 23:
|
|
325 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
326 break;
|
|
327 case FRAME_RATE * 24:
|
|
328 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
329 break;
|
|
330 case FRAME_RATE * 25:
|
|
331 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
332 break;
|
|
333 case FRAME_RATE * 26:
|
|
334 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
335 break;
|
|
336 case FRAME_RATE * 27:
|
|
337 Putenemy(2, 800, 0, 1, 3, chara_state5);
|
|
338 break;
|
|
339 case FRAME_RATE * 28:
|
|
340 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
341 break;
|
|
342 case FRAME_RATE * 29:
|
|
343 Putenemy(41, 256, 0, 0, 1, chara_state5);
|
|
344 Putenemy(41, 1280 - 256 - 128, 0, 0, 1, chara_state5);
|
|
345 Putenemy(9, 0, 0, 0, 3, chara_state22);
|
|
346 break;
|
|
347 case FRAME_RATE * 30:
|
|
348 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
349 break;
|
|
350 case FRAME_RATE * 31:
|
|
351 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
352 break;
|
|
353 case FRAME_RATE * 32:
|
|
354 Putenemy(42, 1280, 256, 0, -1, chara_state402);
|
|
355 Putenemy(42, 1280, 384, 0, 0, chara_state402);
|
|
356 Putenemy(42, 1280, 512, 0, -1, chara_state402);
|
|
357 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
358 break;
|
|
359 case FRAME_RATE * 33:
|
|
360 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
361 break;
|
|
362 case FRAME_RATE * 34:
|
|
363 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
364 break;
|
|
365 case FRAME_RATE * 35:
|
|
366 Putenemy(2, 640, 0, 0, 3, chara_state5);
|
|
367 break;
|
|
368 case FRAME_RATE * 36:
|
|
369 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
370 break;
|
|
371 case FRAME_RATE * 43:
|
|
372 for (i = 0; i < 7; i++) {
|
|
373 Putenemy(43, rand() % 2560, -i * 16, 0, rand() % 4, chara_state400);
|
|
374 }
|
|
375 break;
|
|
376 case FRAME_RATE * 44:
|
|
377 for (i = 0; i < 9; i++) {
|
|
378 Putenemy(43, rand() % 2560, -i * 12, 0, rand() % 4, chara_state400);
|
|
379 }
|
|
380 break;
|
|
381 case FRAME_RATE * 45:
|
|
382 for (i = 0; i < 5; i++) {
|
|
383 Putenemy(43, rand() % 640, 0, 0, rand() % 4, chara_state400);
|
|
384 }
|
|
385 break;
|
|
386 case FRAME_RATE * 48:
|
|
387 Putenemy(41, 88, 0, 0, 2, chara_state3);
|
|
388 Putenemy(41, 176, 0, 0, 3, chara_state3);
|
|
389 break;
|
|
390 case FRAME_RATE * 50:
|
|
391 Putenemy(41, 266, 0, 0, 3, chara_state4);
|
|
392 break;
|
|
393 case FRAME_RATE * 51:
|
|
394 Putenemy(41, 352, 0, 0, 3, chara_state5);
|
|
395 break;
|
|
396 case FRAME_RATE * 52:
|
|
397 Putenemy(40, 840, 0, 4, 0, chara_state6);
|
|
398 Putenemy(40, 928, 0, 4, 0, chara_state7);
|
|
399 Putenemy(9, 976, 0, 4, 0, chara_state22);
|
|
400 break;
|
|
401 case FRAME_RATE * 61:
|
|
402 /*
|
|
403 for (i = 0; i < 300; i++) {
|
|
404 enemy[i].f = FALSE;
|
|
405 }
|
|
406 */
|
|
407 for(p = active_chara_list->next;p!=NULL;p=p->next)
|
|
408 {
|
|
409 p->state = delete_chara;
|
|
410 p->collision = noaction;
|
|
411 p->f = FALSE;
|
|
412 }
|
|
413 break;
|
|
414
|
|
415 case FRAME_RATE * 64:
|
|
416 SoundStop();
|
|
417 SoundPlay(5);
|
|
418 Putenemy(18, 528, 0, 0, 0, chara_state24);
|
|
419 /* Puttama(6,100,0); */
|
|
420
|
|
421 Putenemy(13, 688, 28, 0, 0, chara_state31);
|
|
422 Putenemy(14, 368, 28, 0, 0, chara_state32);
|
|
423
|
|
424 Putenemy(11, 656, 0, 0, 0, chara_state33);
|
|
425 Putenemy(12, 400, 0, 0, 0, chara_state34);
|
|
426
|
|
427 Putenemy(15, 528, 32, 0, 0, chara_state35);
|
|
428 break;
|
|
429 }
|
|
430 //////////////////////
|
|
431
|
|
432 if (filpcount > FRAME_RATE * 64) {
|
|
433 if (kyeenemyno->f == FALSE) {
|
|
434 Superbom(kyeenemyno->x, kyeenemyno->y);
|
|
435 stage = 2;
|
|
436 filpcount = 0;
|
|
437 //kyeenemyno = -1;
|
|
438 clear_result[1] = infg_level;
|
|
439 }
|
|
440 }
|
|
441 }
|
|
442 if (stage == 2) {
|
|
443 switch (filpcount) {
|
|
444 case 1:
|
|
445 SoundStop();
|
|
446 SoundPlay(2);
|
|
447 break;
|
|
448
|
|
449 case FRAME_RATE * 2:
|
|
450 for (i = 0; i < 5; i++) {
|
|
451 Putenemy(43, rand() % 2560, -i * 16, 0, rand() % 4, chara_state400);
|
|
452 }
|
|
453 break;
|
|
454
|
|
455 case FRAME_RATE * 3:
|
|
456 for (i = 0; i < 7; i++) {
|
|
457 Putenemy(43, rand() % 2560, -i * 16, 0, rand() % 4, chara_state400);
|
|
458 }
|
|
459 break;
|
|
460 case FRAME_RATE * 4:
|
|
461 for (i = 0; i < 9; i++) {
|
|
462 Putenemy(43, rand() % 2560, -i * 12, 0, rand() % 4, chara_state400);
|
|
463 }
|
|
464 break;
|
|
465 case FRAME_RATE * 5:
|
|
466 for (i = 0; i < 5; i++) {
|
|
467 Putenemy(43, rand() % 2560, 0, 0, rand() % 4, chara_state400);
|
|
468 }
|
|
469 break;
|
|
470 case FRAME_RATE * 9:
|
|
471 for (i = 0; i < 4; i++) {
|
|
472 Putenemy(1, i * 128 + 128, 0, i, rand() % 4 + 1, chara_state7);
|
|
473 }
|
|
474 break;
|
|
475 case FRAME_RATE * 10:
|
|
476 for (i = 0; i < 4; i++) {
|
|
477 Putenemy(1, 1120 - i * 128, 0, 4 - i, rand() % 4 + 1, chara_state7);
|
|
478 }
|
|
479 break;
|
|
480 case FRAME_RATE * 11:
|
|
481 for (i = 0; i < 4; i++) {
|
|
482 Putenemy(41, 4*i * 64*4 + 32*4, 0, 2, rand() % 2 + 1, chara_state6);
|
|
483 }
|
|
484 break;
|
|
485 case FRAME_RATE * 12:
|
|
486 for (i = 0; i < 4; i++) {
|
|
487 Putenemy(41, 280*4 - i * 64*4, 0, -2, rand() % 2 + 1, chara_state6);
|
|
488 }
|
|
489 break;
|
|
490 case FRAME_RATE * 15:
|
|
491 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
492 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
493 break;
|
|
494 case FRAME_RATE * 16:
|
|
495 Putenemy(41, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
496 Putenemy(41, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
497 break;
|
|
498 case FRAME_RATE * 18:
|
|
499 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
500 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
501 break;
|
|
502 case FRAME_RATE * 19:
|
|
503 Putenemy(41, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
504 break;
|
|
505 case FRAME_RATE * 20:
|
|
506 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
507 break;
|
|
508 case FRAME_RATE * 24:
|
|
509 Putenemy(41, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
510 break;
|
|
511 case FRAME_RATE * 25:
|
|
512 Putenemy(42, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
513 break;
|
|
514 case FRAME_RATE * 26:
|
|
515 Putenemy(41, rand() % (320*4 - 64*4) + 32*4, -32*4, 0, 1, chara_state7);
|
|
516 break;
|
|
517 case FRAME_RATE * 30:
|
|
518 Putenemy(1, 400, -128, 0, 3, chara_state3);
|
|
519 Putenemy(1, 560, -128, 0, 2, chara_state3);
|
|
520 Putenemy(1, 400, -128, 0, 1, chara_state3);
|
|
521 break;
|
|
522 case FRAME_RATE * 31:
|
|
523 Putenemy(1, 400, -128, 0, 3, chara_state3);
|
|
524 Putenemy(1, 400, -128, 0, 1, chara_state3);
|
|
525 break;
|
|
526 case FRAME_RATE * 32:
|
|
527 Putenemy(1, 400, -128, 0, 3, chara_state3);
|
|
528 Putenemy(1, 560, -128, 0, 2, chara_state3);
|
|
529 Putenemy(1, 400, -128, 0, 1, chara_state3);
|
|
530 break;
|
|
531 case FRAME_RATE * 36:
|
|
532 Putenemy(1, 400, -128, 0, 3, chara_state3);
|
|
533 Putenemy(1, 560, -128, 0, 2, chara_state3);
|
|
534 Putenemy(1, 400, -128, 0, 1, chara_state3);
|
|
535 break;
|
|
536 case FRAME_RATE * 37:
|
|
537 Putenemy(1, 440, -128, 0, 3, chara_state3);
|
|
538 break;
|
|
539 case FRAME_RATE * 38:
|
|
540 Putenemy(1, 600, -128, 0, 2, chara_state3);
|
|
541 Putenemy(1, 760, -128, 0, 1, chara_state3);
|
|
542 break;
|
|
543 case FRAME_RATE * 39:
|
|
544 Putenemy(1, 480, -128, 0, 3, chara_state3);
|
|
545 Putenemy(1, 640, -128, 0, 2, chara_state3);
|
|
546 Putenemy(1, 800, -128, 0, 1, chara_state3);
|
|
547 break;
|
|
548 case FRAME_RATE * 40:
|
|
549 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
550 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
551 break;
|
|
552 case FRAME_RATE * 41:
|
|
553 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
554 break;
|
|
555 case FRAME_RATE * 42:
|
|
556 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
557 break;
|
|
558 case FRAME_RATE * 43:
|
|
559 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
560 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
561 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
562 break;
|
|
563 case FRAME_RATE * 44:
|
|
564 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
565 break;
|
|
566 case FRAME_RATE * 45:
|
|
567 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
568 break;
|
|
569 case FRAME_RATE * 46:
|
|
570 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
571 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
572 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
573 break;
|
|
574 case FRAME_RATE * 47:
|
|
575 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
576 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
577 break;
|
|
578 case FRAME_RATE * 48:
|
|
579 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
580 break;
|
|
581 case FRAME_RATE * 49:
|
|
582 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
583 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
584 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
585 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
586 break;
|
|
587 case FRAME_RATE * 52:
|
|
588 Putenemy(42, 0, 128, 0, 0, chara_state401);
|
|
589 Putenemy(42, 0, 256, 0, 1, chara_state401);
|
|
590 Putenemy(42, 0, 384, 0, 0, chara_state401);
|
|
591 Putenemy(42, 0, 512, 0, -1, chara_state401);
|
|
592 break;
|
|
593 case FRAME_RATE * 54:
|
|
594 Putenemy(42, 1280, 128, 0, 0, chara_state402);
|
|
595 Putenemy(42, 1280, 256, 0, 1, chara_state402);
|
|
596 Putenemy(42, 1280, 384, 0, 0, chara_state402);
|
|
597 Putenemy(42, 1280, 512, 0, -1, chara_state402);
|
|
598 break;
|
|
599 case FRAME_RATE * 56:
|
|
600 Putenemy(42, 0, 128, 0, 0, chara_state401);
|
|
601 Putenemy(42, 0, 256, 0, 1, chara_state401);
|
|
602 Putenemy(42, 0, 384, 0, 0, chara_state401);
|
|
603
|
|
604 Putenemy(42, 1280, 256, 0, 1, chara_state402);
|
|
605 Putenemy(42, 1280, 384, 0, 0, chara_state402);
|
|
606 Putenemy(42, 1280, 512, 0, -1, chara_state402);
|
|
607 break;
|
|
608 case FRAME_RATE * 59:
|
|
609 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
610 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
611 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
612 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
613 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
614 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
615 break;
|
|
616 case FRAME_RATE * 61:
|
|
617 Putenemy(1, 400, -128, 0, 1, chara_state3);
|
|
618 Putenemy(1, 560, 1008, 0, 1, chara_state3);
|
|
619 Putenemy(1, 720, 1040, 0, 1, chara_state3);
|
|
620 break;
|
|
621 case FRAME_RATE * 62:
|
|
622 for (i = 0; i < 9; i++) {
|
|
623 Putenemy(43, rand() % 2560, -i * 12, 0, rand() % 4, chara_state400);
|
|
624 }
|
|
625 break;
|
|
626 case FRAME_RATE * 63:
|
|
627 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
628 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
629 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
630 break;
|
|
631 case FRAME_RATE * 65:
|
|
632 Putenemy(2, 440, -128, 0, -2, chara_state3);
|
|
633 break;
|
|
634 case FRAME_RATE * 66:
|
|
635 Putenemy(2, 600, -128, 0, -2, chara_state3);
|
|
636 Putenemy(1, 760, 1040, 0, -1, chara_state3);
|
|
637 break;
|
|
638 case FRAME_RATE * 67:
|
|
639 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
640 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
641 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
642 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
643 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
644 Putenemy(9, 0, 0, 0, 0, chara_state22);
|
|
645 break;
|
|
646 case FRAME_RATE * 69:
|
|
647 Putenemy(2, 480, 1040, 0, -3, chara_state3);
|
|
648 Putenemy(1, 640, 1040, 0, -2, chara_state3);
|
|
649 Putenemy(2, 800, 1040, 0, -1, chara_state3);
|
|
650 break;
|
|
651 case FRAME_RATE * 85:
|
|
652 SoundStop();
|
|
653 SoundPlay(4);
|
|
654 Putenemy(44, 0, 0, 1, 1, chara_state410);
|
|
655 break;
|
|
656 }
|
|
657 if (filpcount > FRAME_RATE * 85) {
|
|
658 if (kyeenemyno->f == FALSE) {
|
|
659 Superbom(kyeenemyno->x, kyeenemyno->y);
|
|
660 stage = 3;
|
|
661 filpcount = 0;
|
|
662 //kyeenemyno = -1;
|
|
663 clear_result[2] = infg_level;
|
|
664 }
|
|
665 }
|
|
666 }
|
|
667
|
|
668 if (stage == 3) {
|
|
669 switch (filpcount) {
|
|
670 case 1:
|
|
671 SoundStop();
|
|
672 SoundPlay(3);
|
|
673 break;
|
|
674 //now
|
|
675 case FRAME_RATE * 10:
|
|
676 Putenemy(30, 640, 200 - 64, 0, 0, chara_state500);
|
|
677 break;
|
|
678 }
|
|
679 if (filpcount > FRAME_RATE * 10) {
|
|
680 if (kyeenemyno->f == FALSE) {
|
|
681 Superbom(kyeenemyno->x, kyeenemyno->y);
|
|
682
|
|
683 stage = 4;
|
|
684 filpcount = 0;
|
|
685 //kyeenemyno = -1;
|
|
686 }
|
|
687 }
|
|
688 }
|
|
689
|
|
690 if (stage == 4) {
|
|
691 switch (filpcount) {
|
|
692 case 4:
|
|
693 Putenemy(49, 640, 200-64, 0, 0, chara_state600);
|
|
694 }
|
|
695 if (filpcount > 4) {
|
|
696 if (kyeenemyno->f == FALSE) {
|
|
697 Superbom(kyeenemyno->x, kyeenemyno->y);
|
|
698
|
|
699 stage = 5;
|
|
700 filpcount = 0;
|
|
701 //kyeenemyno = -1;
|
|
702 clear_result[3] = infg_level;
|
|
703 SoundStop();
|
|
704 SoundPlay(6);
|
|
705 }
|
|
706 }
|
|
707 }
|
|
708 if (stage == 5) {
|
|
709 /*
|
|
710 for (i = 0; i < 300; i++) {
|
|
711 if (enemy[i].f == TRUE) {
|
|
712 // goto noend;
|
|
713 filpcount = 0;
|
|
714 }
|
|
715 }
|
|
716 */
|
|
717
|
|
718
|
|
719 Endingscore(filpcount);
|
|
720 if (filpcount > 4000)
|
|
721 filpcount = 4000;
|
|
722 }
|
|
723 }
|
|
724
|