Mercurial > hg > Members > tkaito > task_dandy
annotate ppe/TitleMove.cc @ 20:ec540ce4519d
mini change.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 20 Sep 2010 20:56:31 +0900 |
parents | 632ce41a842a |
children | fd9deaa67de9 |
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" |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
3 #include "TitleMove.h" |
20 | 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 | 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 | 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 { |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
13 Pad* pad; |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
14 ObjPropertyPtr i_obj, o_obj; |
4 | 15 |
16 i_obj = (ObjPropertyPtr)s->get_input(rbuf, 0); | |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
17 pad = (Pad*)s->get_input(rbuf, 1); |
4 | 18 o_obj = (ObjPropertyPtr)s->get_output(wbuf, 0); |
14 | 19 |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
20 if(pad->start.isPush() || pad->start.isHold()) { |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
21 i_obj->flag = 1; |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
22 } |
4 | 23 |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
24 o_obj->flag = i_obj->flag; |
4 | 25 |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
26 return 0; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
27 } |