Changeset 8432 in orxonox.OLD for branches/bsp_model/src
- Timestamp:
- Jun 15, 2006, 12:55:56 AM (18 years ago)
- Location:
- branches/bsp_model/src/lib/graphics/importer/md3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc
r8428 r8432 207 207 { 208 208 PRINTF(0)("Reading Tags\n"); 209 // this->boneFrames = new MD3BoneFrame*[this->header->boneFrameNum];210 209 211 210 for( int i = 0; i < this->header->boneFrameNum; i++) … … 233 232 PRINTF(0)("Reading Mesh Data\n"); 234 233 235 int localFileOffset = 0; //!< local file offset234 fileOffset = 0; 236 235 237 236 this->meshes = new MD3Mesh*[this->header->meshNum]; … … 241 240 this->meshes[i] = new MD3Mesh(); 242 241 243 localFileOffset = 0;242 int localFileOffset = 0; 244 243 bool bTriangles, bTexVecs, bVertices, bTextures; //!< the parts that have been read so far 245 244 … … 249 248 this->meshes[i]->header = md; 250 249 localFileOffset += sizeof(MD3MeshHeader); 251 252 if( unlikely(this->meshes[i]->header->id != MD3_IDENT))253 {254 PRINTF(1)("Wrong MD3 mesh file tag, file %s could be corrupt\n", this->filename.c_str());255 return false;256 }257 250 258 251 PRINTF(0)("MD3 Mesh Header debug section\n"); … … 268 261 printf("vertexStart: %i\n", md->vertexStart); 269 262 printf("fileSize: %i\n", md->meshSize); 263 264 if( unlikely(this->meshes[i]->header->id != MD3_IDENT)) 265 { 266 PRINTF(1)("Wrong MD3 mesh file tag, file %s could be corrupt\n", this->filename.c_str()); 267 return false; 268 } 270 269 271 270 // check which parts to be loaded … … 300 299 } 301 300 } 301 fileOffset += localFileOffset; 302 PRINTF(0)("finished reading mesh %i, got %i of %i byes\n", i, localFileOffset, md->meshSize); 302 303 } 303 return localFileOffset;304 return fileOffset; 304 305 } 305 306 -
branches/bsp_model/src/lib/graphics/importer/md3/md3_tag.h
r8372 r8432 18 18 typedef struct MD3TagData 19 19 { 20 sVec3D position; 21 float matrix[3][3]; 20 char name[64]; //!< name of the tag 21 sVec3D position; //!< position of the tag 22 float matrix[3][3]; //!< matrix of the rotation 22 23 }; 23 24
Note: See TracChangeset
for help on using the changeset viewer.