Changeset 8433 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer/md3
- Timestamp:
- Jun 15, 2006, 12:59:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc
r8432 r8433 315 315 // create the memomry to save the triangles 316 316 this->meshes[mesh]->triangles = new MD3Triangle[this->meshes[mesh]->header->triangleNum]; 317 fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle) , pFile);317 fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle) * this->meshes[mesh]->header->triangleNum, pFile); 318 318 319 319 return this->meshes[mesh]->header->triangleNum * sizeof(MD3Triangle); … … 332 332 333 333 MD3Texture* tex = new MD3Texture[this->meshes[mesh]->header->textureNum]; 334 fread(tex, 1, sizeof(MD3Texture) , pFile);334 fread(tex, 1, sizeof(MD3Texture) * this->meshes[mesh]->header->textureNum, pFile); 335 335 336 336 for( int i = 0; i < this->meshes[mesh]->header->textureNum; i++) { … … 352 352 353 353 this->meshes[mesh]->texVecs = new MD3TexVecs[this->meshes[mesh]->header->vertexNum]; 354 fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs) , pFile);354 fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs) * this->meshes[mesh]->header->vertexNum, pFile); 355 355 356 356 return this->meshes[mesh]->header->vertexNum * sizeof(MD3TexVecs); … … 371 371 // read out the compressed data 372 372 MD3VertexCompressed* vc = new MD3VertexCompressed[this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum]; 373 fread(vc, 1, sizeof(MD3VertexCompressed) , pFile);373 fread(vc, 1, sizeof(MD3VertexCompressed) * this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum, pFile); 374 374 375 375 int index;
Note: See TracChangeset
for help on using the changeset viewer.