diff options
author | Eugene Sandulenko | 2017-01-15 21:13:20 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-15 21:15:45 +0100 |
commit | 40a900c3c7b340daf2fbccbe6ceba83be5d29dde (patch) | |
tree | 9de82806d128bc744c3f665da8a342949aab639b | |
parent | 7b666dc1ca368f6323807be5efae31b689b6ca93 (diff) | |
download | scummvm-rg350-40a900c3c7b340daf2fbccbe6ceba83be5d29dde.tar.gz scummvm-rg350-40a900c3c7b340daf2fbccbe6ceba83be5d29dde.tar.bz2 scummvm-rg350-40a900c3c7b340daf2fbccbe6ceba83be5d29dde.zip |
DIRECTOR: Lingo: Fixed 'go to movie' procedure.
Now it loads the needed movie but crashes because there was no context
of script reloading
-rw-r--r-- | engines/director/lingo/lingo-funcs.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 0deab0760c..a71eb3db77 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -172,12 +172,19 @@ void Lingo::func_goto(Datum &frame, Datum &movie) { if (movie.type != VOID) { movie.toString(); - if (!_vm->_movies || !_vm->_movies->contains(*movie.u.s)) { + Common::File file; + + if (!file.open(*movie.u.s)) { warning("Movie %s does not exist", movie.u.s->c_str()); return; } - _vm->_currentScore = _vm->_movies->getVal(*movie.u.s); + delete _vm->_currentScore; + + Archive *mov = _vm->openMainArchive(*movie.u.s); + + _vm->_currentScore = new Score(_vm, mov); + debug(0, "Score name %s", _vm->_currentScore->getMacName().c_str()); _vm->_currentScore->loadArchive(); } |