diff options
author | Eugene Sandulenko | 2016-09-01 10:52:11 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-01 10:52:11 +0200 |
commit | 91cc02b0eebf17eaaaa410eb7469559ebc42a13d (patch) | |
tree | d53bbeeaccd5753ff9ec0c3d2c30e1fb981487b5 /engines/director/director.cpp | |
parent | 3735f79d5b3d81665a7f91f955ec58951abddaef (diff) | |
download | scummvm-rg350-91cc02b0eebf17eaaaa410eb7469559ebc42a13d.tar.gz scummvm-rg350-91cc02b0eebf17eaaaa410eb7469559ebc42a13d.tar.bz2 scummvm-rg350-91cc02b0eebf17eaaaa410eb7469559ebc42a13d.zip |
DIRECTOR: Cleanup
Diffstat (limited to 'engines/director/director.cpp')
-rw-r--r-- | engines/director/director.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index e1f4ef1bdb..26b3387601 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -112,7 +112,9 @@ Common::Error DirectorEngine::run() { //_mainArchive = new RIFFArchive(); //_mainArchive->openFile("bookshelf_example.mmm"); - loadMMMNames(ConfMan.get("path")); + scanMovies(ConfMan.get("path")); + + loadSharedCastsFrom(_sharedCastFile); loadMainArchive(); _currentScore = new Score(this, _mainArchive); @@ -124,7 +126,7 @@ Common::Error DirectorEngine::run() { return Common::kNoError; } -Common::HashMap<Common::String, Score *> DirectorEngine::loadMMMNames(Common::String folder) { +Common::HashMap<Common::String, Score *> DirectorEngine::scanMovies(const Common::String &folder) { Common::FSNode directory(folder); Common::FSList movies; const char *sharedMMMname; @@ -142,8 +144,9 @@ Common::HashMap<Common::String, Score *> DirectorEngine::loadMMMNames(Common::St if (!movies.empty()) { for (Common::FSList::const_iterator i = movies.begin(); i != movies.end(); ++i) { debugC(2, kDebugLoading, "File: %s", i->getName().c_str()); + if (Common::matchString(i->getName().c_str(), sharedMMMname, true)) { - loadSharedCastsFrom(i->getName()); + _sharedCastFile = i->getName(); continue; } |