changeset 1112:fa1f4a1c47bf draft

fix viewer for non screen mode.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Mon, 17 Jan 2011 06:15:46 +0900
parents c9d0683c9b39 (current diff) 3c2c445be6ba (diff)
children d2d44bc55fa1
files Renderer/Engine/RenderingTasks.h Renderer/Engine/task/task_init.cc Renderer/Engine/viewer.cc Renderer/Engine/viewer.h
diffstat 15 files changed, 237 insertions(+), 165 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/RenderingTasks.h	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/RenderingTasks.h	Mon Jan 17 06:15:46 2011 +0900
@@ -15,6 +15,10 @@
      DrawSpan,
      DrawBack,
 
+     EXEC_ONLY_TASK,
+     RUN_LOOP_TASK,
+     RENDERING_TASK,
+
      LoadTexture,
      SetTexture,
 
--- a/Renderer/Engine/SceneGraph.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/SceneGraph.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -19,7 +19,6 @@
 static TextureHash texture_hash;
 texture_list list[TABLE_SIZE];
 
-
 extern int decode(char *cont, FILE *outfile);
 
 static void
@@ -189,6 +188,7 @@
     get_data(manager, surface->children);
 
     finalize = &SceneGraph::finalize_original;
+
 }
 
 void
--- a/Renderer/Engine/SceneGraphRoot.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/SceneGraphRoot.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -7,13 +7,14 @@
 #include "TextureHash.h"
 #include "texture.h"
 #include "Application.h"
+#include "SgidHash.h"
 
 static int cnt = 0;
 static const int SGLIST_LENGTH = 138;
 static int sg_src_size = SGLIST_LENGTH ;
 static int sg_src_id = -1;
 static SceneGraphPtr *sg_src;
-
+static SgidHash sgid_hash;
 
 SceneGraphRoot *sgroot;
 
@@ -113,6 +114,7 @@
     }
     sg->sgid = ++sg_src_id;
     sg_src[sg->sgid] = sg;
+    sgid_hash.hash_regist((const char*)sg->name, sg->sgid);
 }
 
 
@@ -250,11 +252,15 @@
 int
 SceneGraphRoot::getSgid(const char *name)
 {
+  /*
     for(int i =0;i<= sg_src_id; i++) {
 	if (sg_src[i] && strcmp(name,sg_src[i]->name) == 0)
 	    return i;
     }
     return -1;
+  */
+  return sgid_hash.get_sgid(name);
+    
 }
 
 int
@@ -290,7 +296,7 @@
     int light_num = 4;
     for (int i = 0; i < light_num; i++) {
 
-	get_matrix(light[i]->matrix, light[i]->angle, light[i]->xyz, light[i]->scale, camera->matrix);
+	get_matrix(light[i]->matrix, light[i]->angle, light[i]->xyz, camera->matrix);
       
 	light_vector[i*4] = 0.0f;
 	light_vector[i*4+1] = 0.0f;
@@ -381,9 +387,9 @@
 	    cur_parent->addChild(c);
 	    c->frame = t->frame;
 	    /*親の回転、座標から、子の回転、座標を算出*/
-	    get_matrix(c->matrix, c->angle, c->xyz, c->scale, cur_parent->matrix);
+	    get_matrix(c->matrix, c->angle, c->xyz, cur_parent->matrix);
 	    /*法線用の行列。Cameraの行列を抜いている(Cameraのコンストラクタで、単位行列にしている)*/
-	    get_matrix(c->real_matrix, c->angle, c->xyz, c->scale, cur_parent->real_matrix);
+	    get_matrix(c->real_matrix, c->angle, c->xyz, cur_parent->real_matrix);
 	    //get_matrix(c->real_matrix, c->angle, c->xyz, camera->real_matrix);
 
 	} 
