diff options
Diffstat (limited to 'engines/director/director.cpp')
-rw-r--r-- | engines/director/director.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index edea7ea591..70d5cf3c62 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -92,7 +92,10 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam _keyCode = 0; _machineType = 9; // Macintosh IIci _playbackPaused = false; - g_director->_skipFrameAdvance = false; + _skipFrameAdvance = false; + + _draggingSprite = false; + _draggingSpriteId = 0; } DirectorEngine::~DirectorEngine() { @@ -141,6 +144,8 @@ Common::Error DirectorEngine::run() { //_mainArchive = new RIFFArchive(); //_mainArchive->openFile("bookshelf_example.mmm"); + _currentScore = new Score(this); + if (getVersion() < 4) { if (getPlatform() == Common::kPlatformWindows) { _sharedCastFile = "SHARDCST.MMM"; @@ -155,7 +160,7 @@ Common::Error DirectorEngine::run() { loadInitialMovie(getEXEName()); - _currentScore = new Score(this, _mainArchive); + _currentScore->setArchive(_mainArchive); debug(0, "Score name %s", _currentScore->getMacName().c_str()); bool loop = true; @@ -176,8 +181,12 @@ Common::Error DirectorEngine::run() { _nextMovie.frameI = -1; } + debugC(1, kDebugEvents, "Starting playback of score '%s'", _currentScore->getMacName().c_str()); + _currentScore->startLoop(); + debugC(1, kDebugEvents, "Finished playback of score '%s'", _currentScore->getMacName().c_str()); + // If a loop was requested, do it if (!_nextMovie.movie.empty()) { _lingo->restartLingo(); @@ -192,8 +201,9 @@ Common::Error DirectorEngine::run() { return Common::kNoError; } - _currentScore = new Score(this, mov); - debug(0, "Score name %s", _currentScore->getMacName().c_str()); + _currentScore = new Score(this); + _currentScore->setArchive(mov); + debug(0, "Switching to score '%s'", _currentScore->getMacName().c_str()); _nextMovie.movie.clear(); loop = true; @@ -233,7 +243,8 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo warning("name: %s", i->getName().c_str()); arc->openFile(i->getName()); - Score *sc = new Score(this, arc); + Score *sc = new Score(this); + sc->setArchive(arc); nameMap->setVal(sc->getMacName(), sc); debugC(2, kDebugLoading, "Movie name: \"%s\"", sc->getMacName().c_str()); @@ -243,11 +254,11 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo return nameMap; } -Common::HashMap<int, Cast *> *DirectorEngine::getSharedCasts() { +Common::HashMap<int, CastType> *DirectorEngine::getSharedCastTypes() { if (_sharedScore) - return &_sharedScore->_casts; + return &_sharedScore->_castTypes; - return &_dummyCast; + return &_dummyCastType; } } // End of namespace Director |