Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state32.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 |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State32, state32); static int state32(SchedTask *smanager, void *rbuf, void *wbuf) { int part4_f = (int)smanager->get_param(3); int enemystate_14 = (int)smanager->get_param(4); int enemystate_20 = (int)smanager->get_param(5); int length; CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); CHARACTER *kyeenemyno = (CHARACTER*)smanager->get_input(rbuf, 1); int rinkf1 = *(int*)smanager->get_input(rbuf, 3); if ((part4_f == FALSE) || (kyeenemyno->f == FALSE)) { length = 1; smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); smanager->setup_outputData(); CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2); sprite->flag = true; sprite->length = length; Bom(p->x, p->y, &sprite->data[0]); p->f = FALSE; p->task = DELETE_CHARA; *q = *p; return 0; } p->x = kyeenemyno->x - 40; p->y = kyeenemyno->y + 28; if (rinkf1 == 5) { p->x = kyeenemyno->x - 24 + 4; p->y = kyeenemyno->y + 28; p->charano = enemystate_20; } if (rinkf1 == 11) { p->charano = enemystate_14; } if (rinkf1 == 7) { length = 1; smanager->set_outputSize(2, sizeof(ObjContainer)+sizeof(ObjData)*(length-1)); smanager->setup_outputData(); CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); ObjContainerPtr sprite = (ObjContainerPtr)smanager->get_output(wbuf, 2); sprite->flag = true; sprite->length = length; Putenemy(23, p->x + 14, p->y + 14, 0, 0, STATE41, &sprite->data[0]); *q = *p; return 0; } CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); *q = *p; return 0; }