Mercurial > hg > Members > koba > t_dandy
view ppe/chara_state10.cc @ 65:b97628fca317
int -> long. not move on ABIBIT=64.
author | tkaito |
---|---|
date | Thu, 17 Feb 2011 04:49:47 +0900 |
parents | 3c2fc35a6b55 |
children | f27a6af6514c |
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) { long rinkx = (long)smanager->get_param(0); long rinky = (long)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; }