Mercurial > hg > Members > kono > Cerium
view TaskManager/Test/test_render/ball_bound.cpp @ 210:204b03ca98f8
fix DrawSpan
author | gongo@localhost.localdomain |
---|---|
date | Fri, 30 Jan 2009 14:55:04 +0900 |
parents | 07f3cd0bcc14 |
children | fe2cc32cd94d |
line wrap: on
line source
#include "SceneGraphRoot.h" #include "SGList.h" // prototype static void ball_move(SceneGraphPtr node, int screen_w, int screen_h); static void ball_collision(SceneGraphPtr node, int screen_w, int screen_h); static void ball_move(SceneGraphPtr node, int screen_w, int screen_h) { node->xyz[1] += 3.0f; } static void ball_collision(SceneGraphPtr node, int screen_w, int screen_h, SceneGraphPtr tree) { } void ball_bound_init(int screen_w, int screen_h) { SceneGraphPtr ball; sgroot->createFromXMLfile("xml_file/Ball.xml"); ball = sgroot->createSceneGraph(Ball); ball->set_move_collision(ball_move, ball_collision); ball->xyz[0] = screen_w/2; ball->xyz[1] = screen_h/2; sgroot->setSceneData(ball); }