[Scummvm-git-logs] scummvm master -> 7a8f554ed2415e44495fd96917fe03eb2f91ab87

AndywinXp noreply at scummvm.org
Sun Oct 12 14:54:53 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:
7a8f554ed2 SCUMM: CHASE/HE90+: Fix #12251


Commit: 7a8f554ed2415e44495fd96917fe03eb2f91ab87
    https://github.com/scummvm/scummvm/commit/7a8f554ed2415e44495fd96917fe03eb2f91ab87
Author: AndywinXp (andywinxp at gmail.com)
Date: 2025-10-12T16:54:47+02:00

Commit Message:
SCUMM: CHASE/HE90+: Fix #12251

This fixes #12251:
"SCUMM/HE: Missing visual effects on Spy Fox in Cheese Chase"

YET another case of a "nah, we don't need this" mistake by yours truly. :)

After more than a year during which I got basically nowhere with this bug,
good ol' @eriktorbjorn managed to find the root case in about a week.

So, kudos to him for finding why this happened and for fixing this thing properly ;)

While the issue was caused by the previously missing "burn time" value, I also
added a proper calculation for the "scumm time" which was previously misinterpreted
as VAR_TIMER.

The time reports are now pretty accurate or very close to what I can see on the original.

Changed paths:
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/vars.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 081376d34b8..f93b7a57b92 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2733,6 +2733,9 @@ Common::Error ScummEngine::go() {
 			if (_game.heversion >= 60) {
 				((SoundHE *)_sound)->feedMixer();
 			}
+
+			if (VAR_LAST_FRAME_SCUMM_TIME != 0xFF)
+				VAR(VAR_LAST_FRAME_SCUMM_TIME) = _system->getMillis() - _lastWaitTime;
 		}
 
 		if (shouldQuit()) {
@@ -2758,6 +2761,9 @@ void ScummEngine::waitForTimer(int quarterFrames, bool freezeMacGui) {
 	msecDelay = (msecDelay > diff) ? msecDelay - diff : 0;
 	endTime = cur + msecDelay;
 
+	if (VAR_LAST_FRAME_BURN_TIME != 0xFF)
+		VAR(VAR_LAST_FRAME_BURN_TIME) = msecDelay;
+
 	while (!shouldQuit()) {
 		_sound->updateCD(); // Loop CD Audio if needed
 		parseEvents();
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 2e6ed1d4ac5..fd2399e374d 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1894,6 +1894,9 @@ public:
 	// Exists both in V7 and in V72HE:
 	byte VAR_NUM_GLOBAL_OBJS = 0xFF;
 
+	byte VAR_LAST_FRAME_BURN_TIME = 0xFF;  // HE90+
+	byte VAR_LAST_FRAME_SCUMM_TIME = 0xFF; // HE90+
+
 #ifdef USE_RGB_COLOR
 	// FM-Towns / PC-Engine specific
 	Graphics::FontSJIS *_cjkFont = nullptr;
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 1389fd0d21a..029a3c4a7de 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -328,7 +328,8 @@ void ScummEngine_v80he::setupScummVars() {
 void ScummEngine_v90he::setupScummVars() {
 	ScummEngine_v80he::setupScummVars();
 
-	VAR_TIMER = 97;
+	VAR_LAST_FRAME_BURN_TIME = 96;
+	VAR_LAST_FRAME_SCUMM_TIME = 97;
 	VAR_QUIT_SCRIPT = 102;
 	VAR_DEFAULT_SCRIPT_PRIORITY = 103;
 	VAR_LAST_SCRIPT_PRIORITY = 104;




More information about the Scummvm-git-logs mailing list