Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 27, 2006, 11:39:47 PM (18 years ago)
Author:
bensch
Message:

new_class_id: dynamic loading works completely

try the shell with:
ResourceManger load Texture some-pic-from-data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/resource_manager.cc

    r9845 r9848  
    144144  }
    145145
     146  void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString)
     147  {
     148    std::vector<Resources::Type*>::const_iterator it;
     149    for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it)
     150    {
     151      if (*(*it) == resourceTypeName)
     152      {
     153        (*it)->createFromString(loadString);
     154        /// TODO check if the resource was allocated!!
     155        return ;
     156      }
     157    }
     158    return ;
     159  }
     160
    146161
    147162  void ResourceManager::unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel)
Note: See TracChangeset for help on using the changeset viewer.