Mercurial > hg > Game > Cerium
changeset 1378:38c7e8b47c4b draft
minor changes.
author | e095732 <e095732@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 Jan 2012 20:33:22 +0900 |
parents | 22794a7f26a3 |
children | 13065ad17328 |
files | Renderer/Engine/Collada.cc |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/Collada.cc Thu Jan 26 19:06:33 2012 +0900 +++ b/Renderer/Engine/Collada.cc Thu Jan 26 20:33:22 2012 +0900 @@ -180,9 +180,6 @@ int tmplength = 0; int strlength; - if (src == NULL){ - fprintf(stderr,"not match"); - } for (cur=list->first ;cur!=list->end ;cur=cur->next) { for (strlength=0;id[strlength]==cur->id[strlength];strlength++); if (tmplength < strlength) { @@ -190,6 +187,9 @@ src = cur; } } + if (src == NULL){ + fprintf(stderr,"not match"); + } return src; } @@ -204,8 +204,8 @@ */ int tex_id; /* ball test */ - if (sgid_hash.sg_hash_regist(filename, tex_id) == -1) { - SDL_Surface *texture_image = load_image(filename, image_name); + if (sgid_hash.sg_hash_regist(/*filename*/"Ball", 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); @@ -349,7 +349,7 @@ pp[i].info.size = tri_size; /* default texture peste */ if (s->images_flag==0) { - get_texture_image("default.jpg", sg, (xmlNodePtr)NULL, manager); + get_texture_image("/Users/YuSUGIMOTO/Cerium/Renderer/Test/xml_file/blend/images/ball.jpg", sg, (xmlNodePtr)NULL, manager); } int k = 0; int m = 0; @@ -410,8 +410,8 @@ xml_walk(xmlNodePtr cur, struct collada_state *s, LIST_P list,SceneGraphPtr sg, SceneGraphRoot *root) { int in_polylist=0; - printf("name = %s, child:%s\n", (char *)cur->name, (char *)cur->children); - printf("s->polylist = %d\n",s->polylist); + //printf("name = %s, child:%s\n", (char *)cur->name, (char *)cur->children); + //printf("s->polylist = %d\n",s->polylist); if (!xmlStrcmp(cur->name, (xmlChar*)"polylist")) { s->polylist_count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count")); s->polylist=1; @@ -419,7 +419,8 @@ } else if (!xmlStrcmp(cur->name, (xmlChar*)"vertices")) { s->vertices_id = xmlGetProp(cur, (xmlChar*)"id"); } else if (!xmlStrcmp(cur->name, (xmlChar*)"library_images")) { - s->library_images=1;// library_images is wrote at texture image name. only use one image file + s->library_images=1; + //library_images is wrote at texture image name. only use one image file } else if (s->library_images && !xmlStrcmp(cur->name, (xmlChar*)"init_from")) { s->tex_picname = (char*)xmlGetProp(cur, (xmlChar*)"init_from"); get_texture_image(s->tex_picname, sg, cur , root->tmanager);