Mercurial > hg > Members > kono > Cerium
changeset 781:d46dea8399e4
working on Mac OS X
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 05 Mar 2010 13:24:38 +0900 |
parents | 50cff7c4d255 |
children | 699a2d6ea121 fc9c3b23d875 |
files | Renderer/Engine/SgChange.cc Renderer/Test/property_test.cc Renderer/Test/property_test.h TaskManager/kernel/schedule/SchedTaskArray.cc |
diffstat | 4 files changed, 25 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/SgChange.cc Fri Mar 05 13:13:05 2010 +0900 +++ b/Renderer/Engine/SgChange.cc Fri Mar 05 13:24:38 2010 +0900 @@ -69,6 +69,19 @@ psx_sync_n(); } +static void +post2runLoop(SchedTask *s, void *sgchange_, void *arg) +{ + SgChange *sgchange = (SgChange*)sgchange_; + HTaskPtr task_next = sgchange->manager->create_task(Dummy); + sgchange->viewer->light_xyz_stock = sgchange->sgroot_A->getLightVector(); + sgchange->pass_draw_tree(); + sgchange->run_loop(task_next); + + psx_sync_n(); +} + + void SgChange::pass_draw_tree() { @@ -77,6 +90,7 @@ void SgChange::run_loop(HTaskPtr task_next) +{ viewer->dev->clear_screen(); bool quit_flg;
--- a/Renderer/Test/property_test.cc Fri Mar 05 13:13:05 2010 +0900 +++ b/Renderer/Test/property_test.cc Fri Mar 05 13:24:38 2010 +0900 @@ -6,19 +6,18 @@ #include "property_test.h" #include "Func.h" -ChainPropertyPtr properties[2]; -ChainProperty cv[CHAIN_LEN]; +static ChainPropertyPtr properties[2]; +static ChainProperty cv[CHAIN_LEN]; -void createSceneGraphFromProperty(SceneGraphPtr root, ChainPropertyPtr cv, SgChange *sgroot); -void +static void init_chainold_vars(ChainPropertyPtr cv) { cv->x = 0, cv->y = 0, cv->next_x = 0, cv->next_y = 0; cv->vx = 0, cv->vy = 0, cv->next_vx = 0, cv->next_vy = 0; cv->can_move = TRUE; } -void +static void set_old_vector(ChainPropertyPtr cv, SceneGraphPtr sg) { sg->xyz[0] = (float)cv->next_x; sg->xyz[1] = (float)cv->next_y; @@ -50,7 +49,7 @@ } } -void +static void chain_old_move(SceneGraphPtr sg, void *sgroot_, int w, int h) { int id = sg->id; @@ -106,40 +105,18 @@ = 90 + atan((cv[p].next_y - cv[n].next_y) / (cv[p].next_x - cv[n].next_x)) * 180 / M_PI; } -/* -void -chain_old_collision(SceneGraphPtr sg, int w, int h, SceneGraphPtr osg) -{ - -} -*/ - -void -spe_move_collision(ChainProperty cv, void *sgroot_,spe_move_func new_move, spe_move_func new_collision) -{ - - cv.move = new_move; - cv.collision = new_collision; - -} -void +static void chain_old_collision(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr ocv) { //createSceneGraphFromProperty(cv, cv); } -void -property_swich() -{ -} - - -void -createSceneGraphFromProperty(SceneGraphPtr root, ChainPropertyPtr cv, SgChange *sgroot) +static void +createSceneGraphFromProperty(SceneGraphPtr root, ChainPropertyPtr cv, Viewer *sgroot) { SceneGraphPtr node; @@ -161,7 +138,7 @@ } -void +static void set_properties(ChainPropertyPtr cv) { properties[0] = cv; @@ -219,7 +196,7 @@ return new Chain(); } -const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; +extern const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; extern int init(TaskManager *manager, int argc, char *argv[]); extern void task_initialize();
--- a/Renderer/Test/property_test.h Fri Mar 05 13:13:05 2010 +0900 +++ b/Renderer/Test/property_test.h Fri Mar 05 13:24:38 2010 +0900 @@ -10,7 +10,7 @@ double angle[3]; int can_move; int id; - char *objname; + const char *objname; spe_move_func move; spe_collision_func collision; SceneGraphPtr parent;
--- a/TaskManager/kernel/schedule/SchedTaskArray.cc Fri Mar 05 13:13:05 2010 +0900 +++ b/TaskManager/kernel/schedule/SchedTaskArray.cc Fri Mar 05 13:24:38 2010 +0900 @@ -156,7 +156,6 @@ } else { // このTaskArrayは終り。save していた Task の次を返す。 // savedTask の read/exec は実行されない (command = TaskArray) - SchedTask *s = (SchedTask *)savedTask; SchedTaskBase *n = savedTask->next(scheduler, savedTask); scheduler->mail_write((memaddr)savedTask->task->self); free(array);