Now I get this when trying to compile it.
../../src/tools/ufo2map/convert_ase.c: In function `ConvertSurface':
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `i'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `v'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `face'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `a'
../../src/tools/ufo2map/convert_ase.c:48: warning: unused variable `c'
../../src/tools/ufo2map/convert_ase.c:49: warning: unused variable `normal'
../../src/tools/ufo2map/convert_ase.c: At top level:
../../src/tools/ufo2map/convert_ase.c:220: warning: 'ConvertShader' defined but not used
It causes an error so it won't compile. I can comment out the i,v,face,a,c line and the normal line, it will then compile. But it doesn't work right when then trying to convert the maps. I was looking through the code
fprintf(f, "\t\t*MESH_NORMALS\t{\r\n");
for (i = 0; i < ds->numIndexes; i += 3) {
face = (i / 3);
a = bspDrawIndexes[i + ds->firstIndex];
b = bspDrawIndexes[i + ds->firstIndex + 1];
c = bspDrawIndexes[i + ds->firstIndex + 2];
VectorCopy(bspDrawVerts[ a ].normal, normal);
VectorAdd(normal, bspDrawVerts[ b ].normal, normal);
VectorAdd(normal, bspDrawVerts[ c ].normal, normal);
if( VectorNormalize( normal, normal))
fprintf(f, "\t\t\t*MESH_FACENORMAL\t%d\t%f\t%f\t%f\r\n", face, normal[ 0 ], normal[ 1 ], normal[ 2 ] );
}
for (i = 0; i < ds->numVerts; i++) {
v = i + ds->firstVert;
dv = &bspDrawVerts[ v ];
fprintf(f, "\t\t\t*MESH_VERTEXNORMAL\t%d\t%f\t%f\t%f\r\n", i, dv->normal[ 0 ], dv->normal[ 1 ], dv->normal[ 2 ] );
}
fprintf(f, "\t\t}\r\n" );
And it almost appears that normal should be an array. But it isn't declared that way. I'll admit with all the programming classes I'm taking things have gotten a bit confusing between the different ones. I'm going to have to got the C++ books out and browse through them.