Changeset 6417 for code/trunk/src/orxonox/LevelManager.cc
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/LevelManager.cc
r6021 r6417 30 30 31 31 #include <map> 32 #include <OgreResourceGroupManager.h>33 32 34 33 #include "core/CommandLineParser.h" … … 36 35 #include "core/CoreIncludes.h" 37 36 #include "core/Loader.h" 37 #include "core/Resource.h" 38 38 #include "core/ScopedSingletonManager.h" 39 39 #include "PlayerManager.h" … … 44 44 SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)"); 45 45 46 LevelManager* LevelManager::singletonPtr_s = 0;47 46 ManageScopedSingleton(LevelManager, ScopeID::Root, false); 48 47 … … 66 65 { 67 66 SetConfigValue(defaultLevelName_, "presentation_dm.oxw") 68 .description("Sets the pre selection of the level in the main menu.");67 .description("Sets the pre selection of the level in the main menu."); 69 68 } 70 69 … … 123 122 } 124 123 125 std::stringLevelManager::getAvailableLevelListItem(unsigned int index) const124 const std::string& LevelManager::getAvailableLevelListItem(unsigned int index) const 126 125 { 127 126 if (index >= availableLevels_.size()) 128 return std::string();127 return BLANKSTRING; 129 128 else 130 129 return availableLevels_[index]; … … 133 132 void LevelManager::compileAvailableLevelList() 134 133 { 135 availableLevels_.clear(); 136 137 availableLevels_ = *Ogre::ResourceGroupManager::getSingleton().findResourceNames( 138 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, "*.oxw"); 139 134 availableLevels_ = *Resource::findResourceNames("*.oxw"); 140 135 for (std::vector<std::string>::iterator it = availableLevels_.begin(); it != availableLevels_.end();) 141 136 if (it->find("old/") == 0)
Note: See TracChangeset
for help on using the changeset viewer.