Changeset 3339 for code/branches/resource/src/core
- Timestamp:
- Jul 23, 2009, 8:04:51 PM (15 years ago)
- Location:
- code/branches/resource/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/core/Loader.cc
r3196 r3339 30 30 31 31 #include <tinyxml/ticpp.h> 32 #include <boost/filesystem.hpp>33 32 34 33 #include "util/Debug.h" 35 34 #include "util/Exception.h" 36 35 #include "BaseObject.h" 37 #include "Core.h"38 36 #include "Iterator.h" 39 37 #include "ObjectList.h" … … 210 208 return Loader::load(file, mask); 211 209 } 212 213 std::vector<std::string> Loader::getLevelList()214 {215 std::vector<std::string> levelList;216 217 boost::filesystem::directory_iterator file(Core::getMediaPathString() + "levels");218 boost::filesystem::directory_iterator end;219 220 while (file != end)221 {222 if (!boost::filesystem::is_directory(*file) && file->string()[file->string().length()-1] != '~')223 {224 std::string filename = file->path().leaf();225 if (filename.length() > 4)226 levelList.push_back(filename.substr(0,filename.length()-4));227 }228 ++file;229 }230 return levelList;231 }232 210 } -
code/branches/resource/src/core/Loader.h
r3196 r3339 56 56 57 57 static ClassTreeMask currentMask_s; 58 static std::vector<std::string> getLevelList();59 58 60 59 private:
Note: See TracChangeset
for help on using the changeset viewer.