@@ -428,7 +434,7 @@
     int light_num = 4;
     for (int i = 0; i < light_num; i++) {
 
-	get_matrix(light[i]->matrix, light[i]->angle, light[i]->xyz, light[i]->scale, camera->matrix);
+	get_matrix(light[i]->matrix, light[i]->angle, light[i]->xyz, camera->matrix);
       
 	light_vector[i*4] = 0.0f;
 	light_vector[i*4+1] = 0.0f;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Engine/SgidHash.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -0,0 +1,72 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "SgidHash.h"
+
+SgidHash::SgidHash(void)
+{
+    int size = sizeof(sg_hashtable)*SGID_NUM;
+#if defined(__SPU__) || ! defined(HAS_POSIX_MEMALIGN)
+        table =  (sg_hashtable*)malloc(size);
+#else
+        posix_memalign((void**)&table, alignment, size);
+#endif
+    for (int i = 0; i < SGID_NUM; i++) {
+        table[i].sg_id = -1;
+        table[i].key = NULL;
+    }
+}
+
+SgidHash::~SgidHash(void)
+{
+    free(table);
+}
+
+int
+SgidHash::hash_function(const char *key)
+{
+    //float value = 0.0;
+    int value = 0;
+
+    for (int i = 0; key[i]; i++) {
+        value += key[i]*(i+1)*17+1;
+    }
+
+    return value%SGID_NUM;
+}
+
+int
+SgidHash::hash_regist(const char* key, int &id)
+{
+    int hash = hash_function(key);
+
+    for (int i = 0; ; i++) {
+        if (table[hash].sg_id == -1) {
+            table[hash].key   = (char*)key;
+	    table[hash].sg_id = id;
+            return 0;
+
+        } else if (strcmp(key, table[hash].key) == 0
+                   && table[hash].sg_id != -1){
+            return table[hash].sg_id;
+        }
+        hash = ((37*hash)^(11*i)) % SGID_NUM;
+    }
+}
+
+int
+SgidHash::get_sgid(const char* key)
+{
+
+    int hash = hash_function(key);
+    for (int i = 0; ; i++) {
+        if (table[hash].sg_id == -1) {
+            return -1;
+
+        } else if (strcmp(key, table[hash].key) == 0
+                   && table[hash].sg_id != -1){
+            return table[hash].sg_id;
+        }
+        hash = ((37*hash)^(11*i)) % SGID_NUM;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Engine/SgidHash.h	Mon Jan 17 06:15:46 2011 +0900
@@ -0,0 +1,23 @@
+#ifndef INCLUDED_SGID_HASH
+#define INCLUDED_SGID_HASH
+
+const int SGID_NUM = 1000;
+
+struct sg_hashtable{
+    int sg_id;
+    char* key;
+};
+
+class SgidHash{
+public:
+    sg_hashtable *table;
+
+    SgidHash(void);
+    ~SgidHash(void);
+    int hash_function(const char* image_name);
+    int hash_regist(const char* image_name, int &sg_id);
+    int get_sgid(const char* key);
+    void remove(int id) {  table[id].sg_id = -1; }
+};
+
+#endif
--- a/Renderer/Engine/matrix_calc.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/matrix_calc.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -135,6 +135,9 @@
     return (v0[0]*v1[0] + v0[1]*v1[1] + v0[2]*v1[2]);
 }
 
+/**
+ *     xyz = xyz1 * xyz2
+ */
 void matrix4x4(float *xyz, float *xyz1, float *xyz2) //xyz[16]
 {
   for(int t=0; t<16; t+=4)
@@ -147,11 +150,39 @@
 }
 
 /**
+ *   c_xyz を中心に sacle 倍する
+ */
+void
+scale_matrix(float *xyz, float *scale, float *c_xyz) 
+{
+  float xyz2[16] = {
+        scale[0],  0,         0,         scale[0]*(-c_xyz[0]) + c_xyz[0],
+        0,         scale[1],  0,         scale[1]*(-c_xyz[1]) + c_xyz[1],
+        0,         0,         scale[2],  scale[2]*(-c_xyz[2]) + c_xyz[2],
+        0,         0,         0,         1
+
+  };
+  float xyz1[16]  = {  
+    xyz[0], xyz[1], xyz[2], xyz[3],
+    xyz[4], xyz[5], xyz[6], xyz[7],
+    xyz[8], xyz[9], xyz[10], xyz[11],
+    xyz[12], xyz[13], xyz[14], xyz[15]};
+
+  for(int t=0; t<16; t+=4)
+    {
+      for(int i=0; i<4; i++)
+	{
+	  xyz[t+i] = xyz1[t]*xyz2[i] + xyz1[t+1]*xyz2[4+i] + xyz1[t+2]*xyz2[8+i] + xyz1[t+3]*xyz2[12+i];
+	}
+    }
+}
+
+/**
        stack 上の変換行列に、相対的に、rxyz の回転、txyz の平行移動、scale の拡大を
        行ったものを matrix に代入する
  */
 void
-get_matrix( float *matrix, float *rxyz, float *txyz, float *scale, float *stack)
+get_matrix( float *matrix, float *rxyz, float *txyz, float *stack)
 {
   float radx,rady,radz;
   radx = rxyz[0]*3.14/180;
@@ -191,16 +222,6 @@
 	matrix4x4(matrix, m, stack);
     }
 
-    matrix[0] *= scale[0];
-    matrix[1] *= scale[0];
-    matrix[2] *= scale[0];
-    matrix[4] *= scale[1];
-    matrix[5] *= scale[1];
-    matrix[6] *= scale[1];
-    matrix[8] *= scale[2];
-    matrix[9] *= scale[2];
-    matrix[10] *= scale[2];
-
 }
 
 void rotate_x(float *xyz, float r)
--- a/Renderer/Engine/matrix_calc.h	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/matrix_calc.h	Mon Jan 17 06:15:46 2011 +0900
@@ -2,13 +2,14 @@
 #define CR_SYS_H
 
 void noMoreMemory();
-void get_matrix(float *matrix, float *rxyz, float *txyz, float *scale, float *stack);
+void get_matrix(float *matrix, float *rxyz, float *txyz, float *stack);
 void rotate_x(float *xyz, float r);
 void rotate_y(float *xyz, float r);
 void rotate_z(float *xyz, float r);
 //void rotate(float *xyz, float *matrix, float *rxyz, float *txyz, float *stack[]);
 void rotate(float *xyz, float *matrix);
 void translate(float *xyz, float x, float y, float z);
+void scale_matrix(float *xyz, float *scale, float *c_xyz);
 void matrix4x4(float *, float *, float *);
 
 void normalize(float *v0, float *v1);
--- a/Renderer/Engine/task/task_init.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/task/task_init.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -15,6 +15,10 @@
 SchedExternTask(DrawSpanRenew);
 SchedExternTask(DrawBack);
 
+SchedExternTask(EXEC_ONLY_TASK);
+SchedExternTask(RUN_LOOP_TASK);
+SchedExternTask(RENDERING_TASK);
+
 SchedExternTask(LoadTexture);
 
 // SchedExternTask(Move);
@@ -55,6 +59,10 @@
     SchedRegister( DrawSpan);
     SchedRegister( DrawBack);
 
+    SchedRegister(EXEC_ONLY_TASK);
+    SchedRegister(RUN_LOOP_TASK);
+    SchedRegister(RENDERING_TASK);
+
     SchedRegister( LoadTexture);
 
 //    SchedRegister( Move);
--- a/Renderer/Engine/task/update_sgp.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/task/update_sgp.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -16,7 +16,6 @@
     SceneGraphPack *_sgp = (SceneGraphPack*)s->get_output(wbuf, 0);
     //int screen_width = get_param(0);
     //int screen_height = get_param(1);
-    float scale[] = {1,1,1};
 
     // 本当はここでやるもんじゃないんだが。。。
     for (int i = 0; i < sgp->info.size && i < 3; i++) {
@@ -25,11 +24,11 @@
 	do {
 	    if (node->pn != -1) {
 		get_matrix(node->translation,
-			   node->angle, node->obj_pos, scale,
+			   node->angle, node->obj_pos, 
 			   sgp->node[node->pn].translation);
 	    } else {
 		get_matrix(node->translation,
-			   node->angle, node->obj_pos, scale,
+			   node->angle, node->obj_pos, 
 			   NULL);
 	    }
 
--- a/Renderer/Engine/viewer.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/viewer.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -12,12 +12,7 @@
 #include "Pad.h"
 #include "Application.h"
 #include "lindaapi.h"
-
-static void post2runLoop(SchedTask *s,void *viewer,void *s1);
-static void post2runDraw(SchedTask *s,void *viewer,void *s1);
-static void post2speRendering(SchedTask *s,void *viewer,void *s1);
-static void post2speDraw(SchedTask *s,void *viewer,void *s1);
-static void post2runMoveDrawLoop(SchedTask *s,void *viewer,void *s1);
+#include "SchedTask.h"
 
 /* measure for FPS (Frame Per Second) */
 static int start_time;
@@ -186,8 +181,9 @@
 	}
     }
 
-    task_next = manager->create_task(Dummy,0,0,0,0);
-    
+    task_next = manager->create_task(RUN_LOOP_TASK,0,0,0,0);
+    task_next->set_param(0, (void*)this);
+   
     // ここは、Iterator を用意するべきだよね
     for (int j = 0; j < spe_num; j++) {
         task_tex = manager->create_task(LoadTexture,0,0,0,0);
@@ -197,7 +193,9 @@
     }
 
 
-    return task_next;
+    task_next->spawn();
+
+    return 0;
 }
 
 
