Mercurial > hg > Members > koba > t_dandy
comparison ppe/chara_state28.cc @ 35:c122e3d2302e
add all state task.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 09 Jan 2011 14:28:44 +0900 |
parents | 7aaaaf5dde40 |
children | 6626e451a09d |
comparison
equal
deleted
inserted
replaced
34:7aaaaf5dde40 | 35:c122e3d2302e |
---|---|
16 | 16 |
17 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); | 17 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); |
18 int *w_count = (int*)smanager->get_output(wbuf, 1); | 18 int *w_count = (int*)smanager->get_output(wbuf, 1); |
19 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); | 19 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); |
20 sprite->flag = true; | 20 sprite->flag = true; |
21 sprite->length = length; | |
22 | 21 |
23 if (p->dt1 <= 360) | 22 if (p->dt1 <= 360) |
24 { | 23 { |
25 p->x = Mycos(p->dt1) * 30 / SANKAKU + 82 + 32; | 24 p->x = Mycos(p->dt1) * 30 / SANKAKU + 82 + 32; |
26 p->y = Mysin(p->dt1) * 30 / SANKAKU + 30; | 25 p->y = Mysin(p->dt1) * 30 / SANKAKU + 30; |
38 p->y + 14, | 37 p->y + 14, |
39 (rand() % 5 + 0.5) * (rand() % 2 == | 38 (rand() % 5 + 0.5) * (rand() % 2 == |
40 1 ? -1 : 1), | 39 1 ? -1 : 1), |
41 (rand() % 5 + 0.5) * (rand() % 2 == | 40 (rand() % 5 + 0.5) * (rand() % 2 == |
42 1 ? -1 : 1), STATE29, &sprite->data[1]); | 41 1 ? -1 : 1), STATE29, &sprite->data[1]); |
42 } else { | |
43 length = 1; | |
43 } | 44 } |
44 p->dt1 += 3; | 45 p->dt1 += 3; |
46 | |
47 sprite->length = length; | |
45 *q = *p; | 48 *q = *p; |
46 *w_count = count; | 49 *w_count = count; |
47 return 0; | 50 return 0; |
48 } | 51 } |