Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state10.cc @ 64:07bc996c8e49
fix t_dandy on ps3.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Feb 2011 18:20:30 +0900 |
parents | 3c2fc35a6b55 |
children | b97628fca317 |
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->state_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->state_task = STATE10; *q = *p; return 0; }