diff options
-rw-r--r-- | engines/director/director.cpp | 8 | ||||
-rw-r--r-- | engines/director/director.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 43c56021c6..5d646956d0 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -120,7 +120,7 @@ Common::Error DirectorEngine::run() { //testFont(); - scanMovies(ConfMan.get("path")); + _movies = scanMovies(ConfMan.get("path")); loadSharedCastsFrom(_sharedCastFile); loadMainArchive(); @@ -134,7 +134,7 @@ Common::Error DirectorEngine::run() { return Common::kNoError; } -Common::HashMap<Common::String, Score *> DirectorEngine::scanMovies(const Common::String &folder) { +Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Common::String &folder) { Common::FSNode directory(folder); Common::FSList movies; const char *sharedMMMname; @@ -145,7 +145,7 @@ Common::HashMap<Common::String, Score *> DirectorEngine::scanMovies(const Common sharedMMMname = "Shared Cast*"; - Common::HashMap<Common::String, Score *> nameMap; + Common::HashMap<Common::String, Score *> *nameMap = new Common::HashMap<Common::String, Score *>(); if (!directory.getChildren(movies, Common::FSNode::kListFilesOnly)) return nameMap; @@ -162,7 +162,7 @@ Common::HashMap<Common::String, Score *> DirectorEngine::scanMovies(const Common arc->openFile(i->getName()); Score *sc = new Score(this, arc); - nameMap[sc->getMacName()] = sc; + nameMap->setVal(sc->getMacName(), sc); debugC(2, kDebugLoading, "Movie name: \"%s\"", sc->getMacName().c_str()); } diff --git a/engines/director/director.h b/engines/director/director.h index f64b87b7d6..300998bb78 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -109,7 +109,7 @@ protected: private: const DirectorGameDescription *_gameDescription; - Common::HashMap<Common::String, Score *> scanMovies(const Common::String &folder); + Common::HashMap<Common::String, Score *> *scanMovies(const Common::String &folder); void loadEXE(); void loadEXEv3(Common::SeekableReadStream *stream); void loadEXEv4(Common::SeekableReadStream *stream); |