UFO:Alien Invasion
Development => Coding => Topic started by: lfloden on December 23, 2006, 04:26:41 am
-
Get this error
[Linker error] undefined reference to `ConvertBSPToASE'
Obviously its missing.
-
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.
-
I still get the same error when trying to compile it.
-
the code you are diving into is not finished atm
but ufo2map should even compile with those warnings (though they are fixed in latest trunk version)
-
But I still get those errors when running compile.pl. And it is on more than just africa and bridge ones now, just about all of them cause it. I did download the map pack and installed it to take care of that problem though.