[Scummvm-git-logs] scummvm master -> 3063416dbd2471aa16930455619edf5e74856908

dreammaster noreply at scummvm.org
Fri Jun 6 03:10:06 UTC 2025


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

Summary:
3063416dbd M4: RIDDLE: Properly fix underlying cause of after-image bug


Commit: 3063416dbd2471aa16930455619edf5e74856908
    https://github.com/scummvm/scummvm/commit/3063416dbd2471aa16930455619edf5e74856908
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-06-05T20:10:01-07:00

Commit Message:
M4: RIDDLE: Properly fix underlying cause of after-image bug

Changed paths:
    engines/m4/riddle/triggers.cpp
    engines/m4/wscript/ws_cruncher.cpp


diff --git a/engines/m4/riddle/triggers.cpp b/engines/m4/riddle/triggers.cpp
index b7f4be6a9bf..77e68f234e6 100644
--- a/engines/m4/riddle/triggers.cpp
+++ b/engines/m4/riddle/triggers.cpp
@@ -65,9 +65,9 @@ void setGlobals3(int series, int val1, int val2) {
 
 void setGlobals4(int series, int val2, int val3, int val4) {
 	_G(globals)[GLB_TEMP_1] = series << 24;
-	_G(globals)[GLB_TEMP_2] = val2;
-	_G(globals)[GLB_TEMP_3] = val3;
-	_G(globals)[GLB_TEMP_4] = val4;
+	_G(globals)[GLB_TEMP_2] = val2 << 16;
+	_G(globals)[GLB_TEMP_3] = val3 << 16;
+	_G(globals)[GLB_TEMP_4] = val4 << 16;
 }
 
 machine *triggerMachineByHash_3000(int myHash, int dataHash, int normalDir, int shadowDir,
diff --git a/engines/m4/wscript/ws_cruncher.cpp b/engines/m4/wscript/ws_cruncher.cpp
index b7332dce1a8..9442a3cc660 100644
--- a/engines/m4/wscript/ws_cruncher.cpp
+++ b/engines/m4/wscript/ws_cruncher.cpp
@@ -919,13 +919,6 @@ static void op_SETCEL(Anim8 *myAnim8) {
 		myIndex = (*_GWS(myArg1) & 0xff0000) >> 16;
 	}
 
-	// WORKAROUND: There are a few places in the game,
-	// such as in room 303 at the start of the game,
-	// where a myIndex of -1 can be produced, resulting
-	// in "after-images" where Ripley isn't properly erased
-	if (myIndex < 0)
-		myIndex = 0;
-
 	if (!myAnim8->myCCB) {
 		// Allocate and initialize a CCB structure
 		if ((myAnim8->myCCB = (CCB *)mem_alloc(sizeof(CCB), "CCB")) == nullptr) {




More information about the Scummvm-git-logs mailing list