Mercurial > hg > Game > Cerium
changeset 153:70146cdec3d4 draft
画像のサイズテストを加える -sg = [2,3,4]
author | gongo@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 02 Dec 2008 19:39:36 +0900 |
parents | 4a00bb4c6184 |
children | 17d169cfd469 |
files | TaskManager/Test/test_render/main.cpp TaskManager/Test/test_render/snake_bg.cpp TaskManager/Test/test_render/viewer.cpp |
diffstat | 3 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/main.cpp Tue Dec 02 19:26:45 2008 +0900 +++ b/TaskManager/Test/test_render/main.cpp Tue Dec 02 19:39:36 2008 +0900 @@ -19,8 +19,10 @@ -sg Draw SceneGraph\n\ 0: Joystick の 丸ボタン(Keyboard だとx) を押すと、キューブが二つに分かれる\n\ 1: 0 のキューブが大きい版\n\ - 2: スネークさんが写るだけ\n\ - 3: キューブが跳ね返りながら、勝手にキューブが増えて行く"; + 2: スネークさんが写るだけ 576x384 版\n\ + 3: スネークさんが写るだけ 800x600 版\n\ + 4: 何かの画像 1920x1080\n\ + 5 以降: キューブが跳ね返りながら、勝手にキューブが増えて行く"; int init(int argc, char *argv[])
--- a/TaskManager/Test/test_render/snake_bg.cpp Tue Dec 02 19:26:45 2008 +0900 +++ b/TaskManager/Test/test_render/snake_bg.cpp Tue Dec 02 19:39:36 2008 +0900 @@ -1,6 +1,6 @@ #include "SceneGraph.h" -//#include "xml_file/snake576x384.h" -//#include "xml_file/snake800x600.h" +#include "xml_file/snake576x384.h" +#include "xml_file/snake800x600.h" #include "xml_file/1920x1080.h" static void snake_move(SceneGraphPtr node, int screen_w, int screen_h); @@ -19,9 +19,15 @@ } void -create_snake_bg(void) +create_snake_bg(int bg) { - //SceneGraph::createFromXMLfile("xml_file/snake800x600.xml"); - SceneGraph::createFromXMLfile("xml_file/1920x1080.xml"); + if (bg == 2) { + SceneGraph::createFromXMLfile("xml_file/snake576x384.xml"); + } else if (bg == 3) { + SceneGraph::createFromXMLfile("xml_file/snake800x600.xml"); + } else { + SceneGraph::createFromXMLfile("xml_file/1920x1080.xml"); + } + Plane->set_move_collision(snake_move, snake_collision); }
--- a/TaskManager/Test/test_render/viewer.cpp Tue Dec 02 19:26:45 2008 +0900 +++ b/TaskManager/Test/test_render/viewer.cpp Tue Dec 02 19:39:36 2008 +0900 @@ -105,7 +105,7 @@ extern void node_init(void); extern void create_cube_split(int); -extern void create_snake_bg(void); +extern void create_snake_bg(int); void Viewer::run_init(char *xml, int sg_number) @@ -132,9 +132,11 @@ create_cube_split(sg_number); break; case 2: - create_snake_bg(); + case 3: + case 4: + create_snake_bg(sg_number); break; - case 3: + case 5: node_init(); break; default: