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/util/loading/resource_manager.cc

    r9853 r9854  
    3535  */
    3636  ResourceManager::ResourceManager ()
     37  : _defaultKeepLevel(0)
    3738  {
    3839    this->registerObject(this, ResourceManager::_objectList);
     
    4748  ResourceManager::~ResourceManager ()
    4849  {
    49     // deleting the Resources-List
    50     //this->unloadAllByPriority(RP_GAME);
    51 
    52     //   if (!this->resourceList.empty())
    53     //     PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());
    54 
    5550    ResourceManager::_singletonRef = NULL;
    5651  }
     
    195190   * @param loadString the loadString to load in the Type.
    196191   */
    197   void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString)
     192  void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString, const KeepLevel& keepLevel)
    198193  {
    199194    std::vector<Resources::Type*>::const_iterator it;
     
    202197      if (*(*it) == resourceTypeName)
    203198      {
    204         (*it)->createFromString(loadString);
     199        (*it)->createFromString(loadString, keepLevel);
    205200        /// TODO check if the resource was allocated!!
    206201        return ;
Note: See TracChangeset for help on using the changeset viewer.