[Scummvm-cvs-logs] scummvm master -> 8d1b07f0543372ee6923b87ba562f975681cc760

athrxx athrxx at scummvm.org
Mon Dec 5 23:00:38 CET 2011


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

Summary:
8d1b07f054 SCUMM: fix minor bug in FM-TOWNS sound code


Commit: 8d1b07f0543372ee6923b87ba562f975681cc760
    https://github.com/scummvm/scummvm/commit/8d1b07f0543372ee6923b87ba562f975681cc760
Author: athrxx (athrxx at scummvm.org)
Date: 2011-12-05T13:59:33-08:00

Commit Message:
SCUMM: fix minor bug in FM-TOWNS sound code

(multi channel pcm sounds did not get restored correctly after loading a save file)

Changed paths:
    engines/scumm/player_towns.cpp



diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index f6f493a..2588026 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -75,10 +75,19 @@ void Player_Towns::saveLoadWithSerializer(Serializer *ser) {
 }
 
 void Player_Towns::restoreAfterLoad() {
+	Common::Array<uint16> restoredSounds;
+
 	for (int i = 1; i < 9; i++) {
 		if (!_pcmCurrentSound[i].index || _pcmCurrentSound[i].index == 0xffff)
 			continue;
 
+		// Don't restart multichannel sounds more than once
+		if (Common::find(restoredSounds.begin(), restoredSounds.end(), _pcmCurrentSound[i].index) != restoredSounds.end())
+			continue;
+
+		if (!_v2)
+			restoredSounds.push_back(_pcmCurrentSound[i].index);
+		
 		uint8 *ptr = _vm->getResourceAddress(rtSound, _pcmCurrentSound[i].index);
 		if (!ptr)
 			continue;






More information about the Scummvm-git-logs mailing list