bool CVectorModel::LoadModel(char *Filename)
{
FILE *File = fopen(Filename, "r");
int Color = 0;
WriteError("Attempting to load model...");
if (!File)
{
WriteError("Unable to open Model");
return false;
}
Lines = 0;
WriteError("Loading raw data...");
while (fscanf(File, "(%f, %f, %f)<img src="sad.gif" width=15 height=15 align=middle>%f, %f, %f)=%d", Model[Lines].Start.x, Model[Lines].Start.y, Model[Lines].Start.z, Model[Lines].End.x, Model[Lines].End.y, Model[Lines].End.z, Color) && Lines < MAX_MODEL_LINES)
{
Model[Lines].Color = (unsigned short)Color; // set the color as unsigned short for 16bpp surface
++Lines;
WriteError("Vector Line loaded...");
}
WriteError("Model load successful");
return true;
}
I don''t know what''s wrong... It looks OK to me. Please pardon the widness of my post that the source will probably cause
--------------------You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
Visit the ROAD Programming Website for more programming help.