Changeset 6412 for code/branches/pickup2/src/orxonox/LevelManager.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/orxonox/LevelManager.cc
r5929 r6412 30 30 31 31 #include <map> 32 #include <OgreResourceGroupManager.h>33 32 34 #include "core/CommandLine .h"33 #include "core/CommandLineParser.h" 35 34 #include "core/ConfigValueIncludes.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 … … 53 52 54 53 // check override 55 if (!CommandLine ::getArgument("level")->hasDefaultValue())54 if (!CommandLineParser::getArgument("level")->hasDefaultValue()) 56 55 { 57 ModifyConfigValue(defaultLevelName_, tset, CommandLine ::getValue("level").getString());56 ModifyConfigValue(defaultLevelName_, tset, CommandLineParser::getValue("level").getString()); 58 57 } 59 58 } … … 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.