annotate src/collision.cc @ 4:bb2fbe78c7cd

moving title scene.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Tue, 07 Dec 2010 18:37:43 +0900
parents deb7e09824a4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <stdio.h>
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <stdlib.h>
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include <SDL.h>
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "SDL_opengl.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #include "object.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #include "Character.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 #include "Character_state.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 #include "tokuten.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #include "collision.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 //#include "atari.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #include "bom.h"
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
12 #include "count.h"
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #include "sound.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 //#include "Enemy.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 //#include "libps.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 #include "sgoex.h"
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
18 #include "SceneGraph.h"
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
19 #include "S_Dandy.h"
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
20
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 extern SpriteTable sptable[DEFOBJ];
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 void
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
24 nocollision(SceneGraphPtr node, int screen_w, int screen_h,
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 SceneGraphPtr tree){}
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 void
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
28 delete_chara(SceneGraphPtr node, void *sgroot_, int w, int h,
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 SceneGraphPtr tree)
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 {
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
31 node->remove();
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 }
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
33
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 void
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
35 title_collision(SceneGraphPtr node, void *sgroot_, int w, int h,
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
36 SceneGraphPtr tree)
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 {
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
38 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
39 Pad *pad = sgroot->getController();
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
40
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
41 if (pad->start.isPush() && pad->start.isHold()) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
42 jiki.bf = TRUE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
43
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
44 SoundStop();
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
45 SoundPlay(0);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
46
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
47 gamef = 1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
48
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
49 // node->remove();
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 }
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
52 if ((pad->start.isPush() && pad->start.isHold()) &&
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
53 (pad->select.isPush() && pad->select.isHold())) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
54
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
55 gamef = 0;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
56 }
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
58 /* タイトルの move
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
59 if (pad[0].st > 1) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
60 jiki.bf = TRUE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
61
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
62 // CdPlay(1,&cdp[0],0);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
63 SoundStop();
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
64 SoundPlay(0);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
65
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
66 gamef = 1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
67 pad[0].st = 1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
68 return;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
69 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
70 if ((pad[0].se > 0) && (pad[0].st > 0)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
71 gamef = 0;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
72 break;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
73 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
74 */
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 }
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
76
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 void
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
78 subtitle_collision(SceneGraphPtr node, void *sgroot_, int w, int h,
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
79 SceneGraphPtr tree)
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 {
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
81 if(gamef) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
82 node->remove();
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 }
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 }
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 void
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
87 atari(SceneGraphPtr node, void *sgroot_, int w, int h,
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
88 SceneGraphPtr tree)
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 {
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
90 int i1, height, width, ex, ey, charno;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
91 int n;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
92
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
93 SpriteTable *p;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
94
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
95 ex = node->xyz[0];
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
96 ey = node->xyz[1];
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
97 charno = node->stack_xyz[0];
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
98
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
99 p = &sptable[charno];
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
100 width = p->w;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
101 height = p->h;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
102 //i2 = playerno;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
103
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
104
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
105 //自機やられ
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
106 #ifndef INVISIBLE_MODE
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
107 if ((ex < jiki.x + 128 / 2) && (ex + width > jiki.x + 128 / 2)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
108 && (ey < jiki.y + 128 / 2) && (ey + height > jiki.y + 128 / 2)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
109 && jiki.muteki == 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
110 //se_voice[0] = SsUtKeyOn(vab[JIKIOUT], 0, 0, 65, 0, 60, 60);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
111 Bom(jiki.x + 16, jiki.y + 16);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
112 jiki.bf = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
113 jiki.zanki--;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
114 jiki.muteki = 120;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
115
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
116 infg.stg = 0;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
117 infg_level--;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
118 if (infg_level < 0)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
119 infg_level = 0;
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 }
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
121 #endif
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
122
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
123 if (p->tama == TRUE)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
124 goto jumping;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
125 for (i1 = 0; i1 < tama_lv1_end + 1; i1++) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
126
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
127 if ((tama_lv1[i1].x + 64 + 64 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
128 && (ex + width > tama_lv1[i1].x + 16)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
129 && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
130 && (tama_lv1[i1].r != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
131 tama_lv1[i1].r = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
132 p->vit -= TAMALV1P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
133 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
134 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
135 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
136 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
137 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
138 ((infg.stg / 128) + infg_level + 1));
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
140 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
141 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
142 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
143 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
144 if ((tama_lv1[i1].x + 64 > ex) && (ex + width > tama_lv1[i1].x)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
145 && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
146 && (tama_lv1[i1].l != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
147 tama_lv1[i1].l = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
148 p->vit -= TAMALV1P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
149 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
150 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
151 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
152 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
153 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
154 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
155 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
156 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
157 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
158 }
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 }
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
161 for (i1 = 0; i1 < tama_lv2_end + 1; i1++) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
162 if ((tama_lv2[i1].x + 128 + 64 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
163 && (ex + width > tama_lv2[i1].x + 128)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
164 && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
165 && (tama_lv2[i1].rr != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
166 tama_lv2[i1].rr = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
167 p->vit -= TAMALV2P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
168 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
169 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
170 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
171 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
172 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
173 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
174 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
175 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
176 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
177 }
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
179 if ((tama_lv2[i1].x + 64 + 64 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
180 && (ex + width > tama_lv2[i1].x + 16)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
181 && (tama_lv2[i1].y - 32 + 192 > ey)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
182 && (tama_lv2[i1].y - 32 < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
183 && (tama_lv2[i1].sr != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
184 tama_lv2[i1].sr = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
185 p->vit -= TAMALV2P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
186 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
187 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
188 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
189 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
190 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
191 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
192 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
193 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
194 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
195 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
196 if ((tama_lv2[i1].x + 64 > ex) && (ex + width > tama_lv2[i1].x)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
197 && (tama_lv2[i1].y - 32 + 192 > ey)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
198 && (tama_lv2[i1].y - 32 < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
199 && (tama_lv2[i1].sl != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
200 tama_lv2[i1].sl = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
201 p->vit -= TAMALV2P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
202 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
203 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
204 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
205 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
206 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
207 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
208 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
209 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
210 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
211 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
212 if ((tama_lv2[i1].x - 64 + 64 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
213 && (ex + width > tama_lv2[i1].x - 64)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
214 && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
215 && (tama_lv2[i1].ll != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
216 tama_lv2[i1].ll = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
217 p->vit -= TAMALV2P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
218 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
219 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
220 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
221 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
222 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
223 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
224 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
225 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
226 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
227 }
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 }
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
229 if ((tlv3[0].r > 0) && (jiki.x < ex + width) && (jiki.x + 128 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
230 && (jiki.y > ey + height)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
231 p->vit -= TAMALV3P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
232 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
233 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
234 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
235 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
236 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
237 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
238 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
239 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
240 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
241 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
242 jumping:
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
243 if ((tlv3[0].r > 0) && (jiki.x < ex + width) && (jiki.x + 128 > ex)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
244 && (jiki.y + 128 > ey) && (jiki.y < ey + height)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
245 p->vit -= TAMALV3P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
246 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
247 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
248 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
249 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
250 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
251 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
252 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
253 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
254 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
255 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
256 /*laser lv1 */
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
257 for (i1 = 0; i1 < laser_lv1_end + 1; i1++) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
258 n = laser_lv1[i1].r * 128 / 4096;
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259
4
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
260 if ((laser_lv1[i1].x + n > ex) && (ex + width > laser_lv1[i1].x)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
261 && (laser_lv1[i1].y + n > ey) && (laser_lv1[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
262 && (laser_lv1[i1].r != -1)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
263 laser_lv1[i1].r = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
264 laser_lv1[i1].y = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
265 p->vit -= LASERLV1P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
266 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
267 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
268 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
269 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
270 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
271 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
272 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
273 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
274 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
275 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
276 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
277 /*shield(laser lv2) */
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
278 if ((p->tama == TRUE) && (lg.stg > 0) &&
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
279 (laser_lv2[0].x + 128 > ex) && (ex + width > laser_lv2[0].x - 128)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
280 && (laser_lv2[0].y + 128 > ey) && (laser_lv2[0].y - 128 < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
281 && (laser_lv2[0].r != 0)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
282 p->vit -= LASERLV2P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
283 lg.stg -= 26;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
284 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
285 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
286 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
287 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
288 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
289 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
290 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
291 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
292 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
293 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
294 /*bomber(laser lv3) */
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
295 if (laser_lv3[0].r < 62) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
296 for (i1 = 1; i1 < 128; i1++) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
297 if ((laser_lv3[i1].x + 128 > ex) && (ex + width > laser_lv3[i1].x)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
298 && (laser_lv3[i1].y + 128 > ey)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
299 && (laser_lv3[i1].y < ey + height)
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
300 && (laser_lv3[i1].r > 0)) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
301 tama_lv2[i1].rr = -1;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
302 p->vit -= LASERLV3P;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
303 infg.stg++;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
304 if (p->vit <= 0) {
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
305 infg.stg += 4;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
306 Bom(p->x, p->y);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
307 enemycount += (p->score *
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
308 ((infg.stg / 128) + infg_level + 1));
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
309 node->set_move_collision(noaction, delete_chara);
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
310 p->f = FALSE;
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
311 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
312 }
bb2fbe78c7cd moving title scene.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
313 }
3
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 }
deb7e09824a4 add 'src' directory and 'xml' directory.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 }