Changeset 9793 in orxonox.OLD for branches/new_class_id
- Timestamp:
- Sep 23, 2006, 3:48:03 PM (18 years ago)
- Location:
- branches/new_class_id/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
r9792 r9793 1 2 1 3 2 #include "resource_texture.h" -
branches/new_class_id/src/lib/util/loading/new_resource_manager.cc
r9792 r9793 64 64 type->setID(this->_resourceTypes.size()); 65 65 this->_resourceTypes.push_back(type); 66 PRINTF(5)("ResourceType '%s' with ID %d added\n", type->storedClassName().c_str(), type->id()); 66 67 } 67 68 } … … 113 114 std::vector<Resources::Type*>::const_iterator it; 114 115 for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it) 115 PRINT(0)("ResourceType '%s'\n", (*it)->storedClassName().c_str());116 (*it)->debug(); 116 117 117 118 PRINT(0)("==================================RM==\n"); -
branches/new_class_id/src/lib/util/loading/resource.cc
r9792 r9793 49 49 return (NewResourceManager::getInstance()->mainGlobalPath() + File(fileName)).name(); 50 50 51 printf("LOCATED %s\n", locateFileInSubDir(Directory("/home/bensch/svn/orxonox/data/"), fileName).c_str()); 52 51 std::string locatedFile; 52 locatedFile = locateFileInSubDir(Directory("/home/bensch/svn/orxonox/data/"), fileName); 53 if (!locatedFile.empty()) 54 { 55 printf("FILE found %s\n", locatedFile.c_str()); 56 return locatedFile; 57 } 53 58 return std::string("/home/bensch/svn/orxonox/data/") + fileName; 54 59 } … … 129 134 { 130 135 NewResourceManager::getInstance()->registerType(this); 136 printf("%s\n", typeName.c_str()); 131 137 } 132 138 … … 163 169 this->_id = id; 164 170 } 171 172 173 void Resources::Type::debug() const 174 { 175 PRINT(0)(" ResourceType '%s' with ID %d stores %d Resources\n", this->_typeName.c_str(), this->_id, this->_storedResources.size()); 176 PRINT(0)(" Paths:\n"); 177 for (unsigned int i = 0; i < this->_resourcePaths.size(); ++i) 178 PRINT(0)(" %s\n", this->_resourcePaths[i].name().c_str()); 179 PRINT(0)(" Sub-Paths:\n"); 180 for (unsigned int i = 0; i < this->_resourceSubPaths.size(); ++i) 181 PRINT(0)(" %s\n", this->_resourceSubPaths[i].name().c_str()); 182 183 } -
branches/new_class_id/src/lib/util/loading/resource.h
r9792 r9793 62 62 void addResource(Resources::StorePointer* resource); 63 63 64 void debug() const; 65 64 66 private: 65 67 int _id; 66 const std::string &_typeName;68 const std::string _typeName; 67 69 std::vector<Directory> _resourcePaths; 68 70 std::vector<Directory> _resourceSubPaths; -
branches/new_class_id/src/orxonox.cc
r9791 r9793 364 364 delete gui; 365 365 ResourceManager::getInstance()->setDataDir(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, "")); 366 367 366 } 368 367 … … 371 370 NewResourceManager::getInstance()->addResourceSubPath("Texture", "pictures"); 372 371 372 NewResourceManager::getInstance()->debug(); 373 373 // DynamicLoader::loadDyLib("libtest.so"); 374 374 return 0;
Note: See TracChangeset
for help on using the changeset viewer.