[Scummvm-git-logs] scummvm master -> 84062b630f8187b050e057a0f36b757c7eca1a12

athrxx noreply at scummvm.org
Wed Oct 14 19:58:18 UTC 2026


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

Summary:
247e6c4b0b SCUMM: (LOOM/MAC) - change tempo glitch workaround
84062b630f KYRA: (LOL) - fix bug no. 17362


Commit: 247e6c4b0b1cf9125addab7c1f8fe9cfc3e3f8ed
    https://github.com/scummvm/scummvm/commit/247e6c4b0b1cf9125addab7c1f8fe9cfc3e3f8ed
Author: athrxx (athrxx at scummvm.org)
Date: 2026-10-14T21:57:22+02:00

Commit Message:
SCUMM: (LOOM/MAC) - change tempo glitch workaround

The original sound driver has a tempo glitch. In sampled synth
mode it works around it by inserting deep (value 1) notes. For
the other modes it doesn't have a workaround, the channels
will just go out of sync. And the sampled synth fix causes
audible noise.

In ScummVM, we have replicated the sampled synth fix and
we have another workaround for the other synth modes. That
one inserts silence instead of deep notes. So it does not have
audible side effects.

I have now disabled the deep notes fix for sampled synth
and extended the silence fix to cover all synth modes.

Changed paths:
    engines/scumm/players/player_mac_loom_monkey.cpp


diff --git a/engines/scumm/players/player_mac_loom_monkey.cpp b/engines/scumm/players/player_mac_loom_monkey.cpp
index fed402c296a..fea5153ce23 100644
--- a/engines/scumm/players/player_mac_loom_monkey.cpp
+++ b/engines/scumm/players/player_mac_loom_monkey.cpp
@@ -240,8 +240,14 @@ bool LoomMacSndLoader::parseNextEvent(uint16 chan, uint16 &duration, uint8 &note
 	skip = false;
 	updateInstr = false;
 
-	if (_synth == 4 && chan != 0 && note == 0)
-		note = 1;
+	// This is the original code's tempo glitch workaround. For whatever reason, it was implemented for sampled synth
+	// mode only, although the tempo glitch is present in all synth modes. It is not a good workaround, since it - obviously -
+	// inserts notes of value 1 into the music, which may actually be heard. We have another workaround for the other
+	// synth modes in LoomMonkeyMacSnd::sendSoundCommands(). That one works around the tempo issue without having any
+	// side effects. So I disabled this workaround here and extended the other one to cover the sampled synth mode, too.
+	// 
+	//if (_synth == 4 && chan != 0 && note == 0)
+	//	note = 1;
 
 	return true;
 }
@@ -735,7 +741,9 @@ void LoomMonkeyMacSnd::sendSoundCommands(int timeStamp) {
 					_sdrv->playNote(_musChannels[i], MacLowLevelPCMDriver::kEnqueue, note, duration);
 					// Workaround for tempo glitch in original driver. For the sampled synth in 4 channel mode, there is
 					// some sort of fix in the original (see parseNextEvent()), but that really does not work well for the other cases.
-					if (note == 0 && _curSynthType != 4)
+					// I have disabled that one (since it causes unpleasant noise) and extended this workaround to all synth modes,
+					// since it fixes the issue without having any side effect.
+					if (note == 0 /* && _curSynthType != 4*/)
 						_sdrv->wait(_musChannels[i], MacLowLevelPCMDriver::kEnqueue, duration);
 				}
 				_chanPlaying |= (1 << i);


Commit: 84062b630f8187b050e057a0f36b757c7eca1a12
    https://github.com/scummvm/scummvm/commit/84062b630f8187b050e057a0f36b757c7eca1a12
Author: athrxx (athrxx at scummvm.org)
Date: 2026-10-14T21:57:26+02:00

Commit Message:
KYRA: (LOL) - fix bug no. 17362

Changed paths:
    engines/kyra/engine/lol.cpp


diff --git a/engines/kyra/engine/lol.cpp b/engines/kyra/engine/lol.cpp
index 9094a563db5..392e4c2d9e3 100644
--- a/engines/kyra/engine/lol.cpp
+++ b/engines/kyra/engine/lol.cpp
@@ -3456,8 +3456,8 @@ int LoLEngine::battleHitSkillTest(int16 attacker, int16 target, int skill) {
 	int sk = 0;
 
 	if (attacker & 0x8000) {
-		hitChanceModifier = _monsters[target & 0x7FFF].properties->fightingStats[0];
-		sk = 100 - _monsters[target & 0x7FFF].properties->skillLevel;
+		hitChanceModifier = _monsters[attacker & 0x7FFF].properties->fightingStats[0];
+		sk = 100 - _monsters[attacker & 0x7FFF].properties->skillLevel;
 	} else {
 		hitChanceModifier = _characters[attacker].defaultModifiers[0];
 		int8 m = _characters[attacker].skillModifiers[skill];




More information about the Scummvm-git-logs mailing list