[Scummvm-git-logs] scummvm master -> 34df7b98916f574e365e030efc193cb93fd84ffb

sev- sev at scummvm.org
Fri Dec 25 22:14:39 UTC 2020


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:
34df7b9891 SCUMM: ZAKFM Add script bug workaround, fixes bug #5624


Commit: 34df7b98916f574e365e030efc193cb93fd84ffb
    https://github.com/scummvm/scummvm/commit/34df7b98916f574e365e030efc193cb93fd84ffb
Author: Ben Castricum (github at bencastricum.nl)
Date: 2020-12-25T23:14:36+01:00

Commit Message:
SCUMM: ZAKFM Add script bug workaround, fixes bug #5624

Due to poor translation of the v2 script to v5 an if statement jumps in the
middle of a cutscene causing a endCutscene() without a begin cutscene()

Previous "fixes" do improve the code, but do not fix this cutscene issue.

See also

https://bugs.scummvm.org/ticket/3099
https://bugs.scummvm.org/ticket/5624

and commits

1d40f7849965e8b758b88197820daf9c6af4d120
Fixes the mistranslation of getState08(465) into classOfIs(465,[0]) at 001A

0725be325f60fa578b918aaaaef1d5f4008d310a
Fixes several mistranslations of setClass

Changed paths:
    engines/scumm/script.cpp


diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 245de120c1..2cb00842f3 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -1524,8 +1524,16 @@ void ScummEngine::endCutscene() {
 	vm.cutSceneScript[vm.cutSceneStackPointer] = 0;
 	vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
 
-	if (0 == vm.cutSceneStackPointer)
+	if (0 == vm.cutSceneStackPointer) {
+		// WORKAROUND bug #5624: Due to poor translation of the v2 script to
+		// v5 an if statement jumps in the middle of a cutscene causing a
+		// endCutscene() without a begin cutscene()
+		if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns &&
+			vm.slot[_currentScript].number == 205 && _currentRoom == 185) {
+			return;
+		}
 		error("Cutscene stack underflow");
+	}
 	vm.cutSceneStackPointer--;
 
 	if (VAR(VAR_CUTSCENE_END_SCRIPT))




More information about the Scummvm-git-logs mailing list