[Scummvm-cvs-logs] CVS: scummvm/scumm bundle.cpp,1.8,1.9 bundle.h,1.4,1.5 sound.cpp,1.58,1.59

James Brown ender at users.sourceforge.net
Fri Dec 27 04:11:02 CET 2002


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

Modified Files:
	bundle.cpp bundle.h sound.cpp 
Log Message:
Voice sample support, again missing a required codec 


Index: bundle.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- bundle.cpp	27 Dec 2002 12:05:29 -0000	1.8
+++ bundle.cpp	27 Dec 2002 12:10:22 -0000	1.9
@@ -204,8 +204,14 @@
 	return final_size;
 }
 
-int32 Bundle::decompressVoiceSampleByName(char *name, byte *comp_final) {
+int32 Bundle::decompressVoiceSampleByName(char *name, byte *comp_final, bool use_extended) {
 	int32 final_size = 0, i;
+	char realName[255];
+
+	if (use_extended)
+		sprintf(realName, "%s.IMX", name);
+	else
+		strcpy(realName, name);
 
 	if (_voiceFile.isOpen() == false) {
 		warning("Bundle: voice file is not open!");
@@ -213,11 +219,12 @@
 	}
 
 	for (i = 0; i < _numVoiceFiles; i++) {
-		if (!scumm_stricmp(name, _bundleVoiceTable[i].filename)) {
+		if (!scumm_stricmp(realName, _bundleVoiceTable[i].filename)) {
 			final_size = decompressVoiceSampleByIndex(i, comp_final);
 			return final_size;
 		}
 	}
+	printf("Failed finding voice %s\n", realName);
 	return final_size;
 }
 

Index: bundle.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- bundle.h	27 Dec 2002 11:47:00 -0000	1.4
+++ bundle.h	27 Dec 2002 12:10:22 -0000	1.5
@@ -58,7 +58,7 @@
 
 	bool openVoiceFile(const char *filename, const char *directory);
 	bool openMusicFile(const char *filename, const char *directory);
-	int32 decompressVoiceSampleByName(char *name, byte *comp_final);
+	int32 decompressVoiceSampleByName(char *name, byte *comp_final, bool use_extended=false);
 	int32 decompressVoiceSampleByIndex(int32 index, byte *comp_final);
 	int32 decompressMusicSampleByName(char *name, int32 number, byte *comp_final, bool fuzzy=false);
 	int32 decompressMusicSampleByIndex(int32 index, int32 number, byte *comp_final);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- sound.cpp	27 Dec 2002 11:47:00 -0000	1.58
+++ sound.cpp	27 Dec 2002 12:10:22 -0000	1.59
@@ -1128,7 +1128,7 @@
 	}
 
 	ptr = (byte *)malloc(1000000);
-	if (_scumm->_bundle->decompressVoiceSampleByName(sound, ptr) == 0) {
+	if (_scumm->_bundle->decompressVoiceSampleByName(sound, ptr, (_scumm->_gameId == GID_CMI)) == 0) {
 		delete ptr;
 		return -1;
 	}





More information about the Scummvm-git-logs mailing list