Mercurial > hg > Game > Cerium
changeset 1334:55de7223d9a0 draft
minor change collada test file .
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 21 Dec 2011 12:34:15 +0900 |
parents | 6b7151aec7b6 (diff) fab593a9feb1 (current diff) |
children | 8a5f7f54433d |
files | |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Test/collada_test/collada_test.cc Wed Dec 21 04:52:12 2011 +0900 +++ b/Renderer/Test/collada_test/collada_test.cc Wed Dec 21 12:34:15 2011 +0900 @@ -64,6 +64,7 @@ SOURCE_P cur = NULL; int tmplength = 0; int strlength; + for (cur=list->first ;cur!=list->end ;cur=cur->next) { for (strlength=0;id[strlength]==cur->id[strlength];strlength++); if (tmplength < strlength) { @@ -71,7 +72,6 @@ src = cur; } } - if ( src == NULL) { printf("not match list\n"); } @@ -111,7 +111,6 @@ int texcoord_count; float *vcount; - float *pcount; SOURCE_P normal_float; SOURCE_P vertex_float; @@ -273,10 +272,10 @@ vcsum += s->vcount[i]; } - s->pcount = (float*)malloc(sizeof(float)*vcsum); + float *pcount = (float*)malloc(sizeof(float)*vcsum); for (int i=0; pcont != NULL; i++) { - pcont = pickup_float(pcont, s->pcount+i); + pcont = pickup_float(pcont, pcount+i); } int vertexp[vcsum]; @@ -291,10 +290,10 @@ /* p separate vertex position and nomal position. */ for (int i=0, j=0; i < s->polylist_count; i+=2,j++) { - vertexp[j] = (int)s->pcount[i]; - normal_table[j] = s->normal_float->u.array[(int)s->pcount[i+1]]; + vertexp[j] = (int)pcount[i]; + normal_table[j] = s->normal_float->u.array[(int)pcount[i+1]]; if (s->texcoord_offset == 2) { - texcoord_table[j] = s->texcoord_float->u.array[(int)s->pcount[i+2]]; + texcoord_table[j] = s->texcoord_float->u.array[(int)pcount[i+2]]; i++; } } @@ -312,7 +311,9 @@ } /*TEST*/ for (int i=0; i<vcsum; i++) { - //printf("normal_table= %f\n", normal_table[i]); + printf("pcount= %f\n", pcount[i]); + printf("normal_table= %f\n", normal_table[i]); + printf("texcoord_count= %f\n", texcoord_table[i]); printf("vertexp= %d\n", vertexp[i]); }