[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.26,1.27

Robert G?ffringmann lavosspawn at users.sourceforge.net
Sat Jul 12 23:05:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv9614/sky

Modified Files:
	sound.cpp 
Log Message:
sound support for v.0.0109

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- sound.cpp	12 Jul 2003 01:12:00 -0000	1.26
+++ sound.cpp	13 Jul 2003 06:04:39 -0000	1.27
@@ -1070,12 +1070,24 @@
 
 	if (_soundData) free(_soundData);
 	_soundData = _skyDisk->loadFile(pSection * 4 + SOUND_FILE_BASE, NULL);
-	if ((_soundData[0x7E] != 0x3C) || (_soundData[0xA5] != 0x8D) || (_soundData[0xA6] != 0x1E) ||
-		(_soundData[0xAD] != 0x8D) || (_soundData[0xAE] != 0x36))
-		error("Unknown sounddriver version!\n");
-	_soundsTotal = _soundData[0x7F];
-	uint16 sRateTabOfs = (_soundData[0xA8] << 8) | _soundData[0xA7];
-	_sfxBaseOfs = (_soundData[0xB0] << 8) | _soundData[0xAF];
+	uint16 asmOfs;
+	if (SkyState::_systemVars.gameVersion == 109) {
+		if (pSection == 0)
+			asmOfs = 0x78;
+		else
+			asmOfs = 0x7C;
+	} else
+		asmOfs = 0x7E;
+
+	if ((_soundData[asmOfs] != 0x3C) || (_soundData[asmOfs + 0x27] != 0x8D) ||
+		(_soundData[asmOfs + 0x28] != 0x1E) || (_soundData[asmOfs + 0x2F] != 0x8D) ||
+		(_soundData[asmOfs + 0x30] != 0x36))
+			error("Unknown sounddriver version!\n");
+
+	_soundsTotal = _soundData[asmOfs + 1];
+	uint16 sRateTabOfs = (_soundData[asmOfs + 0x2A] << 8) | _soundData[asmOfs + 0x29];
+	_sfxBaseOfs = (_soundData[asmOfs + 0x32] << 8) | _soundData[asmOfs + 0x31];
+
 	_sampleRates = _soundData + sRateTabOfs;
 	_sfxInfo = _soundData + _sfxBaseOfs;
 	for (uint8 cnt = 0; cnt < 4; cnt++)





More information about the Scummvm-git-logs mailing list