Mercurial > hg > Members > tkaito > task_dandy
annotate stage_init.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 |
rev | line source |
---|---|
24 | 1 #include "collision.h" |
2 | 2 |
24 | 3 #if 0 |
7 | 4 void |
24 | 5 opening() |
21 | 6 { |
24 | 7 PutSprite(700, 480, 53); // put `push start' string on screen. |
8 PutSprite(224, 776, 119); // put `super dandy' | |
9 // Cerium に拡大縮小機能がないので | |
10 // PutSpriteEx(190, 800, 264, 2, 2, 5); | |
11 PutSprite(800, 264, 190); | |
12 PutSprite(396, 432, 191); | |
13 PutSprite(640, 640, 192); | |
21 | 14 } |
15 | |
16 void | |
24 | 17 init_game(Viewer *sgroot_, int w, int h) |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
18 { |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
19 Viewer *sgroot = sgroot_; |
23
3fb8a6a34e24
debug and keep up with task_array
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
20 SceneGraphPtr root = sgroot->createSceneGraph(); |
3 | 21 |
21 | 22 SceneGraphPtr title = (SceneGraphPtr)charactor[0].root; |
24 | 23 title->set_move_collision(title_collision); |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
24 charactor[0].x = w/2; |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
25 charactor[0].y = h/2; |
24 | 26 charactor[0].vx = 1.0; |
27 charactor[0].vy = 1.0; | |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
28 charactor[0].flag = 0; |
23
3fb8a6a34e24
debug and keep up with task_array
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
29 charactor[0].parent = (void*)root; |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
30 |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
31 title->xyz[0] = charactor[0].x; |
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
32 title->xyz[1] = charactor[0].y; |
21 | 33 |
19
632ce41a842a
testing game task with pad's input
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
34 int size = sizeof(ObjProperty); |
24 | 35 sgroot->set_pad_task(title, TITLE_MOVE, (void*)&charactor[0], size); |
36 // sgroot->set_pad_task(crab, CRAB_MOVE, (void*)&charactor[1], size); | |
23
3fb8a6a34e24
debug and keep up with task_array
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
37 |
3fb8a6a34e24
debug and keep up with task_array
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
38 root->addChild(title); |
24 | 39 // root->addChild(crab); |
23
3fb8a6a34e24
debug and keep up with task_array
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
40 sgroot->setSceneData(root); |
3 | 41 } |
2 | 42 |
24 | 43 #endif |