0
|
1 #include <stdlib.h>
|
|
2 #include <SDL.h>
|
|
3 #include "object.h"
|
|
4 #include "bom.h"
|
|
5 //#include "libps.h"
|
|
6 #include "sgoex.h"
|
|
7 #include"debug.h"
|
|
8
|
|
9 int sb_x, sb_y;
|
|
10 int sb_size = -1;
|
|
11 int se_voice[9];
|
|
12
|
|
13 bomchar bchar[100];
|
|
14 bomchar *bom_p;
|
|
15 int bomend = -1;
|
|
16
|
|
17
|
|
18 void Bom(int x, int y)
|
|
19 {
|
|
20 int i;
|
|
21 bomend++;
|
|
22 if (bomend > 49) {
|
|
23 bomend = 49;
|
|
24 return;
|
|
25 }
|
|
26
|
|
27 i = bomend;
|
|
28 bchar[i].x = x;
|
|
29 bchar[i].y = y;
|
|
30 bchar[i].no = 0;
|
|
31 bchar[i].f = 0;
|
|
32 //se_voice[0] = SsUtKeyOn(vab[0], 0, 0, 65, 0, 60, 60);
|
|
33 return;
|
|
34 }
|
|
35
|
|
36 void Putbom()
|
|
37 {
|
|
38 int i;
|
|
39 for (i = 0; i < bomend + 1; i++) {
|
|
40 if (bchar[i].no != 8) {
|
|
41 count++;
|
|
42 DefSpriteEx(30 + bchar[i].no, 8, 8);
|
|
43 // PutSprite(count, bchar[i].x, bchar[i].y, 30 + bchar[i].no);
|
|
44 PutSpriteEx(30 + bchar[i].no, bchar[i].x+96, bchar[i].y+96, 2, 2, 1);
|
|
45 bchar[i].no++;
|
|
46
|
|
47 }
|
|
48 if (bchar[i].no == 8) {
|
|
49 //SsUtKeyOff(se_voice[0], vab[0], 0, 0, 65);
|
|
50 if (bomend == i) {
|
|
51 bomend--;
|
|
52 break;
|
|
53 }
|
|
54 if (bomend > i) {
|
|
55 bchar[i] = bchar[bomend];
|
|
56 bomend--;
|
|
57 i--;
|
|
58 }
|
|
59 }
|
|
60 }
|
|
61 }
|
|
62
|
|
63 void Superbom(int x, int y)
|
|
64 {
|
|
65 Bom(x + rand() % 128 - 64, y + rand() % 128 - 32);
|
|
66 /*sb_x = x; sb_y = y;
|
|
67 sb_size = 0; */
|
|
68 return;
|
|
69 }
|