@@ -246,74 +244,39 @@
     }
 }
 
-static void
-post2runMoveDrawLoop(SchedTask *m, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    
-    // 同じ PPE 上なので sgroot(ポインタ) を set_param で送る。 
-    //HTaskPtr send_key_task = viewer->manager->create_task(SendKey);
-    //send_key_task->set_param((int)sgroot);
-    // set input data -> viewer keyPtr
-    viewer->getKey();
-    //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,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,0,0,0,0);
-    HTaskPtr draw_dummy = viewer->manager->create_task(Dummy,0,0,0,0);
-
-    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);
-
-    // switch_task->wait_for(move_task);
-    switch_task->wait_for(draw_task);
-    // move_task->spawn();
-    draw_task->spawn();
-
-    switch_task->set_post(post2runMoveDrawLoop, (void*)viewer, 0);
-    switch_task->spawn();
-    
-}
 
 void
 Viewer::mainLoop()
 {
-    HTaskPtr task_next = initLoop();
-
-    task_next->set_post(&post2runLoop, (void *)this, (void*)pixels); // set_post(function(this->run_loop()), NULL)
-    task_next->spawn();
+    if (pixels) {
+	initLoop();
+    } else {
+	HTaskPtr task_next = manager->create_task(EXEC_ONLY_TASK, 0, 0, 0, 0);
+	task_next->set_param(0, (void*)this);
+	
+	task_next->spawn();
+    }
 }
 
