Changeset 9798 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/new_resource_manager.cc
- Timestamp:
- Sep 24, 2006, 11:55:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/new_resource_manager.cc
r9797 r9798 49 49 //this->unloadAllByPriority(RP_GAME); 50 50 51 // if (!this->resourceList.empty())52 // PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size());51 // if (!this->resourceList.empty()) 52 // PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size()); 53 53 54 54 NewResourceManager::_singletonRef = NULL; … … 110 110 111 111 112 113 unsigned int NewResourceManager::addKeepLevelName(const std::string& keepLevelName) 114 { 115 this->_keepLevelNames.push_back(keepLevelName); 116 return _keepLevelNames.size()-1; 117 } 118 119 unsigned int NewResourceManager::getKeepLevelID(const std::string& keepLevelName) const 120 { 121 for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i) 122 if (this->_keepLevelNames[i] == keepLevelName) 123 return i; 124 125 PRINTF(2)("KeepLevel '%s' not found. Using 0 instead\n", keepLevelName.c_str()); 126 return 0; 127 } 128 129 const std::string& NewResourceManager::getKeepLevelID(unsigned int keepLevelID) const 130 { 131 assert(keepLevelID < this->_keepLevelNames.size()); 132 return this->_keepLevelNames[keepLevelID]; 133 } 134 135 112 136 /** 113 137 * @brief outputs debug information about the NewResourceManager … … 118 142 PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n"); 119 143 PRINT(0)("======================================\n"); 120 PRINT(0)("Listing %d Types: \n", this->_resourceTypes.size()); 144 PRINT(0)(" MainGlobal search path is %s\n", this->_mainGlobalPath.name().c_str()); 145 if(!this->_globalPaths.empty()) 146 { 147 PRINT(0)(" Additional Global search Paths are: "); 148 for (unsigned int i = 0; i < this->_globalPaths.size(); ++i) 149 PRINT(0)("'%s' ", this->_globalPaths[i].name().c_str()); 150 PRINT(0)("\n"); 151 } 152 PRINT(0)(" Listing %d Types: \n", this->_resourceTypes.size()); 121 153 std::vector<Resources::Type*>::const_iterator it; 122 154 for (it = this->_resourceTypes.begin(); it != this->_resourceTypes.end(); ++it) … … 127 159 } 128 160 161 PRINT(0)("KeepLevels are: "); 162 for (unsigned int i = 0; i < this->_keepLevelNames.size(); ++i) 163 PRINT(0)("%d:'%s' ", i, this->_keepLevelNames[i].c_str()); 164 PRINT(0)("\n"); 129 165 PRINT(0)("==================================RM==\n"); 130 166 }
Note: See TracChangeset
for help on using the changeset viewer.