[Scummvm-git-logs] scummvm master -> f3a6e5f24f0897d7a5e26be35a843188410c5917

sev- noreply at scummvm.org
Tue Jun 4 23:14:31 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f3a6e5f24f DIRECTOR: Truly load movie in Window::ensureMovieIsLoaded()


Commit: f3a6e5f24f0897d7a5e26be35a843188410c5917
    https://github.com/scummvm/scummvm/commit/f3a6e5f24f0897d7a5e26be35a843188410c5917
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-06-05T01:14:25+02:00

Commit Message:
DIRECTOR: Truly load movie in Window::ensureMovieIsLoaded()

Before that, we were only _scheduling_ the movie to load, which
was leading to movie actually getting loaded only after the
current script is over.

This affects jewels1 boot process, where the following Lingo is used:

  set myWindow to window "puzzle"
  set the fileName of myWindow to "NAVLOAD"
  open(window "puzzle")

  tell window "puzzle"
    waitSignal()
  end tell

As a result, tell() was complaining about unknown waitSignal handler
because it has not yet been loaded.

Now, after splitting loading and Lingo execution into separate phases,
we can truly only load a movie without messing with scripts (yet).

Changed paths:
    engines/director/window.cpp


diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 1c8820fb346..b0f021abb92 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -357,6 +357,9 @@ void Window::ensureMovieIsLoaded() {
 	}
 
 	loadNextMovie();
+
+	if (_currentMovie->getScore()->_playState == kPlayNotStarted)
+		step(); // we will load it here and move to kPlayLoaded state
 }
 
 bool Window::setNextMovie(Common::String &movieFilenameRaw) {




More information about the Scummvm-git-logs mailing list