Changeset 9799 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/resource.cc
- Timestamp:
- Sep 24, 2006, 12:06:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.cc
r9798 r9799 44 44 std::string NewResource::locateFile(const std::string& fileName) const 45 45 { 46 if (File(fileName).exists()) 47 return fileName; 48 else if ((NewResourceManager::getInstance()->mainGlobalPath() + File(fileName)).exists() ) 46 if ((NewResourceManager::getInstance()->mainGlobalPath() + File(fileName)).exists() ) 49 47 return (NewResourceManager::getInstance()->mainGlobalPath() + File(fileName)).name(); 50 48 … … 56 54 return locatedFile; 57 55 } 56 57 if (File(fileName).exists()) 58 return fileName; 58 59 59 60 return (NewResourceManager::getInstance()->mainGlobalPath() + File(fileName)).name(); … … 114 115 } 115 116 117 const std::string& Resources::KeepLevel::name() const 118 { 119 return NewResourceManager::getInstance()->getKeepLevelName(this->_keepLevel); 120 } 121 116 122 117 123 … … 134 140 NewResourceManager::getInstance()->registerType(this); 135 141 PRINTF(4)("Created ResourceType '%s'\n", typeName.c_str()); 142 } 143 144 Resources::Type::~Type() 145 { 146 NewResourceManager::getInstance()->unregisterType(this); 136 147 } 137 148 … … 176 187 for (unsigned int i = 0; i < this->_resourcePaths.size(); ++i) 177 188 PRINT(0)(" %s\n", this->_resourcePaths[i].name().c_str()); 178 PRINT(0)(" Sub-Paths: \n");189 PRINT(0)(" Sub-Paths:"); 179 190 for (unsigned int i = 0; i < this->_resourceSubPaths.size(); ++i) 180 PRINT(0)(" %s\n", this->_resourceSubPaths[i].name().c_str()); 191 PRINT(0)(" '%s'", this->_resourceSubPaths[i].name().c_str()); 192 PRINT(0)("\n"); 181 193 182 194 }
Note: See TracChangeset
for help on using the changeset viewer.