[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.236.2.7,1.236.2.8 sound.cpp,1.479.2.8,1.479.2.9 sound_he.cpp,2.10.2.3,2.10.2.4

kirben kirben at users.sourceforge.net
Tue Jan 17 22:37:00 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25869/scumm

Modified Files:
      Tag: branch-0-8-0
	akos.cpp sound.cpp sound_he.cpp 
Log Message:

Sound queue order is different in HE72+ games.
Fixes wrong music been played in some locations.


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.236.2.7
retrieving revision 1.236.2.8
diff -u -d -r1.236.2.7 -r1.236.2.8
--- akos.cpp	13 Jan 2006 05:47:13 -0000	1.236.2.7
+++ akos.cpp	18 Jan 2006 06:35:49 -0000	1.236.2.8
@@ -1538,7 +1538,6 @@
 			a->_flip = GW(2) != 0;
 			continue;
 		case AKC_CmdQue3:
-		case AKC_C042:
 			if (_heversion >= 61)
 				tmp = GB(2);
 			else
@@ -1662,8 +1661,11 @@
 				break;
 			}
 			continue;
+		case AKC_C042:
+			akos_queCommand(9, a, a->_sound[GB(2)], 0);
+			continue;
 		case AKC_C044:
-			akos_queCommand(3, a, a->_sound[a->getAnimVar(GB(2))], 0);
+			akos_queCommand(9, a, a->_sound[a->getAnimVar(GB(2))], 0);
 			continue;
 		case AKC_C045:
 			a->setUserCondition(GB(3), a->getAnimVar(GB(4)));
@@ -1786,6 +1788,9 @@
 			actorTalk(a->_heTalkQueue[param_1].sentence);
 
 			break;
+		case 9:
+			_sound->addSoundToQueue(param_1, 0, -1, 4);
+			break;
 		default:
 			error("akos_queCommand(%d,%d,%d,%d)", cmd, a->_number, param_1, param_2);
 		}

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.479.2.8
retrieving revision 1.479.2.9
diff -u -d -r1.479.2.8 -r1.479.2.9
--- sound.cpp	16 Jan 2006 09:54:07 -0000	1.479.2.8
+++ sound.cpp	18 Jan 2006 06:35:50 -0000	1.479.2.9
@@ -143,17 +143,33 @@
 	int snd, heOffset, heChannel, heFlags;
 	int data[16];
 
-	while (_soundQue2Pos) {
-		_soundQue2Pos--;
-		snd = _soundQue2[_soundQue2Pos].sound;
-		heOffset = _soundQue2[_soundQue2Pos].offset;
-		heChannel = _soundQue2[_soundQue2Pos].channel;
-		heFlags = _soundQue2[_soundQue2Pos].flags;
-		if (snd) {
-			if (_vm->_heversion>= 60)
-				playHESound(snd, heOffset, heChannel, heFlags);
-			else
-				playSound(snd);
+	if (_vm->_heversion >= 72) {
+		for (i = 0; i <_soundQue2Pos; i++) {
+			snd = _soundQue2[i].sound;
+			heOffset = _soundQue2[i].offset;
+			heChannel = _soundQue2[i].channel;
+			heFlags = _soundQue2[i].flags;
+			if (snd) {
+				if (_vm->_heversion>= 60)
+					playHESound(snd, heOffset, heChannel, heFlags);
+				else
+					playSound(snd);
+			}
+		}
+		_soundQue2Pos = 0;
+	} else {
+		while (_soundQue2Pos) {
+			_soundQue2Pos--;
+			snd = _soundQue2[_soundQue2Pos].sound;
+			heOffset = _soundQue2[_soundQue2Pos].offset;
+			heChannel = _soundQue2[_soundQue2Pos].channel;
+			heFlags = _soundQue2[_soundQue2Pos].flags;
+			if (snd) {
+				if (_vm->_heversion>= 60)
+					playHESound(snd, heOffset, heChannel, heFlags);
+				else
+					playSound(snd);
+			}
 		}
 	}
 

Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.10.2.3
retrieving revision 2.10.2.4
diff -u -d -r2.10.2.3 -r2.10.2.4
--- sound_he.cpp	16 Jan 2006 09:54:07 -0000	2.10.2.3
+++ sound_he.cpp	18 Jan 2006 06:35:50 -0000	2.10.2.4
@@ -416,7 +416,7 @@
 	else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK')) {
 		byte *sndPtr = ptr;
 
-		priority = *(ptr + 18);
+		priority = (soundID > _vm->_numSounds) ? 255 : *(ptr + 18);
 		rate = READ_LE_UINT16(ptr + 22);
 		ptr += 8 + READ_BE_UINT32(ptr + 12);
 
@@ -480,7 +480,7 @@
 		_currentMusic = soundID;
 		_vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID);
 	}
-	else {
+	else if (READ_UINT32(ptr) == MKID('MIDI')) {
 		if (_vm->_musicEngine) {
 			_vm->_musicEngine->startSound(soundID);
 		}





More information about the Scummvm-git-logs mailing list