Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state33.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 | |
children | 6989f8cb0259 |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State33, state33); static int state33(SchedTask *smanager, void *rbuf, void *wbuf) { int enemystate_11 = (int)smanager->get_param(4); int enemystate_19 = (int)smanager->get_param(5); 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) { // Bom(p->x, p->y); p->f = FALSE; p->task = DELETE_CHARA; *q = *p; return 0; } p->x = kyeenemyno->x + 32; p->y = kyeenemyno->y; if (rinkf1 == 5) { p->x = kyeenemyno->x + 32 - 4; p->y = kyeenemyno->y; p->charano = enemystate_19; } if (rinkf1 == 6) { p->charano = enemystate_11; } *q = *p; return 0; }