Changeset 6650 in orxonox.OLD for trunk/src/util
- Timestamp:
- Jan 21, 2006, 7:16:30 PM (19 years ago)
- Location:
- trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/loading/resource_manager.cc
r6648 r6650 299 299 * @see load; 300 300 * 301 * @brief returns true if ok, false otherwise. 301 302 * This function loads a Resource without applying it to an Object. 302 303 * This is for loading purposes, e.g, when the user is loading a Resource 303 304 * during the initialisation instead of at Runtime. 304 305 */ 305 voidResourceManager::cache(const char* fileName, ResourceType type, ResourcePriority prio,306 bool ResourceManager::cache(const char* fileName, ResourceType type, ResourcePriority prio, 306 307 const MultiType& param0, const MultiType& param1, const MultiType& param2) 307 308 { … … 317 318 // return cached pointer. 318 319 if (tmpResource != NULL) // if the resource was loaded before. 320 { 319 321 if(tmpResource->prio < prio) 320 322 tmpResource->prio = prio; 323 return true; 324 } 325 else 326 return false; 321 327 } 322 328 … … 799 805 RP_LEVEL); 800 806 else if (splits.getCount() == 3) 801 this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]),807 return this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]), 802 808 RP_LEVEL, splits[2]); 803 809 else if (splits.getCount() == 4) 804 this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]),810 return this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]), 805 811 RP_LEVEL, splits[2], splits[3]); 806 812 else if (splits.getCount() == 5) 807 this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]),813 return this->cache(splits[1], ResourceManager::stringToResourceType(splits[0]), 808 814 RP_LEVEL, splits[2], splits[3], splits[4]); 809 815 } -
trunk/src/util/loading/resource_manager.h
r6649 r6650 105 105 bool addImageDir(const char* imageDir); 106 106 107 voidcache(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO,107 bool cache(const char* fileName, ResourceType type, ResourcePriority prio = RP_NO, 108 108 const MultiType& param0 = MultiType(), const MultiType& param1 = MultiType(), const MultiType& param2 = MultiType()); 109 109
Note: See TracChangeset
for help on using the changeset viewer.