Mercurial > hg > Members > koba > t_dandy
annotate 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 |
rev | line source |
---|---|
20 | 1 #include "chara_state1.h" |
2 #include "task_object.h" | |
3 | |
4 SchedDefineTask(STATE1); | |
5 | |
6 static int | |
7 run(SchedTask *smanager, void *rbuf, void *wbuf) | |
8 { | |
9 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0); | |
10 | |
11 p->x -= p->vx; | |
12 p->y -= p->vy; | |
13 | |
14 p->task = STATE1; | |
15 smanager->swap(); | |
16 return 0; | |
17 } |