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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
1 #include "collision.h"
2
6e1afe1016dc Task is not yet.
tkaito
parents:
diff changeset
2
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
3 #if 0
7
c015109a6041 schedule add. 10% done.
tkaito
parents: 6
diff changeset
4 void
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
5 opening()
21
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
6 {
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
7 PutSprite(700, 480, 53); // put `push start' string on screen.
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
8 PutSprite(224, 776, 119); // put `super dandy'
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
9 // Cerium に拡大縮小機能がないので
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
10 // PutSpriteEx(190, 800, 264, 2, 2, 5);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
11 PutSprite(800, 264, 190);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
12 PutSprite(396, 432, 191);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
13 PutSprite(640, 640, 192);
21
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
14 }
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
15
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
16 void
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
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
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
21
21
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
22 SceneGraphPtr title = (SceneGraphPtr)charactor[0].root;
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
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
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
26 charactor[0].vx = 1.0;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
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
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
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
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
35 sgroot->set_pad_task(title, TITLE_MOVE, (void*)&charactor[0], size);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
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
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
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
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
41 }
2
6e1afe1016dc Task is not yet.
tkaito
parents:
diff changeset
42
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
43 #endif