-void
-Viewer::run_loop(HTaskPtr task_next)
+bool
+Viewer::main_exec(HTaskPtr task_next)
 {
+    psx_sync_n();
+    
     task_next = app->application_task(task_next, this);
     dev->clear_screen();
-
+    
     bool quit_flg;
     quit_flg = quit_check();
     if (quit_flg == true) {
         this_time = get_ticks();
         run_finish();
-        return;
+        return false;
     }
 
     dev->clean_pixels();
+    pixels = dev->flip_screen(pixels);
 
-    pixels = dev->flip_screen(pixels);
     sgroot->updateControllerState();
     if (app->app_loop(this)) {
 	//TaskArray を使うか使わないか
@@ -329,17 +292,49 @@
     light_xyz_stock = sgroot->getLightVector();
     light_switch_stock = sgroot->getLightSwitch();
     light_sysswitch_stock = sgroot->getLightSysSwitch();
-    //sgroot->checkRemove();
+
+    return true;
+}
 
-    // ここから下は Rendering という関数にする
-    if (pixels) {
+void
+Viewer::run_loop(HTaskPtr task_next)
+{
+    if (main_exec(task_next)) {
 	rendering(task_next);
-    } else {
-	task_next->set_post(post2runLoop, (void*)this, NULL);
-	task_next->spawn();
     }
 }
 
+SchedDefineTask1(EXEC_ONLY_TASK,exec_only_task);
+
+static int
+exec_only_task(SchedTask *smanager, void *rbuf, void *wbuf)
+{
+
+  Viewer *viewer = (Viewer*)smanager->get_param(0);
+  HTaskPtr task_next = smanager->create_task(EXEC_ONLY_TASK, 0, 0, 0, 0);
+  task_next->set_param(0, (void*)viewer);
+
+  if (viewer->main_exec(task_next)) {
+      task_next->spawn();
+  }
+  return 0;
+}
+
+SchedDefineTask1(RUN_LOOP_TASK,run_loop_task);
+
+static int
+run_loop_task(SchedTask *smanager, void *rbuf, void *wbuf)
+{
+
+  Viewer *viewer = (Viewer*)smanager->get_param(0);
+  HTaskPtr task_next = smanager->create_task(RENDERING_TASK, 0, 0, 0, 0);
+  task_next->set_param(0, (void*)viewer);
+
+  viewer->run_loop(task_next);
+
+  return 0;
+}
+
 
 
 void
@@ -347,13 +342,6 @@
 {
 }
 
-void
-post2rendering(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer *)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->rendering(task_next);
-}
 
 void 
 Viewer::rendering(HTaskPtr task_next)
@@ -362,29 +350,23 @@
     
     // Barrier 同期
     // run_draw() を呼ぶ post2runDraw
-    task_next->set_post(post2runDraw, (void*)this, 0); // set_post(function(this->run_draw()), NULL)
     task_next->spawn();
 
     // TASK_CREATE_SPAN が全て終わったら DUMMY_TASK が Viewer::run_draw() を呼ぶ
 }
 
