Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/Loader.cc

    r3196 r3370  
    3030
    3131#include <tinyxml/ticpp.h>
    32 #include <boost/filesystem.hpp>
    3332
    3433#include "util/Debug.h"
    3534#include "util/Exception.h"
    3635#include "BaseObject.h"
    37 #include "Core.h"
    3836#include "Iterator.h"
    3937#include "ObjectList.h"
     
    210208        return Loader::load(file, mask);
    211209    }
    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     }
    232210}
Note: See TracChangeset for help on using the changeset viewer.