annotate ppe/chara_state2.cc @ 70:cee55c8365e9 default tip

fix
author Kazuma
date Thu, 19 May 2016 18:52:26 +0900
parents 39e643fc4f90
children 978097c6427a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21
5f1abbe03b9a add new task.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
1 #include "task_base.h"
20
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "task_object.h"
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
33
39e643fc4f90 moving stage1.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 21
diff changeset
4 SchedDefineTask1(State2, state2);
20
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 static int
33
39e643fc4f90 moving stage1.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 21
diff changeset
7 state2(SchedTask *smanager, void *rbuf, void *wbuf)
20
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 {
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 p->vy -= 0.25;
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 p->y += p->vy;
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 p->task = STATE2;
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 smanager->swap();
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 return 0;
6487f54ba3d1 add new file.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }