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

Die4Ever noreply at scummvm.org
Tue Feb 15 20:18:34 UTC 2022


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:
fe02115dba GROOVIE: reset _videoSkipAddress when loading or changing scripts


Commit: fe02115dbab50ee76e853103446462a324231f54
    https://github.com/scummvm/scummvm/commit/fe02115dbab50ee76e853103446462a324231f54
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-02-15T14:18:20-06:00

Commit Message:
GROOVIE: reset _videoSkipAddress when loading or changing scripts

Example: if you started Clandestiny and you start the intro, it will set _videoSkipAddress, then interrupt the intro with a directload and then play a video that does not set the _videoSkipAddress such as the start of the bricks puzzle. If you right click during that video then it will attempt to jump to the _videoSkipAddress that the intro set and it will crash.

Changed paths:
    engines/groovie/script.cpp


diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index a0937d4d5cf..b84cac0c28a 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -272,6 +272,8 @@ void Script::directGameLoad(int slot) {
 		_scriptFile = _savedScriptFile;
 	}
 
+	_videoSkipAddress = 0;
+
 	uint16 targetInstruction = 0;
 	const byte *midiInitScript = nullptr;
 	uint8 midiInitScriptSize = 0;
@@ -509,7 +511,7 @@ uint32 Script::getVideoRefString(Common::String &resName) {
 	// Add a trailing dot
 	resName += '.';
 
-	debugCN(1, kDebugScript, "%s", resName.c_str());
+	debugC(1, kDebugScript, "getVideoRefString %s", resName.c_str());
 
 	// Get the fileref of the resource
 	return _vm->_resMan->getRef(resName);
@@ -1925,6 +1927,7 @@ void Script::o_loadscript() {
 
 	// Save the variables
 	memcpy(_savedVariables, _variables + 0x107, 0x180);
+	_videoSkipAddress = 0;
 	resetFastForward();
 }
 
@@ -1992,6 +1995,7 @@ void Script::o_returnscript() {
 		_wantAutosave = val == 1;
 	}
 
+	_videoSkipAddress = 0;
 	resetFastForward();
 }
 




More information about the Scummvm-git-logs mailing list