changeset 1159:42f5958ab74e draft

not yet....
author Yutaka_Kinjyo
date Tue, 26 Apr 2011 14:58:58 +0900
parents bfc2c6628fef
children 5664473b4dba
files Renderer/Engine/task/DrawSpan.cc Renderer/Engine/viewer.cc TaskManager/Makefile.def
diffstat 3 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/task/DrawSpan.cc	Tue Apr 26 11:46:55 2011 +0900
+++ b/Renderer/Engine/task/DrawSpan.cc	Tue Apr 26 14:58:58 2011 +0900
@@ -39,6 +39,7 @@
     int tex_localy;
     TilePtr tile;
     float world_z;
+    int x;
     int display; //他のオブジェクトの裏にいて表示するかしないかのflag
 
 } DrawParam, *DrawParamPtr;
@@ -328,7 +329,7 @@
 {
 
     int cur = 0;
-    DrawParamPtr param = (DrawParamPtr)smanager->allocate(sizeof(DrawParam)*2);
+    DrawParam param[2];
 
     int rangex = endx - startx + 1;
 
@@ -338,7 +339,7 @@
     int localy = getLocalY(span->y-1);
 
     int ret = je+1;
-    int index = 0;
+    int index = 1;
 
     getDrawParam(smanager, g, span, localy, startx, endx, index, je, &param[cur]);
 
@@ -355,24 +356,23 @@
             updateBuffer(g, param[cur].tex_z, rangex, param[cur].localx, localy,
                          param[cur].tex_localx, param[cur].tex_localy,
                          span->normal_x, span->normal_y, span->normal_z, param[cur].tile, 
-                         span->x+j+1, span->y, param[cur].world_z, smanager);
+                         param[cur].x, span->y, param[cur].world_z, smanager);
         }
 
         cur ^= 1;
 
     }
-
+/*
     if (param[cur].display) {
         smanager->wait_segment(param[cur].tile);
 
         updateBuffer(g, param[cur].tex_z, rangex, param[cur].localx, localy,
                      param[cur].tex_localx, param[cur].tex_localy,
                      span->normal_x, span->normal_y, span->normal_z, param[cur].tile, 
-                     span->x+js, span->y, param[cur].world_z, smanager);
+                     param[cur].x, span->y, param[cur].world_z, smanager);
 
     }
-
-    free(param);
+*/
     
     return ret;
 }
@@ -401,11 +401,12 @@
 
     //spanを右から左に見ていくうちに、zが下がるのか、上がっていくのか。
     float z_inclination = (zpos1 - zpos2) / x_len;
-    param->world_z = (z_inclination*index);
-
+    param->world_z = zpos2 + (z_inclination*index);
+    param->x = x + j;
     param->tex_z = zpos1*(x_len-1-j)/(x_len-1) + zpos2*j/(x_len-1);
     param->localx = getLocalX(x-1+j);
 
+
     if (param->tex_z < g->zRow[param->localx + (rangex*localy)]) {
 
         float tex_x, tex_y; 
@@ -430,9 +431,9 @@
         param->tex_localx = tex_xpos %  TEXTURE_SPLIT_PIXEL;
         param->tex_localy = tex_xpos %  TEXTURE_SPLIT_PIXEL;
 
-        param->display = 1; // z軸の一番まえだから表示されるよ        
+        param->tile = smanager->get_segment(tex_addr, g->tileList);
 
-        param->tile = smanager->get_segment(tex_addr, g->tileList);
+        param->display = 1; // z軸の一番まえだから表示されるよ        
 
         return 1; //
     }
@@ -599,11 +600,11 @@
             span = &spack->span[t];
 
 	    if (span->length_x != 1) {
-	      drawLine1(
+                drawLine1(
 			smanager, g,
 			span, rangex_start, rangex_end, tl_tag[tl_tag_flg1]);
 	    } else {
-	      drawDot1(
+                drawDot1(
 		       smanager, g,
 		       span, rangex_start, rangex_end, tl_tag[tl_tag_flg1]);
             }
--- a/Renderer/Engine/viewer.cc	Tue Apr 26 11:46:55 2011 +0900
+++ b/Renderer/Engine/viewer.cc	Tue Apr 26 14:58:58 2011 +0900
@@ -598,8 +598,6 @@
 
 #ifdef USE_TASKARRAY
 
-	// mem_flag は spe 側で黒い部分を 0 で埋めるフラグ
-
         int array_task_num = (this->width + split_screen_w - 1) / split_screen_w;
         HTaskPtr task_draw_array = manager->create_task_array(DrawSpan, array_task_num, 6, 1, rangey);
         Task *task_draw = 0;
--- a/TaskManager/Makefile.def	Tue Apr 26 11:46:55 2011 +0900
+++ b/TaskManager/Makefile.def	Tue Apr 26 14:58:58 2011 +0900
@@ -29,7 +29,7 @@
 
 ABIBIT = 64
 
-OPT = -O9 -DUSE_CACHE -DMAIL_QUEUE -DNOT_CHECK #-DTASK_LIST_MAIL #-DEARLY_TOUCH 
+OPT = -g -DMAIL_QUEUE -DNOT_CHECK #-DTASK_LIST_MAIL #-DEARLY_TOUCH -DUSE_CACHE 
 # 
 
 # -g -DTASK_LIST_MAIL -O9