diff options
author | Eugene Sandulenko | 2020-01-09 14:14:32 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2020-01-09 17:11:31 +0100 |
commit | 5264fecd03cc26731624214a0c09835bb881bac2 (patch) | |
tree | 285e7cca46da952f3579a9c13c06b6bab6e944d5 | |
parent | 0bf57feb40dfd5eef36e2fc777ecafabdf34b919 (diff) | |
download | scummvm-rg350-5264fecd03cc26731624214a0c09835bb881bac2.tar.gz scummvm-rg350-5264fecd03cc26731624214a0c09835bb881bac2.tar.bz2 scummvm-rg350-5264fecd03cc26731624214a0c09835bb881bac2.zip |
DIRECTOR: Narrowed down movie scanning only to the game directory
-rw-r--r-- | engines/director/director.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index f4c1e60101..2835863a11 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -173,7 +173,13 @@ Common::Error DirectorEngine::run() { loadSharedCastsFrom(_currentPath + _sharedCastFile); debug(0, "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\nObtaining score name\n"); - loadInitialMovie(getEXEName()); + + if (getGameID() == GID_TESTALL) { + _nextMovie = getNextMovieFromQueue(); + loadInitialMovie(_nextMovie.movie); + } else { + loadInitialMovie(getEXEName()); + } _currentScore->setArchive(_mainArchive); debug(0, "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); @@ -280,15 +286,16 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo } void DirectorEngine::enqueueAllMovies() { - Common::ArchiveMemberList fsList; - SearchMan.listMatchingMembers(fsList, "*"); + Common::FSNode dir(ConfMan.get("path")); + Common::FSList files; + dir.getChildren(files, Common::FSNode::kListFilesOnly); - for (Common::ArchiveMemberList::iterator it = fsList.begin(); it != fsList.end(); ++it) - _movieQueue.push_back((*it)->getName()); + for (Common::FSList::const_iterator file = files.begin(); file != files.end(); ++file) + _movieQueue.push_back((*file).getName()); Common::sort(_movieQueue.begin(), _movieQueue.end()); - debug(1, "Enqueued %d movies", _movieQueue.size()); + debug(1, "=========> Enqueued %d movies", _movieQueue.size()); } MovieReference DirectorEngine::getNextMovieFromQueue() { @@ -296,6 +303,8 @@ MovieReference DirectorEngine::getNextMovieFromQueue() { res.movie = _movieQueue.front(); + debug(1, "=========> Next movie is %s", res.movie.c_str()); + _movieQueue.remove_at(0); return res; |