Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2006, 10:17:56 AM (18 years ago)
Author:
bensch
Message:

more nice comments, and also updated the KeepLevel loading (if you want to load a Resource to a KeepLevel just append it at loadtime:
eg.:
Texture tex = ResourceTexture(orxonox.png, GL_TEXTURE_2D, GameEnd);
where GameEnd is the KeepLevel as defined in orxonox.cc→initResources()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.cc

    r9847 r9854  
    66
    77
    8 ResourceMD2::ResourceMD2(const std::string& modelName, const std::string& skinName, float scale)
     8ResourceMD2::ResourceMD2(const std::string& modelName, const std::string& skinName, float scale, const Resources::KeepLevel& keepLevel)
    99    : Resource(&ResourceMD2::type)
    1010{
     
    2222    //std::string skinFileName = this->Resource::locateFile(skinName);
    2323    this->MD2Model::load(modelFileName, skinName, scale);
    24     this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), Resources::KeepLevel(0), this->MD2Model::dataPointer()));
     24    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));
    2525  }
    2626
    2727}
    2828
    29 ResourceMD2 ResourceMD2::createFromString(const std::string& loadString)
     29ResourceMD2 ResourceMD2::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel)
    3030{
    3131  SubString loadValues(loadString, ',');
     
    4040    scale = MultiType(loadValues[2]).getFloat();
    4141
    42   return ResourceMD2(modelName, skinName, scale);
     42  return ResourceMD2(modelName, skinName, scale, keepLevel);
    4343}
    4444
Note: See TracChangeset for help on using the changeset viewer.