Mercurial > hg > Members > koba > t_dandy
comparison ppe/chara_state28.cc @ 58:e0018f39f7e1
fix random func.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Feb 2011 17:49:33 +0900 |
parents | 6626e451a09d |
children | b97628fca317 |
comparison
equal
deleted
inserted
replaced
57:978097c6427a | 58:e0018f39f7e1 |
---|---|
5 SchedDefineTask1(State28, state28); | 5 SchedDefineTask1(State28, state28); |
6 | 6 |
7 static int | 7 static int |
8 state28(SchedTask *smanager, void *rbuf, void *wbuf) | 8 state28(SchedTask *smanager, void *rbuf, void *wbuf) |
9 { | 9 { |
10 int rand = (int)smanager->get_param(2); | 10 int rand = (int)smanager->get_param(0); |
11 | 11 |
12 int length = 2; | 12 int length = 2; |
13 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); | 13 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); |
14 int count = *(int*)smanager->get_input(rbuf, 1); | 14 int count = *(int*)smanager->get_input(rbuf, 1); |
15 | 15 |
16 smanager->set_outputSize(4, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); | 16 smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); |
17 smanager->setup_outputData(); | 17 smanager->setup_outputData(); |
18 | 18 |
19 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); | 19 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); |
20 int *w_count = (int*)smanager->get_output(wbuf, 1); | 20 int *w_count = (int*)smanager->get_output(wbuf, 1); |
21 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 4); | 21 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2); |
22 sprite->flag = true; | 22 sprite->flag = true; |
23 | 23 |
24 if (p->dt1 <= 360) | 24 if (p->dt1 <= 360) |
25 { | 25 { |
26 p->x = Mycos(p->dt1) * 30 / SANKAKU + 82 + 32; | 26 p->x = Mycos(p->dt1) * 30 / SANKAKU + 82 + 32; |