Mercurial > hg > Game > Cerium
annotate Renderer/Test/title.cc @ 1798:3babb36ac459 draft
array(bmskip table) allocate size change 256 to 256*sizeof(int)
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 05 Dec 2013 16:41:38 +0900 |
parents | 7a311860a76e |
children |
rev | line source |
---|---|
539 | 1 #include "SceneGraphRoot.h" |
2 #include "vacuum.h" | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
3 |
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
4 extern int redcube; |
539 | 5 |
6 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
|
7 title_collision(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree) |
539 | 8 { |
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
|
9 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; |
539 | 10 Pad *pad = sgroot->getController(); |
11 | |
12 if(pad->start.isPush()) { | |
13 | |
14 SceneGraphPtr vacuum; | |
15 SceneGraphPtr back = sgroot->createSceneGraph(); | |
16 | |
563
338ad9c856fc
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
540
diff
changeset
|
17 vacuum = sgroot->createSceneGraph("BIGCUBE"); |
539 | 18 vacuum->xyz[0] = w/2; |
19 vacuum->xyz[1] = h*0.8; | |
20 vacuum->set_move_collision(vacuum_move, vacuum_coll); | |
21 | |
22 back->addChild(vacuum); | |
23 | |
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
|
24 add_cubecollision_object(redcube,vacuum,w,h, sgroot); |
539 | 25 |
26 sgroot->setSceneData(back); | |
27 | |
28 } | |
29 } |