Exemplo n.º 1
0
 explicit ObjectFileIndex(IObjectRepository& objectRepository, const IPlatformEnvironment& env)
     : FileIndex(
           "object index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_OBJECTS), std::string(PATTERN),
           std::vector<std::string>{
               env.GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::OBJECT),
               env.GetDirectoryPath(DIRBASE::USER, DIRID::OBJECT),
           })
     , _objectRepository(objectRepository)
 {
 }
Exemplo n.º 2
0
 explicit TrackDesignFileIndex(const IPlatformEnvironment &env) :
     FileIndex("track design index",
         MAGIC_NUMBER,
         VERSION,
         env.GetFilePath(PATHID::CACHE_TRACKS),
         std::string(PATTERN),
         std::vector<std::string>({
             env.GetDirectoryPath(DIRBASE::RCT1, DIRID::TRACK),
             env.GetDirectoryPath(DIRBASE::RCT2, DIRID::TRACK),
             env.GetDirectoryPath(DIRBASE::USER, DIRID::TRACK) }))
 {
 }
Exemplo n.º 3
0
    void Scan() override
    {
        _scenarios.clear();

        // Scan RCT2 directory
        std::string rct2dir = _env->GetDirectoryPath(DIRBASE::RCT2, DIRID::SCENARIO);
        std::string openrct2dir = _env->GetDirectoryPath(DIRBASE::USER, DIRID::SCENARIO);
        Scan(rct2dir);
        Scan(openrct2dir);

        Sort();
        LoadScores();
        LoadLegacyScores();
        AttachHighscores();
    }