changeset 1382:de990f3e0a21 draft

minor changes.
author e095732 <e095732@ie.u-ryukyu.ac.jp>
date Fri, 27 Jan 2012 01:34:21 +0900
parents 3e303369c44b
children fa3d77953998
files Renderer/Engine/Collada.cc
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/Collada.cc	Thu Jan 26 22:30:32 2012 +0900
+++ b/Renderer/Engine/Collada.cc	Fri Jan 27 01:34:21 2012 +0900
@@ -204,16 +204,16 @@
      */
     int tex_id;
     /* ball test */
-    if (sgid_hash.sg_hash_regist(/*filename*/"Ball", tex_id) == -1) {
-      SDL_Surface *texture_image = load_image(filename, image_name);
-	    if (texture_image==0) {
+    if (sgid_hash.sg_hash_regist(filename, tex_id) == -1) {
+        SDL_Surface *texture_image = load_image(filename, image_name);
+	if (texture_image==0) {
 	    printf("Can't load image %s\n",filename);
 	    exit(0);
-	    }
+	}
         sg->texture_info->texture_id = sg->makeTapestries(manager, texture_image, tex_id);
-	    tex_id = sg->texture_info->texture_id;
+	tex_id = sg->texture_info->texture_id;
         if (unlink(image_name)) {
-            printf("unlink error\n");
+	    printf("unlink error\n");
         }
     } else {
         /**
@@ -221,13 +221,13 @@
          */
         sg->texture_info->texture_id = tex_id;
     }
-      // 微妙に思う、自分で書き換えた感想 by gongo
-      sg->texture_info->t_w = list[tex_id].t_w;
-      sg->texture_info->t_h = list[tex_id].t_h;;
-      sg->texture_info->pixels_orig = list[tex_id].pixels_orig;
-      sg->texture_info->pixels = list[tex_id].pixels;
-      sg->texture_info->scale_max = list[tex_id].scale_max;
-      sg->texture_info->texture_image = list[tex_id].texture_image;
+    // 微妙に思う、自分で書き換えた感想 by gongo
+    sg->texture_info->t_w = list[tex_id].t_w;
+    sg->texture_info->t_h = list[tex_id].t_h;;
+    sg->texture_info->pixels_orig = list[tex_id].pixels_orig;
+    sg->texture_info->pixels = list[tex_id].pixels;
+    sg->texture_info->scale_max = list[tex_id].scale_max;
+    sg->texture_info->texture_image = list[tex_id].texture_image;
 }
  
 void decode_float_array(xmlNodePtr cur,LIST_P list){ 
@@ -249,7 +249,7 @@
 
     src->next = NULL;
     addSource(list, src);
-    printf("id:%s count:%d cont:%s\n", id, count, cont);
+    //printf("id:%s count:%d cont:%s\n", id, count, cont);
 }
 
 
@@ -354,7 +354,7 @@
 	pp[i].info.size = tri_size;
     /* default texture peste */
     if (s->images_flag==0) {
-        get_texture_image("/Users/YuSUGIMOTO/Cerium/Renderer/Test/xml_file/blend/images/ball.jpg", sg, (xmlNodePtr)NULL, manager);
+        get_texture_image("../Test/xml_file/blend/images/ball.jpg", sg, (xmlNodePtr)NULL, manager);
     }
 	int k = 0;
 	int m = 0;