Changeset 4141 in orxonox.OLD for orxonox/branches/md2_loader/src
- Timestamp:
- May 10, 2005, 11:43:27 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4140 r4141 112 112 bool MD2Loader::importMD2(t3DModel *pModel, char *fileName, char *textureName) 113 113 { 114 115 pModel->animationList = new tList<tAnimationInfo>(); 116 pModel->objectList = new tList<t3DObject>(); 117 pModel->materialList = new tList<tMaterialInfo>(); 118 114 119 this->pFile = fopen(fileName, "rb"); 115 120 if( unlikely(!pFile)) … … 198 203 string strLastName = ""; 199 204 200 /* the animation parse process looks a little bit w eired: this is because there are no205 /* the animation parse process looks a little bit wired: this is because there are no 201 206 fix bounds for the animation lengths, so the frames are destingushed using their names 202 207 which is normaly composed of <animationname><number> … … 207 212 string strName = this->pFrames[i].strName; 208 213 int frameNum = 0; 209 214 215 /* erease the frame number from the frame-name */ 210 216 for(unsigned int j = 0; j < strName.length(); j++) 211 217 { … … 218 224 } 219 225 226 printf("current: %s, last: %s\n", strName.c_str(), strLastName.c_str()); 227 220 228 /* animations are sorted through their names: this is how its been done: */ 221 if( strName != strLastName || i == pModel->numOfObjects - 1)222 { 223 if( strLastName != "")229 if( strName != strLastName || i == pModel->numOfObjects - 1) 230 { 231 if( strLastName != "") 224 232 { 233 printf("YYYYYYYYYYEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLDDDDDDDDD-2!\n"); 225 234 strcpy(animationInfo->strName, strLastName.c_str()); 226 235 animationInfo->endFrame = i;
Note: See TracChangeset
for help on using the changeset viewer.