diff Renderer/Test/cube.cc @ 563:b21a013051a2

all exmple on Mac OS X
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 22 Oct 2009 23:05:16 +0900
parents f6daf964f483
children d0b8860c17f8
line wrap: on
line diff
--- a/Renderer/Test/cube.cc	Thu Oct 22 22:22:31 2009 +0900
+++ b/Renderer/Test/cube.cc	Thu Oct 22 23:05:16 2009 +0900
@@ -1,7 +1,6 @@
 #include <math.h>
 #include "SceneGraphRoot.h"
 #include "vacuum.h"
-#include "SGList.h"
 #define SELECT 2
 
 void
@@ -52,6 +51,8 @@
 
 }
 
+extern int redcube ;
+extern int enemy ;
 
 void
 cube_split(SceneGraphPtr root,SceneGraphPtr tree)
@@ -62,10 +63,10 @@
   //  SceneGraphPtr root_common_move = root->parent;
 
   if(random()%SELECT) {
-    p = sgroot->createSceneGraph(REDCUBE);
+    p = sgroot->createSceneGraph(redcube);
   }
   else {
-    p = sgroot->createSceneGraph(ENEMY);
+    p = sgroot->createSceneGraph(enemy);
   }
 
     root->set_move_collision(cube_move_right, cube_collision);
@@ -98,9 +99,9 @@
   float dx, dy,ddx,ddy, r;
   float q = 0;
 
-  for (; it->hasNext(REDCUBE);) {
+  for (; it->hasNext(redcube);) {
 
-    it->next(REDCUBE);
+    it->next(redcube);
     SceneGraphPtr mcube = it->get();
     dx = node->xyz[0] - mcube->xyz[0];
     dy = node->xyz[1] - mcube->xyz[1];
@@ -138,8 +139,8 @@
   float dx, dy,ddx,ddy, r;
   float q = 0;
 
-  for (; it->hasNext(ENEMY);) {
-    it->next(ENEMY);
+  for (; it->hasNext(enemy);) {
+    it->next(enemy);
     SceneGraphPtr mcube = it->get();
 
     dx = node->xyz[0] - mcube->xyz[0];