changeset 183:54787f182881

fix
author gongo@localhost.localdomain
date Tue, 06 Jan 2009 15:30:34 +0900
parents df3cfc04e796
children 5c9dbd54cd51
files TaskManager/Test/test_render/Makefile.def TaskManager/Test/test_render/spe/DrawSpan.cpp TaskManager/Test/test_render/task/CreateSpan.cpp TaskManager/Test/test_render/task/DrawSpan.cpp
diffstat 4 files changed, 11 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Makefile.def	Tue Dec 23 16:27:07 2008 +0900
+++ b/TaskManager/Test/test_render/Makefile.def	Tue Jan 06 15:30:34 2009 +0900
@@ -3,10 +3,10 @@
 # include/library path
 # ex: macosx
 #CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium
-CERIUM = /Users/gongo/Source/hg/Cerium
+#CERIUM = /Users/gongo/Source/hg/Cerium
 
 # ex: linux/ps3
-#CERIUM = /home/gongo/Cerium
+CERIUM = /home/gongo/Cerium
 #CERIUM = /Users/tkaito/hg/Game/Cerium
 
 #CERIUM = ../../..
--- a/TaskManager/Test/test_render/spe/DrawSpan.cpp	Tue Dec 23 16:27:07 2008 +0900
+++ b/TaskManager/Test/test_render/spe/DrawSpan.cpp	Tue Jan 06 15:30:34 2009 +0900
@@ -162,7 +162,7 @@
 	    next_spack = NULL;
 	}
 
-	for (int t = 0; t < spack->info.size; t++) {	  
+	for (int t = spack->info.start; t < spack->info.size; t++) {
 	    span = &spack->span[t];
 
 	    Uint32 rgb = 0x00ff00;
--- a/TaskManager/Test/test_render/task/CreateSpan.cpp	Tue Dec 23 16:27:07 2008 +0900
+++ b/TaskManager/Test/test_render/task/CreateSpan.cpp	Tue Jan 06 15:30:34 2009 +0900
@@ -128,7 +128,8 @@
 
 
 /**
- * span の width,height と texture の width,height を比べて
+ * span の width と Triangle の height に対して、
+ * texture の width,height をそれぞれ比べて
  * span を描画する際に使う texture の比率を求める
  *
  * @param[in] width      Width of span
@@ -384,7 +385,7 @@
 			     (int)(span->tex_width*tex_x_len),
 			     (int)(span->tex_height*tex_y_len), tex_scale_max);
 
-	//scale = (4 > tex_scale_max) ? tex_scale_max : 4;
+	//scale = (8 > tex_scale_max) ? tex_scale_max : 8;
 	
 	uint32 *tapestry = getTapestry(tex_width, tex_height, scale, tex_addr);
 
@@ -431,40 +432,11 @@
 
 	for (int i = 0; i < pp->info.size; i++) {
 	    triPack = &pp->tri[i];
-	    
-#if 0
+
+	    // 参照渡しだからレジスタに乗らないでほげほげ〜で
+	    // 最適化でいうと微妙?
 	    make_vertex(triPack, &vMin, &vMid, &vMax);
-#else
-	    if (triPack->ver1.y <= triPack->ver2.y) {
-		if (triPack->ver2.y <= triPack->ver3.y) {
-		    vMin = &triPack->ver1;
-		    vMid = &triPack->ver2;
-		    vMax = &triPack->ver3;
-		} else if (triPack->ver3.y <= triPack->ver1.y) {
-		    vMin = &triPack->ver3;
-		    vMid = &triPack->ver1;
-		    vMax = &triPack->ver2;
-		} else {
-		    vMin = &triPack->ver1;
-		    vMid = &triPack->ver3;
-		    vMax = &triPack->ver2;
-		}
-	    } else {
-		if (triPack->ver1.y <= triPack->ver3.y) {
-		    vMin = &triPack->ver2;
-		    vMid = &triPack->ver1;
-		    vMax = &triPack->ver3;
-		} else if (triPack->ver3.y <= triPack->ver2.y) {
-		    vMin = &triPack->ver3;
-		    vMid = &triPack->ver2;
-		    vMax = &triPack->ver1;
-		} else {
-		    vMin = &triPack->ver2;
-		    vMid = &triPack->ver3;
-		    vMax = &triPack->ver1;
-		}
-	    }
-#endif
+
 	    make_vMid10(vMid10, vMin, vMid, vMax);
 
 	    /**
--- a/TaskManager/Test/test_render/task/DrawSpan.cpp	Tue Dec 23 16:27:07 2008 +0900
+++ b/TaskManager/Test/test_render/task/DrawSpan.cpp	Tue Jan 06 15:30:34 2009 +0900
@@ -162,7 +162,7 @@
 	    next_spack = NULL;
 	}
 
-	for (int t = 0; t < spack->info.size; t++) {	  
+	for (int t = spack->info.start; t < spack->info.size; t++) {
 	    span = &spack->span[t];
 
 	    Uint32 rgb = 0x00ff00;