[Scummvm-git-logs] scummvm master -> ecfc1298da6d8c767c7c955b6a07fba9de111913

athrxx athrxx at scummvm.org
Wed Nov 10 20:25:57 UTC 2021


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:
c86b2bf3f4 KYRA: (LoK/Mac) - fix music track map
ecfc1298da KYRA: (LoK/Mac) - tweak save/load at final sequence start


Commit: c86b2bf3f4e9c21b6de3856c83990ba2c7bc51a3
    https://github.com/scummvm/scummvm/commit/c86b2bf3f4e9c21b6de3856c83990ba2c7bc51a3
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-10T21:24:13+01:00

Commit Message:
KYRA: (LoK/Mac) - fix music track map

Looks like an original bug to me. It would miss the track when Malcolm appears after first entering the castle.

Changed paths:
    engines/kyra/resource/staticres.cpp
    engines/kyra/sound/sound_mac_lok.cpp


diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp
index d3aa8a681f..7a8a68f7d6 100644
--- a/engines/kyra/resource/staticres.cpp
+++ b/engines/kyra/resource/staticres.cpp
@@ -1295,7 +1295,7 @@ const int8 KyraEngine_LoK::_macHQTrackMap[] = {
 	23, 40, 38, 35, 28, 21, 41, 15,
 	 3, 15, 43, 25, 33, 21, 30, 22,
 	15,  3, 33, 11, 12, 13, 14, 36,
-	36, 36,  3,  3, 44,  3,  3, 45,
+	36, 36,  3,  3,  3, 44,  3, 45,
 	 3,  3,  3,  3,  3,  3, 33,  0
 };
 
@@ -1307,9 +1307,8 @@ const int8 KyraEngine_LoK::_macLQTrackMap[] = {
 	23, 26, 26, 30, 28, 21, 21, 15,
 	 3, 15, 23, 25, 33, 21, 30, 22,
 	15,  3, 33, 11, 12, 13, 14, 22,
-	22, 22,  3,  3, 23,  3,  3, 23,
-	 3,  3,  3,  3,  3,  3, 33,  0,
-	 0,  1, 39, 26, 31, 30, 33, 33
+	22, 22,  3,  3,  3, 23,  3, 23,
+	 3,  3,  3,  3,  3,  3, 33,  0
 };
 
 const int KyraEngine_LoK::_macLQTrackMapSize = ARRAYSIZE(KyraEngine_LoK::_macLQTrackMap);
diff --git a/engines/kyra/sound/sound_mac_lok.cpp b/engines/kyra/sound/sound_mac_lok.cpp
index 4108a0bd39..739cd099ac 100644
--- a/engines/kyra/sound/sound_mac_lok.cpp
+++ b/engines/kyra/sound/sound_mac_lok.cpp
@@ -214,7 +214,7 @@ void SoundMac::playSoundEffect(uint16 track, uint8) {
 }
 
 bool SoundMac::isPlaying() const {
-	return false;
+	return _ready && _driver->doCommand(3);
 }
 
 void SoundMac::beginFadeOut() {


Commit: ecfc1298da6d8c767c7c955b6a07fba9de111913
    https://github.com/scummvm/scummvm/commit/ecfc1298da6d8c767c7c955b6a07fba9de111913
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-10T21:24:24+01:00

Commit Message:
KYRA: (LoK/Mac) - tweak save/load at final sequence start

- make sure, that the correct song starts when loading
- also fix the fading

Changed paths:
    engines/kyra/gui/saveload_lok.cpp
    engines/kyra/sound/sound_mac_lok.cpp


diff --git a/engines/kyra/gui/saveload_lok.cpp b/engines/kyra/gui/saveload_lok.cpp
index 685deefeac..16232ce82f 100644
--- a/engines/kyra/gui/saveload_lok.cpp
+++ b/engines/kyra/gui/saveload_lok.cpp
@@ -126,6 +126,10 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
 			_roomTable[sceneId].needInit[i] = in->readByte();
 		}
 	}
+
+	_sound->selectAudioResourceSet(kMusicIngame);
+	closeFinalWsa();
+
 	if (header.version >= 3) {
 		_lastMusicCommand = in->readSint16BE();
 		if (_lastMusicCommand != -1)
diff --git a/engines/kyra/sound/sound_mac_lok.cpp b/engines/kyra/sound/sound_mac_lok.cpp
index 739cd099ac..0eb67fcad6 100644
--- a/engines/kyra/sound/sound_mac_lok.cpp
+++ b/engines/kyra/sound/sound_mac_lok.cpp
@@ -227,11 +227,10 @@ void SoundMac::beginFadeOut() {
 	}
 
 	_driver->doCommand(10, 30);
-
 	while (_driver->doCommand(12) >= 16)
-		_vm->delay(4);
-
+		_vm->delay(8);
 	_driver->doCommand(2);
+	_driver->doCommand(11, 30);
 }
 
 void SoundMac::updateVolumeSettings() {




More information about the Scummvm-git-logs mailing list