Mercurial > hg > Members > koba > t_dandy
diff ppe/chara_state1.cc @ 20:6487f54ba3d1
add new file.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 26 Dec 2010 19:00:01 +0900 |
parents | |
children | 5f1abbe03b9a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ppe/chara_state1.cc Sun Dec 26 19:00:01 2010 +0900 @@ -0,0 +1,17 @@ +#include "chara_state1.h" +#include "task_object.h" + +SchedDefineTask(STATE1); + +static int +run(SchedTask *smanager, void *rbuf, void *wbuf) +{ + CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); + + p->x -= p->vx; + p->y -= p->vy; + + p->task = STATE1; + smanager->swap(); + return 0; +}