Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state10.cc @ 37:6989f8cb0259
fix.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 09 Jan 2011 23:14:26 +0900 |
parents | 39e643fc4f90 |
children | 978097c6427a 21ac9f57a6d4 |
line wrap: on
line source
#include "task_base.h" #include "task_object.h" SchedDefineTask1(State10, state10); static int state10(SchedTask *smanager, void *rbuf, void *wbuf) { int rinkx = (int)smanager->get_param(0); int rinky = (int)smanager->get_param(1); CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); CHARACTER *q = (CHARACTER*)smanager->get_output(wbuf, 0); if(p->dt1 < 48) { p->x += p->vx; p->y += p->vy; p->dt1++; p->task = STATE10; *q = *p; return 0; } int *w_rinkf1 = (int*)smanager->get_output(wbuf, 1); *w_rinkf1 = 1; p->dt1 = rinkx; p->dt2 = rinky; p->task = STATE13; *q = *p; return 0; }