Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/test_render/viewer.cpp @ 221:d61fded0729e
Cameraの設定、Makefile 修正
author | gongo@gendarme.local |
---|---|
date | Tue, 10 Feb 2009 01:47:12 +0900 |
parents | 0f1ff7b06157 |
children | 5ffee529dc59 |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/viewer.cpp Mon Feb 09 21:58:45 2009 +0900 +++ b/TaskManager/Test/test_render/viewer.cpp Tue Feb 10 01:47:12 2009 +0900 @@ -8,9 +8,8 @@ #include "Func.h" #include "error.h" #include "TaskManager.h" -#include "Keyboard.h" -#include "Joystick.h" #include <wchar.h> +#include "Pad.h" extern void post2runLoop(void *); @@ -36,30 +35,6 @@ * */ -/** - * Joystick があればそれを使い、 - * 無ければキーボードを返す - */ -static Pad* -create_controller(void) -{ - if (SDL_NumJoysticks()) { - SDL_Joystick *joy = SDL_JoystickOpen(0); - if (!joy) { - printf("%s: failed to open joystick", __FUNCTION__); - printf("Instead use Keyboard\n"); - return new Keyboard; - } else { - printf("Use Joystick\n"); - return new Joystick(joy); - } - } else { - printf("Use Keyboard\n"); - return new Keyboard; - } -} - - Viewer::Viewer(int b, int w, int h, int _num) { bpp = b; @@ -128,7 +103,7 @@ this_time = 0; frames = 0; - sgroot = new SceneGraphRoot; + sgroot = new SceneGraphRoot(this->width, this->height); //sgroot->createFromXMLFile(xml); switch (sg_number) { @@ -164,8 +139,6 @@ break; } - sgroot->controller = create_controller(); - sgpack = (SceneGraphPack*)manager->allocate(sizeof(SceneGraphPack)); sgpack->init(); ppack = (PolygonPack*)manager->allocate(sizeof(PolygonPack)); @@ -393,10 +366,6 @@ printf("%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0); } - //scene_graph->delete_data(); - //scene_graph->controller->close(); - //delete scene_graph; - delete sgroot; quit();