Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/panel.cpp @ 224:ebfb9e389716
SceneGraph.cpp xmlcreate
author | tkaito@nw0534.st.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 10 Feb 2009 20:45:51 +0900 |
parents | d61fded0729e |
children | a4f690f44842 |
rev | line source |
---|---|
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
1 #include "SceneGraphRoot.h" |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
2 #include "SGList.h" |
143 | 3 |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
4 static void panel_move(SceneGraphPtr node, int screen_w, int screen_h); |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
5 static void panel_collision(SceneGraphPtr node, int screen_w, int screen_h, |
143 | 6 SceneGraphPtr tree); |
7 | |
8 static void | |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
9 panel_move(SceneGraphPtr node, int screen_w, int screen_h) |
143 | 10 { |
11 } | |
12 | |
13 static void | |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
14 panel_collision(SceneGraphPtr node, int screen_w, int screen_h, |
143 | 15 SceneGraphPtr tree) |
16 { | |
17 } | |
18 | |
19 void | |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
20 panel_init(int bg) |
143 | 21 { |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
22 SceneGraphPtr panel; |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
23 |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
152
diff
changeset
|
24 if (bg == 2) { |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
25 sgroot->createFromXMLfile("xml_file/panel_512.xml"); |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
26 panel = sgroot->createSceneGraph(PANEL_512); |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
152
diff
changeset
|
27 } else if (bg == 3) { |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
28 sgroot->createFromXMLfile("xml_file/panel_1024.xml"); |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
29 panel = sgroot->createSceneGraph(PANEL_1024); |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
152
diff
changeset
|
30 } else { |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
31 sgroot->createFromXMLfile("xml_file/panel_2048.xml"); |
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
32 panel = sgroot->createSceneGraph(PANEL_2048); |
153
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
152
diff
changeset
|
33 } |
c8c8bb4e9e58
画像のサイズテストを加える -sg = [2,3,4]
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
152
diff
changeset
|
34 |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
35 panel->set_move_collision(panel_move, panel_collision); |
221 | 36 panel->xyz[2] = 30.0f; |
198
57921c8d21c5
rename snake_bg to panel
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
153
diff
changeset
|
37 sgroot->setSceneData(panel); |
143 | 38 } |