diff ps2util.c @ 98:1033fece71ce

text_vector
author e085768
date Thu, 02 Jun 2011 17:26:21 +0900
parents afddacdf30dd
children
line wrap: on
line diff
--- a/ps2util.c	Thu Jun 02 16:15:00 2011 +0900
+++ b/ps2util.c	Thu Jun 02 17:26:21 2011 +0900
@@ -51,8 +51,10 @@
 */
 TEXTURE* read_png_file(char *texname)
 {
+  printf("trace\n");  
   //とりあえず戻り値を返してエラーをどうにか
   TEXTURE* tex;
+  
   return tex;
 }
 
@@ -137,7 +139,8 @@
   result[0] = v0[0] + v1[0];
   result[1] = v0[1] + v1[1];
   result[2] = v0[2] + v1[2];
-  result[3] = v0[3] + v1[3];
+  //  result[3] = v0[3] + v1[3];
+  result[3] = v0[3];
 }
 
 // 外積
@@ -197,7 +200,7 @@
   result[0] = v0[0] - v1[0];
   result[1] = v0[1] - v1[1];
   result[2] = v0[2] - v1[2];
-  result[3] = v0[3] - v1[3];
+  result[3] = v0[3];// - v1[3];
 }
 
 
@@ -205,7 +208,7 @@
 void ps2_vu0_normalize(FVECTOR result, FVECTOR v)
 {
   // 大きさで割ってるだけって
-  float d;// = fsqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+  float d = sqrtf(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
   result[0] = v[0] / d;
   result[1] = v[1] / d;
   result[2] = v[2] / d;