annotate spe/Atari.cc @ 60:cfd42ee2ad28

change makefile, spe/task. adjust scale api. worked on ps3-ppe.
author yutaka@localhost.localdomain
date Sun, 06 Feb 2011 17:16:43 +0900
parents c330ded6d728
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
1 #include "task_base.h"
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
2 #include "task_object.h"
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
3 #include "../ObjectType.h"
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
5 SchedDefineTask1(Atari, atari);
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 static int
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
8 atari(SchedTask *smanager, void *rbuf, void *wbuf)
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 {
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 int w = (int)smanager->get_param(0);
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 int h = (int)smanager->get_param(1);
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
12 long load_id = (long)smanager->get_param(2);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
13
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
14 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
15 CollisionPropertyPtr property =
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
16 (CollisionPropertyPtr)smanager->global_get(load_id);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
17
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
18 int *p_infg_level = &property->infg_level;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
19 int infg_level = *p_infg_level;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
21 int tama_lv1_end = property->tama_lv1_end;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
22 int tama_lv2_end = property->tama_lv2_end;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
23 int laser_lv1_end = property->laser_lv1_end;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
25 int *enemycount = &property->enemycount;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
26
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 player *jiki = &property->jiki;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
28
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
29 stge *lg = &property->lg;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
30 stge *infg = &property->infg;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 tama1 *tama_lv1 = property->tama_lv1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 tama2 *tama_lv2 = property->tama_lv2;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
34 tama1 *tlv3 = &property->tlv3;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 laser *laser_lv1 = property->laser_lv1;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
36 laser *laser_lv2 = &property->laser_lv2;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 laser *laser_lv3 = property->laser_lv3;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 int i1, ex, ey;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 int n;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 ex = p->x;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 ey = p->y;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
44 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
45 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 1);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
46 sprite->flag = false;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
47 sprite->length = 1;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
48
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 //自機やられ
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 #ifndef INVISIBLE_MODE
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 if ((ex < jiki->x + 128 / 2) && (ex + w > jiki->x + 128 / 2)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 && (ey < jiki->y + 128 / 2) && (ey + h > jiki->y + 128 / 2)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 && jiki->muteki == 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
54
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
55 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
56 Bom(jiki->x + 16, jiki->y + 16, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
57
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 jiki->bf = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 jiki->zanki--;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
60 jiki->muteki = 120;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
61 property->jiki = *jiki;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
63 infg->stg = 0;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 infg_level--;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 if (infg_level < 0)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 infg_level = 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
68 *p_infg_level = infg_level;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
69 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 #endif
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 if (p->tama == TRUE)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 goto jumping;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 for (i1 = 0; i1 < tama_lv1_end + 1; i1++) {
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 if ((tama_lv1[i1].x + 64 + 64 > ex)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 && (ex + w > tama_lv1[i1].x + 16)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 && (tama_lv1[i1].r != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
82
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 tama_lv1[i1].r = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 p->vit -= TAMALV1P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
85 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
87 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
88 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
89 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
90 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
91 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
92 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
95 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 if ((tama_lv1[i1].x + 64 > ex) && (ex + w > tama_lv1[i1].x)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 && (tama_lv1[i1].y + 128 > ey) && (tama_lv1[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 && (tama_lv1[i1].l != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
102
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 tama_lv1[i1].l = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 p->vit -= TAMALV1P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
105 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
107 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
108 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
109 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
110 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
111 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
112 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
115 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 for (i1 = 0; i1 < tama_lv2_end + 1; i1++) {
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 if ((tama_lv2[i1].x + 128 + 64 > ex)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 && (ex + w > tama_lv2[i1].x + 128)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 && (tama_lv2[i1].rr != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
126
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 tama_lv2[i1].rr = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 p->vit -= TAMALV2P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
129 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
131 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
132 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
133 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
134 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
135 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
136 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
139 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 if ((tama_lv2[i1].x + 64 + 64 > ex)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 && (ex + w > tama_lv2[i1].x + 16)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 && (tama_lv2[i1].y - 32 + 192 > ey)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 && (tama_lv2[i1].y - 32 < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 && (tama_lv2[i1].sr != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
149
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 tama_lv2[i1].sr = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 p->vit -= TAMALV2P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
152 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
154 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
155 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
156 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
157 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
158 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
159 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
162 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 if ((tama_lv2[i1].x + 64 > ex) && (ex + w > tama_lv2[i1].x)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 && (tama_lv2[i1].y - 32 + 192 > ey)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 && (tama_lv2[i1].y - 32 < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 && (tama_lv2[i1].sl != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
170
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 tama_lv2[i1].sl = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 p->vit -= TAMALV2P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
173 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
175 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
176 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
177 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
178 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
179 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
180 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
183 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 if ((tama_lv2[i1].x - 64 + 64 > ex)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 && (ex + w > tama_lv2[i1].x - 64)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 && (tama_lv2[i1].y + 192 > ey) && (tama_lv2[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 && (tama_lv2[i1].ll != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
191
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 tama_lv2[i1].ll = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 p->vit -= TAMALV2P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
194 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
196 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
197 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
198 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
199 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
200 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
201 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
204 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 }
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
209 if ((tlv3->r > 0) && (jiki->x < ex + w) && (jiki->x + 128 > ex)
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 && (jiki->y > ey + h)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
211
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 p->vit -= TAMALV3P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
213 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
215 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
216 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
217 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
218 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
219 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
220 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
223 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 }
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
227 jumping:
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
228 if ((tlv3->r > 0) && (jiki->x < ex + w) && (jiki->x + 128 > ex)
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 && (jiki->y + 128 > ey) && (jiki->y < ey + h)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
230
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 p->vit -= TAMALV3P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
232 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
234 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
235 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
236 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
237 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
238 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
239 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
242 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 /*laser lv1 */
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 for (i1 = 0; i1 < laser_lv1_end + 1; i1++) {
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 n = laser_lv1[i1].r * 128 / 4096;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 if ((laser_lv1[i1].x + n > ex) && (ex + w > laser_lv1[i1].x)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 && (laser_lv1[i1].y + n > ey) && (laser_lv1[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 && (laser_lv1[i1].r != -1)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
253
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 laser_lv1[i1].r = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 laser_lv1[i1].y = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 p->vit -= LASERLV1P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
257 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
259 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
260 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
261 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
262 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
263 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
264 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
267 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 /*shield(laser lv2) */
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
273 if ((p->tama == TRUE) && (lg->stg > 0) &&
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 (laser_lv2[0].x + 128 > ex) && (ex + w > laser_lv2[0].x - 128)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 && (laser_lv2[0].y + 128 > ey) && (laser_lv2[0].y - 128 < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 && (laser_lv2[0].r != 0)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
277
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 p->vit -= LASERLV2P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
279 lg->stg -= 26;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
280
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
281 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
283 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
284 property->infg = *infg;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
285
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
286 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
287 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
288 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
289 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
290 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 p->f = FALSE;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
292
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
293 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 /*bomber(laser lv3) */
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 if (laser_lv3[0].r < 62) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
299 for (i1 = 1; i1 < 64; i1++) {
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 if ((laser_lv3[i1].x + 128 > ex) && (ex + w > laser_lv3[i1].x)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 && (laser_lv3[i1].y + 128 > ey)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 && (laser_lv3[i1].y < ey + h)
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 && (laser_lv3[i1].r > 0)) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
304
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 tama_lv2[i1].rr = -1;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 p->vit -= LASERLV3P;
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
307 infg->stg++;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 if (p->vit <= 0) {
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
309 infg->stg += 4;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
310 sprite->flag = true;
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
311 Bom(p->x, p->y, &sprite->data[0]);
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
312 *enemycount += (p->score *
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
313 ((infg->stg / 128) + infg_level + 1));
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
314 p->collision_task = true;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 p->f = FALSE;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
317 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 }
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 }
60
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
323
cfd42ee2ad28 change makefile, spe/task. adjust scale api. worked on ps3-ppe.
yutaka@localhost.localdomain
parents: 18
diff changeset
324 *q = *p;
17
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 return 0;
927401604461 add spe object
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 }