Mercurial > hg > Game > Cerium
changeset 829:c3fb62d9355f draft
merge
author | tkaito |
---|---|
date | Tue, 25 May 2010 03:41:10 +0900 |
parents | d17459601f28 (current diff) 5ffe41af8d3b (diff) |
children | af2fb2e641eb 74fd8d2a7b9d |
files | |
diffstat | 2 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Tue May 25 03:40:11 2010 +0900 +++ b/Renderer/Engine/viewer.cc Tue May 25 03:41:10 2010 +0900 @@ -117,6 +117,7 @@ } for(int i = 0; i < spe_num; i++) { + HTaskPtr data_load = manager->create_task(DataLoad); data_load->set_param(0,(memaddr)size); data_load->set_param(1,(memaddr)Light); @@ -196,13 +197,13 @@ spackList[i-1].init(i*split_screen_h); } - task_next = manager->create_task(Dummy); + task_next = manager->create_task(Dummy,0,0,0,0); // ここは、Iterator を用意するべきだよね for (int i = 0; i < spe_num; i++) { - task_tex = manager->create_task(LoadTexture); - task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); - task_next->wait_for(task_tex); + task_tex = manager->create_task(LoadTexture,0,0,0,0); + task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); + task_next->wait_for(task_tex); task_tex->spawn(); } @@ -266,23 +267,24 @@ //send_key_task->set_param((int)sgroot); // set input data -> viewer keyPtr viewer->getKey(); - HTaskPtr update_key = viewer->manager->create_task(UpdateKey); + //HTaskPtr update_key = viewer->manager->create_task(UpdateKey,viewer->keyPtr, sizeof(key_stat),0,0); + HTaskPtr update_key = viewer->manager->create_task(UpdateKey,0,0,0,0); update_key->add_inData(viewer->keyPtr, sizeof(key_stat)); //update_key->set_cpu(SPE_0); update_key->spawn(); /* TASK_MOVE は外から引数で取ってくるべき */ //HTaskPtr move_task = viewer->manager->create_task(viewer->app->move_taskid); - HTaskPtr move_task = viewer->manager->create_task(Move); + HTaskPtr move_task = viewer->manager->create_task(Move,0,0,0,0); //move_task->set_param(sgroot); //HTaskPtr draw_task = viewer->manager->create_task(Draw); /* rendering task test */ - HTaskPtr draw_task = viewer->manager->create_task(Dummy); - HTaskPtr draw_dummy = viewer->manager->create_task(Dummy); + HTaskPtr draw_task = viewer->manager->create_task(Dummy,0,0,0,0); + HTaskPtr draw_dummy = viewer->manager->create_task(Dummy,0,0,0,0); - HTaskPtr switch_task = viewer->manager->create_task(Switch); + HTaskPtr switch_task = viewer->manager->create_task(Switch,0,0,0,0); viewer->draw_dummy = draw_dummy; switch_task->wait_for(draw_dummy); draw_task->set_post(post2speRendering, (void*)viewer, 0); @@ -347,7 +349,7 @@ post2rendering(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer *)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->rendering(task_next); } @@ -368,7 +370,7 @@ post2runLoop(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_loop(task_next); psx_sync_n(); @@ -378,7 +380,7 @@ post2runDraw(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_draw(task_next); } @@ -400,7 +402,7 @@ post2speRendering(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->spe_rendering(task_next); } @@ -419,7 +421,7 @@ post2speDraw(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->spe_draw(task_next); }
--- a/Renderer/Test/viewer.cc Tue May 25 03:40:11 2010 +0900 +++ b/Renderer/Test/viewer.cc Tue May 25 03:41:10 2010 +0900 @@ -8,17 +8,15 @@ // prototype static void object_move_rotation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h); static void object_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree); -static void object_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree); static void object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h); - -char *light_sysswitch = NULL; +int light_sysswitch = 1; int light_num = 4; void LightSysSwitch(Viewer *sgroot) { - if (strcmp(light_sysswitch,"on") == 0) { + if (light_sysswitch == 1) { sgroot->OnLightSysSwitch(); - } else if (strcmp(light_sysswitch,"off") == 0) { + } else if (light_sysswitch == 0) { sgroot->OffLightSysSwitch(); } } @@ -74,11 +72,6 @@ static void -object_collision_idle(SceneGraphPtr, void *sgroot_, int w, int h, SceneGraphPtr tree) -{ -} - -static void object_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h, SceneGraphPtr tree) { @@ -153,15 +146,20 @@ task_initialize(); manager->set_TMend(TMend); + for(int i=0;i<argc;i++) { if (strcmp(argv[i],"-sg") == 0 && i+1<=argc) { xmlfile = argv[i+1]; } else if (strcmp(argv[i],"-name") == 0 && i+1<=argc) { - parts[parts_cnt++] = argv[i+1]; + parts[parts_cnt++] = argv[i+1]; } else if (strcmp(argv[i],"-lightsys") == 0 && i+1<=argc) { - light_sysswitch = argv[i+1]; + if (strcmp(argv[i],"on") == 0) { + light_sysswitch = 1; + } else if (strcmp(argv[i],"off") == 0) { + light_sysswitch = 0; + } } else if (strcmp(argv[i],"-lightnum") == 0 && i+1<=argc) { - light_num = atoi(argv[i+1]); + light_num = atoi(argv[i+1]); } } return init(manager, argc, argv);