-static void
-post2runLoop(SchedTask *s, void *viewer_, void *arg)
+SchedDefineTask1(RENDERING_TASK, rendering_task);
+
+static int
+rendering_task(SchedTask* smanager, void* rbuf, void* wbuf)
 {
 
-
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->run_loop(task_next);
-    psx_sync_n();
-}
+  Viewer* viewer = (Viewer*)smanager->get_param(0);
+  HTaskPtr task_next = smanager->create_task(RUN_LOOP_TASK, 0, 0, 0, 0); 
+  task_next->set_param(0, (void*)viewer);
+  viewer->run_draw(task_next);
 
-static void 
-post2runDraw(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->run_draw(task_next);
+  return 0;
 
 }
 
@@ -393,7 +375,7 @@
 {
     common_draw(task_next);
 
-    task_next->set_post(post2runLoop, (void*)this, (void*)pixels); // set_post(function(this->run_loop()), NULL)
+   
     task_next->spawn();
     // TASK_DRAW_SPAN が全て終わったら DUMMY_TASK が Viewer::run_loop() を呼ぶ    
 
@@ -401,47 +383,6 @@
 }
 
 
-static void
-post2speRendering(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->spe_rendering(task_next);
-}
-
-void 
-Viewer::spe_rendering(HTaskPtr task_next)
-{
-    common_rendering(task_next, sgroot);
-
-    this->draw_dummy->wait_for(task_next);
-    task_next->set_post(post2speDraw, (void*)this, 0);
-    task_next->spawn();
-
-}
-
-static void 
-post2speDraw(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->spe_draw(task_next);
-}
-
-void
-Viewer::spe_draw(HTaskPtr task_next)
-{
-    common_draw(task_next);
-    
-    this->draw_dummy->wait_for(task_next);
-    task_next->spawn();
-    this->draw_dummy->spawn();
-
-    frames++;
-}
-
-
-
 void
 coord_allocate(int &cur_point, float *coord_pack, int spe_num,
 	       int alloc_size, HTaskPtr alloc_wait, TaskManager *manager)
@@ -665,8 +606,8 @@
                                    sizeof(SpanPack*)*r[spi].spackList_length_align);
         task_create_sp->add_inData(&r[spi].spackList[index_start], sizeof(SpanPack));
 
-        task_next->wait_for(task_create_sp);
         task_create_sp->wait_for(task_create_pp);
