[Scummvm-cvs-logs] CVS: scummvm/scumm bundle.h,1.10,1.11 sound.cpp,1.73,1.74 sound.h,1.24,1.25

Jonathan Gray khalek at users.sourceforge.net
Sun Jan 19 22:00:06 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4798

Modified Files:
	bundle.h sound.cpp sound.h 
Log Message:
patch #670660 by Daniel Schepler, properly handle disc switching wrt voice file in comi

Index: bundle.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- bundle.h	18 Jan 2003 15:54:38 -0000	1.10
+++ bundle.h	20 Jan 2003 05:59:25 -0000	1.11
@@ -44,7 +44,6 @@
 	int32 decompressCodec(int32 codec, byte *comp_input, byte *comp_output, int32 size, int32 index, int32 & channels);
 	CompTable *_compVoiceTable;
 	CompTable *_compMusicTable;
-	File _voiceFile;
 	BundleAudioTable *_bundleVoiceTable;
 	BundleAudioTable *_bundleMusicTable;
 	int32 _numVoiceFiles;
@@ -60,6 +59,7 @@
 	 ~Bundle();
 
 	File _musicFile;
+	File _voiceFile;
 	void initializeImcTables();
 	bool openVoiceFile(const char *filename, const char *directory);
 	bool openMusicFile(const char *filename, const char *directory);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- sound.cpp	18 Jan 2003 14:00:59 -0000	1.73
+++ sound.cpp	20 Jan 2003 05:59:25 -0000	1.74
@@ -1140,7 +1140,12 @@
 	if (_scumm->_gameId == GID_CMI) {
 		char voxfile[20];
 		sprintf(voxfile, "voxdisk%d.bun", _scumm->_vars[_scumm->VAR_CURRENTDISK]);
+		if (_voiceDisk != _scumm->_vars[_scumm->VAR_CURRENTDISK])
+			_scumm->_bundle->_voiceFile.close();
+
 		result = _scumm->_bundle->openVoiceFile(voxfile, _scumm->getGameDataPath());
+
+		_voiceDisk = (byte)_scumm->_vars[_scumm->VAR_CURRENTDISK];
 	} else if (_scumm->_gameId == GID_DIG)
 		result = _scumm->_bundle->openVoiceFile("digvoice.bun", _scumm->getGameDataPath());
 	else

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- sound.h	12 Jan 2003 19:50:21 -0000	1.24
+++ sound.h	20 Jan 2003 05:59:25 -0000	1.25
@@ -45,6 +45,7 @@
 	char * _nameBundleMusic;
 	char * _newNameBundleMusic;
 	byte _musicDisk;
+	byte _voiceDisk;
 	int32 _currentSampleBundleMusic;
 	int32 _numberSamplesBundleMusic;
 	int32 _offsetSampleBundleMusic;





More information about the Scummvm-git-logs mailing list