Mercurial > hg > Members > kono > Cerium
changeset 882:f525427ae30f
SceneGraphRoot::set_move_task add.
author | tkaito |
---|---|
date | Mon, 12 Jul 2010 04:02:14 +0900 |
parents | 6f0797d596bb |
children | 756f76293237 |
files | Renderer/Engine/SceneGraph.cc Renderer/Engine/SceneGraph.h Renderer/Engine/SceneGraphRoot.cc Renderer/Engine/SceneGraphRoot.h Renderer/Engine/task/Draw.cc Renderer/Engine/task/DrawSpan.cc |
diffstat | 6 files changed, 27 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraph.cc Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/SceneGraph.cc Mon Jul 12 04:02:14 2010 +0900 @@ -650,7 +650,6 @@ this->create_sg = new_create_sg; } - void SceneGraph::add_next(SceneGraphPtr next) {
--- a/Renderer/Engine/SceneGraph.h Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/SceneGraph.h Mon Jul 12 04:02:14 2010 +0900 @@ -36,8 +36,9 @@ int property_size; void *propertyptr; - //void *property; - //void *update_property; + int move_id; + int coll_id; + PostFunction post_func; memaddr property; memaddr update_property; @@ -93,7 +94,6 @@ void set_move_collision(move_func new_move, collision_func new_collision); void set_move_collision(move_func new_move, collision_func new_collision, void *sgroot); void set_move_collision(move_func new_move, collision_func new_collision, create_sg_func new_create_sg); - void set_game_task(void *sgroot_, int id, void *property, int size, PostFunction post_func); void remove(void); SceneGraphPtr realRemoveFromTree(SceneGraphPtr tree); SceneGraphPtr realRemoveFromList(SceneGraphPtr list);
--- a/Renderer/Engine/SceneGraphRoot.cc Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/SceneGraphRoot.cc Mon Jul 12 04:02:14 2010 +0900 @@ -710,5 +710,25 @@ task->spawn(); } +static void +main_task_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h) +{ + int size = node->property_size; + void *e = node->propertyptr; + int move = node->move_id; + PostFunction post_func = node->post_func; + sgroot->set_game_task(move, (void*)e, size, post_func); +} + +void +SceneGraphRoot::set_move_task(SceneGraphPtr node, int move, void *property, int size, + PostFunction post_func) +{ + node->move = main_task_move; + node->post_func = post_func; + node->move_id = move; + node->propertyptr = property; + node->property_size = size; +} /* end */
--- a/Renderer/Engine/SceneGraphRoot.h Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/SceneGraphRoot.h Mon Jul 12 04:02:14 2010 +0900 @@ -106,6 +106,8 @@ void OnLightSysSwitch(); void OffLightSysSwitch(); void set_game_task(int id, void *property, int size, PostFunction post_func); + void set_move_task(SceneGraphPtr node, int move, void *property, int size, PostFunction post_func); + /* Other System API */ void allExecute(int screen_w, int screen_h);
--- a/Renderer/Engine/task/Draw.cc Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/task/Draw.cc Mon Jul 12 04:02:14 2010 +0900 @@ -91,7 +91,6 @@ free(free_pp); free(free_spack); free(vMid10); - +#endif return 0; -#endif }
--- a/Renderer/Engine/task/DrawSpan.cc Tue Jul 06 10:39:41 2010 +0900 +++ b/Renderer/Engine/task/DrawSpan.cc Mon Jul 12 04:02:14 2010 +0900 @@ -195,7 +195,7 @@ int alpha = color & 0xff000000; #endif - int *light_sysswitch = (int*)smanager->global_get(LightSysSwitch); + //int *light_sysswitch = (int*)smanager->global_get(LightSysSwitch); /*完全に透けているか判断, 法線ベクトルが奥を向いてるかどうか*/