Mercurial > hg > Members > tkaito > dandy
diff greenclab.cc @ 4:e089ac9ea221
greenclab add. not complete...
author | tkaito |
---|---|
date | Sun, 06 Jun 2010 06:47:45 +0900 |
parents | 69b4108bf4e8 |
children | 57af5c610b34 |
line wrap: on
line diff
--- a/greenclab.cc Sun Jun 06 05:23:51 2010 +0900 +++ b/greenclab.cc Sun Jun 06 06:47:45 2010 +0900 @@ -1,47 +1,23 @@ -#include <math.h> -#include "SceneGraphRoot.h" -#include "SGList.h" +#include "game_scene01.h" + +void +gclab_move(SceneGraphPtr node, void *sgroot_, int w, int h) +{ -static void greenclab_move(SceneGraphPtr node, int screen_w, int screen_h); -static void greenclab_move_idle(SceneGraphPtr node, int screen_w, int screen_h); -static void greenclab_collision(SceneGraphPtr node, int screen_w, int screen_h, - SceneGraphPtr tree); -void create_greenclab(TaskManager *manager, int number); +/* + if (w > node->xyz[0]) { + } else if (0 < node->xyz[0]) { + } + if (0 < node->xyz[1]) { + } else if (h > node->xyz[1]) { + } +*/ +} -static void -greenclab_move(SceneGraphPtr node, int w, int h) +void +gclab_collision(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree) { } -static void -greenclab_move_idle(SceneGraphPtr node, int w, int h) -{ - node->xyz[1] += 2.0f; - node->xyz[2] = 0.0f; -} -static void -greenclab_collision(SceneGraphPtr node, int w, int h, SceneGraphPtr tree) -{ - -} - -void -create_greenclab(TaskManager *manager, int w, int h) -{ - SceneGraphPtr greenclab; - SceneGraphPtr back; - - sgroot->createFromXMLfile(manager, "xml/enemy_greenclab.xml"); - - back = sgroot->createSceneGraph(); - greenclab = sgroot->createSceneGraph(greenclab); - greenclab->xyz[0] = w/2; - greenclab->xyz[1] = 0.0f; - greenclab->set_move_collision(greenclab_move_idle, greenclab_collision); - - back->addChild(greenclab); - - sgroot->setSceneData(back); -}