# HG changeset patch # User tkaito # Date 1278874934 -32400 # Node ID f525427ae30f004ae734f72c90a42ac2bcd8c423 # Parent 6f0797d596bbc8275330cd45f0194a1cd3e4670d SceneGraphRoot::set_move_task add. diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/SceneGraph.cc --- 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) { diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/SceneGraph.h --- 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); diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/SceneGraphRoot.cc --- 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 */ diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/SceneGraphRoot.h --- 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); diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/task/Draw.cc --- 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 } diff -r 6f0797d596bb -r f525427ae30f Renderer/Engine/task/DrawSpan.cc --- 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); /*完全に透けているか判断, 法線ベクトルが奥を向いてるかどうか*/