annotate TaskManager/Test/test_render/snake_bg.cpp @ 150:3f467ad8c40d draft

add xml
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 02 Dec 2008 19:10:34 +0900
parents 9588726193e1
children 4a00bb4c6184
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
143
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #include "SceneGraph.h"
150
3f467ad8c40d add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 143
diff changeset
2 //#include "xml_file/snake576x384.h"
3f467ad8c40d add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 143
diff changeset
3 #include "xml_file/snake800x600.h"
143
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 static void snake_move(SceneGraphPtr node, int screen_w, int screen_h);
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 static void snake_collision(SceneGraphPtr node, int screen_w, int screen_h,
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 SceneGraphPtr tree);
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 static void
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 snake_move(SceneGraphPtr node, int screen_w, int screen_h)
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 {
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 }
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14 static void
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 snake_collision(SceneGraphPtr node, int screen_w, int screen_h,
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 SceneGraphPtr tree)
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 {
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18 }
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 void
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 create_snake_bg(void)
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22 {
150
3f467ad8c40d add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 143
diff changeset
23 SceneGraph::createFromXMLfile("xml_file/snake800x600.xml");
143
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 Plane->set_move_collision(snake_move, snake_collision);
9588726193e1 add xml
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
25 }