Mercurial > hg > Members > tkaito > task_dandy
view stage_init.cc @ 2:6e1afe1016dc
Task is not yet.
author | tkaito |
---|---|
date | Thu, 17 Jun 2010 05:11:29 +0900 |
parents | |
children | 7b4c2cfeba45 |
line wrap: on
line source
#include "dandy.h" void stage_move(SceneGraphPtr node, void *sgroot_, int w, int h); void stage_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree); void create_title(void *sgroot_, int w, int h) { Viewer *sgroot = (Viewer *)sgroot_; SceneGraphPtr back, title; back = sgroot->createSceneGraph(); title = sgroot->createSceneGraph("title001"); title->xyz[0] = w/2; title->xyz[1] = h/2; title->set_move_collision(title_move, title_coll); back->addChild(title); sgroot->setSceneData(back); } void create_stage(void *sgroot_, int w, int h) { SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; SceneGraphPtr stage = sgroot->createSceneGraph(); SceneGraphPtr mydandy = sgroot->createSceneGraph("mydandy"); mydandy->set_move_collision(dandy_move, dandy_coll); stage->set_move_collision(stage_move, stage_coll); mydandy->xyz[0] = w/2; mydandy->xyz[1] = h*0.9; mydandy->xyz[2] = 0.0f; stage->addChild(mydandy); sgroot->setSceneData(stage); } void stage_move(SceneGraphPtr node, void *sgroot_, int w, int h) { //stage_plan(node, sgroot_, w, h); node->frame += 1; } void stage_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree) { }