Mercurial > hg > Game > Cerium
annotate Renderer/Test/game_over.cc @ 766:3541fe06be2b draft
add spe/univers_move
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sat, 13 Feb 2010 17:33:38 +0900 |
parents | 7a311860a76e |
children |
rev | line source |
---|---|
539 | 1 #include "SceneGraphRoot.h" |
2 #include "vacuum.h" | |
3 | |
4 | |
5 void | |
653
7a311860a76e
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
6 gameover_scene(int w,int h,SceneGraphPtr node, SceneGraphRoot *sgroot) |
539 | 7 { |
8 SceneGraphPtr over; | |
9 | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
10 over = sgroot->createSceneGraph("GAMEOVER"); |
539 | 11 over->xyz[0] = w/2; |
12 over->xyz[1] = h/2; | |
13 over->set_move_collision(gameover_idle,gameover_collision); | |
14 node->addBrother(over); | |
15 } | |
16 | |
17 void | |
653
7a311860a76e
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
18 gameover_idle(SceneGraphPtr node, void *sgroot_, int screen_w,int screen_h) |
539 | 19 { |
20 } | |
21 | |
22 void | |
653
7a311860a76e
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
23 gameover_collision(SceneGraphPtr node, void *sgroot_, int screen_w,int screen_h,SceneGraphPtr tree) |
539 | 24 { |
653
7a311860a76e
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
25 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; |
539 | 26 Pad *pad = sgroot->getController(); |
27 | |
28 if(pad->start.isPush()) { | |
29 | |
30 SceneGraphPtr title; | |
31 | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
32 title = sgroot->createSceneGraph("TITLE"); |
539 | 33 title->xyz[0] = screen_w/2; |
34 title->xyz[1] = screen_h/2; | |
35 title->set_move_collision(no_move_idle, title_collision); | |
36 sgroot->setSceneData(title); | |
37 | |
38 } | |
39 | |
40 } |