diff options
-rw-r--r-- | engines/director/director.cpp | 16 | ||||
-rw-r--r-- | engines/director/director.h | 4 | ||||
-rw-r--r-- | engines/director/score.cpp | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index af0f87bd19..0c63525c53 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -56,6 +56,8 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam _mainArchive = 0; _macBinary = 0; _currentPalette = 0; + //FIXME + _sharedMMM = "SHARDCST.MMM"; _movies = new Common::HashMap<Common::String, Score *>(); const Common::FSNode gameDataDir(ConfMan.get("path")); @@ -210,6 +212,11 @@ Common::HashMap<Common::String, Score *> DirectorEngine::loadMMMNames(Common::St if (!movies.empty()) { for (Common::FSList::const_iterator i = movies.begin(); i != movies.end(); ++i) { + if (i->getName() == _sharedMMM) { + loadSharedCastsFrom(i->getPath()); + continue; + } + RIFFArchive *arc = new RIFFArchive(); arc->openFile(i->getPath()); Score *sc = new Score(this); @@ -402,6 +409,15 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { _sharedSTXT[*iterator] = shardcst->getResource(MKTAG('S','T','X','T'), *iterator); } } + + Common::Array<uint16> sound = shardcst->getResourceIDList(MKTAG('S','N','D',' ')); + + if (stxt.size() != 0) { + Common::Array<uint16>::iterator iterator; + for (iterator = sound.begin(); iterator != sound.end(); ++iterator) { + _sharedSTXT[*iterator] = shardcst->getResource(MKTAG('S','N','D',' '), *iterator); + } + } } } // End of namespace Director diff --git a/engines/director/director.h b/engines/director/director.h index 0e76cd9ea8..82c43fd90c 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -91,9 +91,13 @@ private: void loadMac(); Common::String readPascalString(Common::SeekableReadStream &stream); + + Common::String _sharedMMM; Common::HashMap<int, Cast *> _sharedCasts; Common::HashMap<int, Common::SeekableReadStream *> _sharedDIB; Common::HashMap<int, Common::SeekableReadStream *> _sharedSTXT; + Common::HashMap<int, Common::SeekableReadStream *> _sharedSound; + Archive *_mainArchive; Common::MacResManager *_macBinary; DirectorSound *_soundManager; diff --git a/engines/director/score.cpp b/engines/director/score.cpp index b334caf2bf..7b26a952e2 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -676,7 +676,7 @@ void Score::update() { Common::SortedArray<Label *>::iterator i; for (i = _labels->begin(); i != _labels->end(); ++i) { - if ((*i)->number = _currentFrame) { + if ((*i)->number == _currentFrame) { _currentLabel = (*i)->name; } } |