Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4141 in orxonox.OLD


Ignore:
Timestamp:
May 10, 2005, 11:43:27 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: found one segfault: init problem, continiued with another

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc

    r4140 r4141  
    112112bool MD2Loader::importMD2(t3DModel *pModel, char *fileName, char *textureName)
    113113{
     114
     115  pModel->animationList = new tList<tAnimationInfo>();
     116  pModel->objectList = new tList<t3DObject>();
     117  pModel->materialList = new tList<tMaterialInfo>();
     118
    114119  this->pFile = fopen(fileName, "rb");
    115120  if( unlikely(!pFile))
     
    198203  string strLastName = "";
    199204
    200   /* the animation parse process looks a little bit weired: this is because there are no
     205  /* the animation parse process looks a little bit wired: this is because there are no
    201206     fix bounds for the animation lengths, so the frames are destingushed using their names
    202207     which is normaly composed of <animationname><number>
     
    207212      string strName  = this->pFrames[i].strName;
    208213      int frameNum = 0;
    209                
     214       
     215      /* erease the frame number from the frame-name */
    210216      for(unsigned int j = 0; j < strName.length(); j++)
    211217        {
     
    218224        }
    219225
     226      printf("current: %s, last: %s\n", strName.c_str(), strLastName.c_str());
     227
    220228      /* 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 != "")
    224232            {
     233      printf("YYYYYYYYYYEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLDDDDDDDDD-2!\n");
    225234              strcpy(animationInfo->strName, strLastName.c_str());
    226235              animationInfo->endFrame = i;
Note: See TracChangeset for help on using the changeset viewer.