annotate ppe/TitleMove.cc @ 24:a131729d6e4d

not working.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Wed, 24 Nov 2010 19:24:04 +0900
parents 3fb8a6a34e24
children 34fde39c0a31
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
1 #include <stdio.h>
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
2 #include "SchedTask.h"
21
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
3 #include "Property.h"
20
ec540ce4519d mini change.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
4 #include "Pad.h"
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
5 #include "Func.h"
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
6
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
7 /* これは必須 */
6
661ec1e92042 set_game_task move to API(SceneGrapRoot).
tkaito
parents: 4
diff changeset
8 SchedDefineTask1(TitleMove, titlemove);
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
9
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
10 static int
6
661ec1e92042 set_game_task move to API(SceneGrapRoot).
tkaito
parents: 4
diff changeset
11 titlemove(SchedTask *s,void *rbuf, void *wbuf)
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
12 {
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
13 ObjPropertyPtr i_obj, o_obj;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
14
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
15 i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
16 o_obj = (ObjPropertyPtr)s->get_output(wbuf, 0);
14
e95c5c280f47 task_dandy test version.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 6
diff changeset
17
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
18 int pad_id = (int)s->get_param(0);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
19 int size = (int)s->get_param(1);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
20 Pad *pad = (Pad*)s->pad(pad_id);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
21
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
22 if (pad->start.isPush && pad->start.isHold) {
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
23 i_obj->flag = 1;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
24 }
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
25 if ((pad->select.isPush && pad->select.isHold) &&
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
26 (pad->start.isPush && pad->start.isHold)) {
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
27 i_obj->flag = 0;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
28 }
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
29
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
30 s->swap();
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
31
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
32 return 0;
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
33 }