[Scummvm-git-logs] scummvm master -> 042693c52a4b3bc7a5fcbb5be3507a00be70005a

sluicebox noreply at scummvm.org
Wed May 3 22:35:20 UTC 2023


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:
042693c52a SCI: Resolve TODO about script exports


Commit: 042693c52a4b3bc7a5fcbb5be3507a00be70005a
    https://github.com/scummvm/scummvm/commit/042693c52a4b3bc7a5fcbb5be3507a00be70005a
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-05-03T15:33:37-07:00

Commit Message:
SCI: Resolve TODO about script exports

Changed paths:
    engines/sci/engine/script.cpp


diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index a872d872ed6..3a0683eeb03 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -904,7 +904,12 @@ uint32 Script::validateExportFunc(int pubfunct, bool relocSci3) {
 #endif
 		offset = _exports.getUint16SEAt(pubfunct);
 
-	// TODO: Check if this should be done for SCI1.1 games as well
+	// SCI2 doesn't adjust export offsets to the code block when they're zero.
+	// Zero is supposed to signify that the export slot is empty. This leaves the
+	// offset pointing at the start of the code block, and several scripts rely
+	// on this. Script 64909's first export is zero but game scripts call this
+	// to shake the screen. This works because the function resides at the start
+	// of the code block.
 	if (getSciVersion() >= SCI_VERSION_2 && offset == 0) {
 		offset = getCodeBlockOffset();
 	}




More information about the Scummvm-git-logs mailing list