comparison ppe/chara_state33.cc @ 37:6989f8cb0259

fix.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Sun, 09 Jan 2011 23:14:26 +0900
parents c122e3d2302e
children 978097c6427a 21ac9f57a6d4
comparison
equal deleted inserted replaced
36:4516141d844a 37:6989f8cb0259
6 static int 6 static int
7 state33(SchedTask *smanager, void *rbuf, void *wbuf) 7 state33(SchedTask *smanager, void *rbuf, void *wbuf)
8 { 8 {
9 int enemystate_11 = (int)smanager->get_param(4); 9 int enemystate_11 = (int)smanager->get_param(4);
10 int enemystate_19 = (int)smanager->get_param(5); 10 int enemystate_19 = (int)smanager->get_param(5);
11 11
12 int length;
12 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); 13 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
13 CHARACTER *kyeenemyno = (CHARACTER*)smanager->get_input(rbuf, 1); 14 CHARACTER *kyeenemyno = (CHARACTER*)smanager->get_input(rbuf, 1);
14 int rinkf1 = *(int*)smanager->get_input(rbuf, 3); 15 int rinkf1 = *(int*)smanager->get_input(rbuf, 3);
15 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); 16 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0);
16 17
17 if (kyeenemyno->f == FALSE) 18 if (kyeenemyno->f == FALSE)
18 { 19 {
19 // Bom(p->x, p->y); 20 length = 1;
21 smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1));
22 smanager->setup_outputData();
23 CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0);
24 ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2);
25 sprite->flag = true;
26 sprite->length = length;
27
28 Bom(p->x, p->y, &sprite->data[0]);
20 p->f = FALSE; 29 p->f = FALSE;
21 p->task = DELETE_CHARA; 30 p->task = DELETE_CHARA;
22 31
23 *q = *p; 32 *q = *p;
24 return 0; 33 return 0;