Changeset 3008 for code/trunk/src/core
- Timestamp:
- May 21, 2009, 5:16:29 PM (16 years ago)
- Location:
- code/trunk/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/Loader.cc
r2710 r3008 30 30 31 31 #include <tinyxml/ticpp.h> 32 #include <boost/filesystem.hpp> 32 33 33 34 #include "XMLFile.h" … … 41 42 #include "util/Debug.h" 42 43 #include "util/Exception.h" 44 #include "Core.h" 43 45 44 46 namespace orxonox … … 210 212 return Loader::load(file, mask); 211 213 } 214 215 std::vector<std::string> Loader::getLevelList() 216 { 217 std::vector<std::string> levelList; 218 219 boost::filesystem::directory_iterator file(Core::getMediaPathString() + "levels"); 220 boost::filesystem::directory_iterator end; 221 222 while (file != end) 223 { 224 if (!boost::filesystem::is_directory(*file) && file->string()[file->string().length()-1] != '~') 225 { 226 std::string filename = file->path().leaf(); 227 if (filename.length() > 4) 228 levelList.push_back(filename.substr(0,filename.length()-4)); 229 } 230 ++file; 231 } 232 return levelList; 233 } 212 234 } -
code/trunk/src/core/Loader.h
r2087 r3008 57 57 58 58 static ClassTreeMask currentMask_s; 59 static std::vector<std::string> getLevelList(); 59 60 60 61 private:
Note: See TracChangeset
for help on using the changeset viewer.