Game Development Reference
In-Depth Information
if (line.Find("MESH_NUMVERTEX")!=-1){
if (ParseTokens(line,tokens,5)<2) goto meshabort;
obj->numpoints=atoi(tokens[1].name);
obj->pts=new POINT3D[obj->numpoints];
if (!obj->pts) return FALSE;
continue;
}
if (line.Find("MESH_VERTEX_LIST")!=-1){
if (!ReadVertexList(file,obj)) goto meshabort;
continue;
}
if (line.Find("MESH_NUMFACES")!=-1){
if (ParseTokens(line,tokens,5)<2) goto meshabort;
obj->numpolygons=atoi(tokens[1].name);
obj->plys=new POLYGON[obj->numpolygons];
if (!obj->plys) return FALSE;
continue;
}
if (line.Find("MESH_FACE_LIST")!=-1){
if (!ReadFaceList(file,obj)) goto meshabort;
continue;
}
if (line.Find("MESH_NUMTVERTEX")!=-1){
if (ParseTokens(line,tokens,2)<2) goto meshabort;
numtverts = atoi(tokens[1].name);
if (numtverts){
tvert = new TEXVEC[numtverts];
if (!tvert) return FALSE;
continue;
}
}
if (line.Find("MESH_TVERTLIST")!=-1){
if (!ReadTextureVertices(file, tvert, numtverts)) goto
meshabort;
continue;
}
if (line.Find("MESH_NUMTVFACES")!=-1){
if (ParseTokens(line,tokens,2)<2) goto meshabort;
numtvfaces = atoi(tokens[1].name);
}
if (line.Find("MESH_TFACELIST")!=-1){
if (!ReadTFaceList(file, obj, tvert, numtvfaces)) goto
meshabort;
continue;
Search Nedrilad ::




Custom Search