# HG changeset patch # User gongo@charles.cr.ie.u-ryukyu.ac.jp # Date 1228214376 -32400 # Node ID 70146cdec3d47f8efa2b8f67866213cbe4f76d58 # Parent 4a00bb4c6184eb6f0c5bf633104648eb630734ee 画像のサイズテストを加える -sg = [2,3,4] diff -r 4a00bb4c6184 -r 70146cdec3d4 TaskManager/Test/test_render/main.cpp --- 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[]) diff -r 4a00bb4c6184 -r 70146cdec3d4 TaskManager/Test/test_render/snake_bg.cpp --- 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); } diff -r 4a00bb4c6184 -r 70146cdec3d4 TaskManager/Test/test_render/viewer.cpp --- 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: