[Scummvm-git-logs] scummvm branch-2-1 -> f9872c4faecbdd9259db879f8e9a405132468384

athrxx athrxx at scummvm.org
Tue Jan 14 15:23:20 UTC 2020


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

Summary:
fc4f59bfaa KYRA: (HOF) - minor sfx volume fix
f9872c4fae KYRA: (MR) - fix animation glitch (bug #11312)


Commit: fc4f59bfaabec8a21786e7ff3326f3148717b956
    https://github.com/scummvm/scummvm/commit/fc4f59bfaabec8a21786e7ff3326f3148717b956
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-14T16:22:42+01:00

Commit Message:
KYRA: (HOF) - minor sfx volume fix

(HOF has similiar volume tables as LOL for the pcm effects. This will actually reduce the loudness of the effects)

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


diff --git a/engines/kyra/engine/kyra_hof.cpp b/engines/kyra/engine/kyra_hof.cpp
index 6f303c1..c853fcb 100644
--- a/engines/kyra/engine/kyra_hof.cpp
+++ b/engines/kyra/engine/kyra_hof.cpp
@@ -1456,6 +1456,9 @@ void KyraEngine_HoF::playVoice(int high, int low) {
 }
 
 void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
+	static const uint8 volTable1[] = { 223, 159, 95, 47, 15, 0 };
+	static const uint8 volTable2[] = { 100, 75, 50, 25, 12, 0 };
+
 	if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
 		if (track == 10)
 			track = _lastSfxTrack;
@@ -1474,6 +1477,12 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
 	prio = prio <= 0 ? -prio : (prio * volume) >> 8;
 
 	if (file != -1 && _sound->useDigitalSfx()) {
+		for (int i = 0; i < 6; i++) {
+			if (volTable1[i] < volume) {
+				volume = volTable2[i];
+				break;
+			}
+		}
 		_sound->voicePlay(_ingameSoundList[file], 0, volume, prio, true);
 	} else if (_flags.platform == Common::kPlatformDOS) {
 		if (_sound->getSfxType() == Sound::kMidiMT32)
@@ -1484,7 +1493,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
 			track = track < _pcSpkSfxMapSize ? _pcSpkSfxMap[track] - 1 : -1;
 
 		if (track != -1)
-			KyraEngine_v1::snd_playSoundEffect(track);
+			KyraEngine_v1::snd_playSoundEffect(track, volume);
 	} else if (file != -1) {
 		KyraEngine_v1::snd_playSoundEffect(file);
 	}


Commit: f9872c4faecbdd9259db879f8e9a405132468384
    https://github.com/scummvm/scummvm/commit/f9872c4faecbdd9259db879f8e9a405132468384
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-14T16:22:42+01:00

Commit Message:
KYRA: (MR) - fix animation glitch (bug #11312)

Changed paths:
    engines/kyra/graphics/screen_mr.cpp


diff --git a/engines/kyra/graphics/screen_mr.cpp b/engines/kyra/graphics/screen_mr.cpp
index acb99fe..c0ed48e 100644
--- a/engines/kyra/graphics/screen_mr.cpp
+++ b/engines/kyra/graphics/screen_mr.cpp
@@ -37,13 +37,17 @@ int Screen_MR::getLayer(int x, int y) {
 		x = 0;
 	else if (x >= 320)
 		x = 319;
-	if (y < 0)
+
+	if (y < 0) {
 		y = 0;
-	else if (y >= 188)
+	} else if (y >= 188) {
 		y = 187;
-
-	if (y < _maskMinY || y > _maskMaxY)
-		return 15;
+		// The original actually limits the _maskMin/MaxY check to cases where y has already been clipped to 187.
+		// Whether this was intentional or not: Scenes actually require that we do it that way or animations may
+		// be drawn on the wrong layer (bug #11312).
+		if (y < _maskMinY || y > _maskMaxY)
+			return 15;
+	}
 
 	uint8 pixel = *(getCPagePtr(5) + y * 320 + x);
 	pixel &= 0x7F;




More information about the Scummvm-git-logs mailing list