From 40a900c3c7b340daf2fbccbe6ceba83be5d29dde Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 Jan 2017 21:13:20 +0100 Subject: DIRECTOR: Lingo: Fixed 'go to movie' procedure. Now it loads the needed movie but crashes because there was no context of script reloading --- engines/director/lingo/lingo-funcs.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'engines/director') 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(); } -- cgit v1.2.3