Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4229 in orxonox.OLD for orxonox/branches/md2_loader/src


Ignore:
Timestamp:
May 19, 2005, 11:06:17 PM (20 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: fixed some compiler errors, added the header to the model

File:
1 edited

Legend:

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

    r4227 r4229  
    532532{
    533533  FILE *pFile;                            //file stream
    534   //tMd2Header header;
    535534  char* buffer;                           //buffer for frame data
    536535  sFrame* frame;                          //temp frame
     
    544543      return false;
    545544    }
    546   fread(header, 1, sizeof(tMd2Header), pFile);
     545  fread(this->header, 1, sizeof(tMd2Header), pFile);
    547546  /* check for the header version: make sure its a md2 file :) */
    548   if( unlikely(header.version != MD2_VERSION) && unlikely(header.ident != MD2_IDENT))
     547  if( unlikely(this->header->version != MD2_VERSION) && unlikely(this->header->ident != MD2_IDENT))
    549548    {
    550549      PRINTF(1)("Couldn't load file %s: invalid file format: stop loading\n", fileName);
     
    796795{
    797796  PRINT(0)("==========================| MD2Model2::debug() |===");
    798   PRINT(0)("= Model Name: %s", this->);
    799   PRINT(0)(" Position:      %f/%f/%f\n", this->lightPosition[0], this->lightPosition[1], this->lightPosition[2]);
    800   PRINT(0)(" DiffuseColor:  %f/%f/%f\n", this->diffuseColor[0], this->diffuseColor[1], this->diffuseColor[2]);
    801   PRINT(0)(" SpecularColor: %f/%f/%f\n", this->specularColor[0], this->specularColor[1], this->specularColor[2]);
    802   PRINT(0)(" Attenuation: constant=%f linear=%f quadratic=%f\n", this->constantAttenuation, this->linearAttenuation, this->quadraticAttenuation);
    803 }
    804 
     797  //PRINT(0)("= Model Name: %s", this->header->);
     798  PRINT(0)("= ");
     799}
     800/*
    805801
    806802  int ident;                            //!< This is used to identify the file
     
    824820   int offsetGlCommands;                //!< The offset in the file for the gl commands data
    825821   int offsetEnd;                       //!< The end of the file offset
     822*/
Note: See TracChangeset for help on using the changeset viewer.