+	task_next->wait_for(task_create_sp);
 
 	task_create_sp->set_cpu(SPE_ANY);
 	// task_create_sp->set_cpu(CPU_PPE);
--- a/Renderer/Engine/viewer.h	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Engine/viewer.h	Mon Jan 17 06:15:46 2011 +0900
@@ -100,6 +100,7 @@
     void clean_pixels() {}
 
     void run_init(TaskManager *manager, Application *app);
+    bool main_exec(HTaskPtr task_next);
     void run_loop(HTaskPtr task_next);
     void run_draw(HTaskPtr task_next);
     virtual void run_finish();
@@ -109,8 +110,6 @@
     void common_draw(HTaskPtr task_next);
     void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot);
 
-    void spe_rendering(HTaskPtr task_next);
-    void spe_draw(HTaskPtr task_next);
     //  void exchange_sgroot(TaskManager *manager);
 
     HTaskPtr update_task_create(void *data, int size, 
--- a/Renderer/Test/create_task.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Test/create_task.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -61,8 +61,8 @@
     float scale[] = {1,1,1};
 
     // get matrix
-    get_matrix(node->matrix, node->angle, node->xyz, scale, sgroot->camera->matrix);
-    get_matrix(node->real_matrix, node->angle, node->xyz, scale, sgroot->camera->real_matrix);
+    get_matrix(node->matrix, node->angle, node->xyz, sgroot->camera->matrix);
+    get_matrix(node->real_matrix, node->angle, node->xyz, sgroot->camera->real_matrix);
 
     sgroot->setSceneData(node);
 
--- a/Renderer/Test/property_chain.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Test/property_chain.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -105,11 +105,11 @@
 	if (p->have_parent) {
 	    SceneGraphPtr parent = (SceneGraphPtr)update_property[p->parent_index].node;
 	    parent->addChild(p_node);
-	    get_matrix(p_node->matrix, p_node->angle, p_node->xyz, scale, parent->matrix);
-	    get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, scale, parent->real_matrix);
+	    get_matrix(p_node->matrix, p_node->angle, p_node->xyz, parent->matrix);
+	    get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, parent->real_matrix);
 	} else {
-	  get_matrix(p_node->matrix, p_node->angle, p_node->xyz, scale, camera->matrix);
-	  get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, scale, camera->real_matrix);
+	  get_matrix(p_node->matrix, p_node->angle, p_node->xyz, camera->matrix);
+	  get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, camera->real_matrix);
 	}
     }
 
--- a/Renderer/Test/property_universe.cc	Mon Jan 17 03:23:09 2011 +0900
+++ b/Renderer/Test/property_universe.cc	Mon Jan 17 06:15:46 2011 +0900
@@ -66,11 +66,11 @@
 	if (p->have_parent) {
 	    SceneGraphPtr parent = (SceneGraphPtr)update_property[p->parent_index].node;
 	    parent->addChild(p_node);
-	    get_matrix(p_node->matrix, p_node->angle, p_node->xyz, scale, parent->matrix);
-	    get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, scale, parent->real_matrix);
+	    get_matrix(p_node->matrix, p_node->angle, p_node->xyz, parent->matrix);
+	    get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, parent->real_matrix);
 	} else {
-	  get_matrix(p_node->matrix, p_node->angle, p_node->xyz, scale, camera->matrix);
-	  get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, scale, camera->real_matrix);
+	  get_matrix(p_node->matrix, p_node->angle, p_node->xyz, camera->matrix);
+	  get_matrix(p_node->real_matrix, p_node->angle, p_node->xyz, camera->real_matrix);
 	}
     }
 
--- a/TaskManager/kernel/ppe/HTask.h	Mon Jan 17 03:23:09 2011 +0900
+++ b/TaskManager/kernel/ppe/HTask.h	Mon Jan 17 06:15:46 2011 +0900
@@ -152,8 +152,6 @@
 
 	post_arg1 = NULL;
 	post_arg2 = NULL;
-	from = NULL;
-	param = NULL;
     }
 #define add_param(param) add_param_t((memaddr)(param))
 #define set_param(index,param) set_param_t(index, (memaddr) (param))