changeset 454:8c2e255f7a6c

Chain work
author kazz@henri.cr.ie.u-ryukyu.ac.jp
date Sat, 26 Sep 2009 00:17:04 +0900
parents dc50a62ffd96
children bdde56421910 9db30a515742
files TaskManager/Test/test_render/Application/chain_old.cc TaskManager/Test/test_render/Pad.cc TaskManager/Test/test_render/task/Switch.cc TaskManager/Test/test_render/viewer.cc
diffstat 4 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Application/chain_old.cc	Fri Sep 25 23:51:55 2009 +0900
+++ b/TaskManager/Test/test_render/Application/chain_old.cc	Sat Sep 26 00:17:04 2009 +0900
@@ -46,7 +46,7 @@
 {
     Pad *pad = sgroot->getController();
 
-    if (pad->circle.isHold()) {
+    if (pad->start.isHold()) {
         cv[CHAIN_LEN-1].can_move = FALSE;
         if (pad->left.isHold()) {
             cv[CHAIN_LEN-1].x += -5.0;
--- a/TaskManager/Test/test_render/Pad.cc	Fri Sep 25 23:51:55 2009 +0900
+++ b/TaskManager/Test/test_render/Pad.cc	Sat Sep 26 00:17:04 2009 +0900
@@ -10,17 +10,17 @@
 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);
-	}
+		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;
+		printf("Use Keyboard\n");
+		return new Keyboard;
     }
 }
--- a/TaskManager/Test/test_render/task/Switch.cc	Fri Sep 25 23:51:55 2009 +0900
+++ b/TaskManager/Test/test_render/task/Switch.cc	Sat Sep 26 00:17:04 2009 +0900
@@ -10,9 +10,9 @@
 Switch::run(void *rbuf, void *wbuf)
 {
 // 配列にする
-    SceneGraphRootPtr tmp = sgroot;
-    sgroot = sgroot_2;
-    sgroot_2 = tmp;
+//    SceneGraphRootPtr tmp = sgroot;
+//    sgroot = sgroot_2;
+//    sgroot_2 = tmp;
 
     return 0;
 }
--- a/TaskManager/Test/test_render/viewer.cc	Fri Sep 25 23:51:55 2009 +0900
+++ b/TaskManager/Test/test_render/viewer.cc	Sat Sep 26 00:17:04 2009 +0900
@@ -25,7 +25,7 @@
 int frames;
 
 SceneGraphRootPtr sgroot;
-SceneGraphRootPtr sgroot_2;
+//SceneGraphRootPtr sgroot_2;
 
 /* Data Pack sent to Other CPUs (ex. SPE) */
 SceneGraphPack *sgpack;
@@ -115,7 +115,7 @@
     frames     = 0;
 
     sgroot = new SceneGraphRoot(this->width, this->height);
-    sgroot_2 = new SceneGraphRoot(this->width, this->height);
+//    sgroot_2 = new SceneGraphRoot(this->width, this->height);
     //sgroot->createFromXMLFile(xml);
     // ここの switch は application->init(this, manager, sg_no); になるべき
     switch (sg_number) {
@@ -163,12 +163,12 @@
         break;
     case 16:
 		app = new Chain();
-        app->init(manager, this->width, this-> height);
+        app->init(manager, this->width, this->height);
 		speLoop();
 		return;
         break;
     case 17:
-        chain_old_init(manager, this->width, this-> height);
+        chain_old_init(manager, this->width, this->height);
 		break;
     default:
         node_init(manager);
@@ -541,7 +541,7 @@
     }
 
     delete sgroot;
-    delete sgroot_2;
+//    delete sgroot_2;
     quit();
 }