283
|
1 #include "SceneGraphRoot.h"
|
|
2 #include "SGList.h"
|
|
3
|
|
4 static void panel_move(SceneGraphPtr node, int screen_w, int screen_h);
|
|
5 static void panel_collision(SceneGraphPtr node, int screen_w, int screen_h,
|
|
6 SceneGraphPtr tree);
|
|
7
|
|
8 static void
|
|
9 panel_move(SceneGraphPtr node, int screen_w, int screen_h)
|
|
10 {
|
|
11 }
|
|
12
|
|
13 static void
|
|
14 panel_collision(SceneGraphPtr node, int screen_w, int screen_h,
|
|
15 SceneGraphPtr tree)
|
|
16 {
|
|
17 }
|
|
18
|
|
19 void
|
|
20 panel_init(int bg)
|
|
21 {
|
|
22 SceneGraphPtr panel;
|
|
23
|
|
24 if (bg == 2) {
|
|
25 sgroot->createFromXMLfile("xml_file/panel_512.xml");
|
|
26 panel = sgroot->createSceneGraph(PANEL_512);
|
|
27 } else if (bg == 3) {
|
|
28 sgroot->createFromXMLfile("xml_file/panel_1024.xml");
|
|
29 panel = sgroot->createSceneGraph(PANEL_1024);
|
|
30 } else {
|
|
31 sgroot->createFromXMLfile("xml_file/panel_2048.xml");
|
|
32 panel = sgroot->createSceneGraph(PANEL_2048);
|
|
33 }
|
|
34
|
|
35 panel->set_move_collision(panel_move, panel_collision);
|
|
36 panel->xyz[2] = 30.0f;
|
|
37 sgroot->setSceneData(panel);
|
|
38 }
|