Mercurial > hg > Game > Cerium
diff Renderer/Test/direction.cc @ 653:7a311860a76e draft
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Wed, 25 Nov 2009 21:56:14 +0900 |
parents | d65f21b18165 |
children | 91e2c96be77b |
line wrap: on
line diff
--- a/Renderer/Test/direction.cc Sat Nov 21 11:20:29 2009 +0900 +++ b/Renderer/Test/direction.cc Wed Nov 25 21:56:14 2009 +0900 @@ -2,8 +2,9 @@ #include "direction.h" static void -x_move(SceneGraphPtr node, int w, int h) +x_move(SceneGraphPtr node, void *sgroot_, int w, int h) { + SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; Pad *pad = sgroot->getController(); node->xyz[0] = w/2; @@ -27,8 +28,9 @@ } static void -y_move(SceneGraphPtr node, int w, int h) +y_move(SceneGraphPtr node, void *sgroot_, int w, int h) { + SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; Pad *pad = sgroot->getController(); node->xyz[0] = w/2; @@ -50,14 +52,14 @@ } static void -z_move(SceneGraphPtr node, int w, int h) +z_move(SceneGraphPtr node, void *sgroot_, int w, int h) { node->xyz[0] = w/2; node->xyz[1] = h/2; } static void -dir_collision(SceneGraphPtr node, int w, int h, SceneGraphPtr tree) +dir_collision(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree) { } @@ -93,6 +95,12 @@ return sgroot; } +MainLoopPtr +direction::init_only_sg(SgChange *sgroot, int screen_w, int screen_h) +{ + return sgroot; +} + extern Application * application() { return new direction();