Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state34.cc @ 67:21ac9f57a6d4
Mac OS X 64bit
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 May 2011 16:27:41 +0900 |
parents | 6989f8cb0259 |
children |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State34, state34); static int state34(SchedTask *smanager, void *rbuf, void *wbuf) { long enemystate_12 = (long)smanager->get_param(4); long enemystate_21 = (long)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); CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); if (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 - 32; p->y = kyeenemyno->y; if (rinkf1 == 5) { p->charano = enemystate_21; } if (rinkf1 == 6) { p->charano = enemystate_12; } *q = *p; return 0; }