[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.494,1.495 sound.cpp,1.78,1.79

kirben kirben at users.sourceforge.net
Sat May 7 19:52:06 CEST 2005


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

Modified Files:
	simon.cpp sound.cpp 
Log Message:

Fix sound regressions.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.494
retrieving revision 1.495
diff -u -d -r1.494 -r1.495
--- simon.cpp	6 May 2005 13:22:46 -0000	1.494
+++ simon.cpp	8 May 2005 02:50:26 -0000	1.495
@@ -366,28 +366,33 @@
 	}
 
 	_language = Common::parseLanguage(ConfMan.get("language"));
-	if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
-		gss = PTR(simon2win_settings);
+	if (_game & GF_SIMON2) {
+		if (_game & GF_TALKIE) {
+			gss = PTR(simon2win_settings);
 
-		// Add default file directories
-		File::addDefaultDirectory(_gameDataPath + "voices/");
-		File::addDefaultDirectory(_gameDataPath + "VOICES/");
-	} else if (_game & GF_SIMON2)
-		gss = PTR(simon2dos_settings);
-	else if (_game & GF_ACORN) {
-		gss = PTR(simon1acorn_settings);
+			// Add default file directories
+			File::addDefaultDirectory(_gameDataPath + "voices/");
+			File::addDefaultDirectory(_gameDataPath + "VOICES/");
+		} else {
+			gss = PTR(simon2dos_settings);
+		}
+	} else if (_game & GF_SIMON1) {
+		if (_game & GF_ACORN) {
+			gss = PTR(simon1acorn_settings);
 
-		// Add default file directories
-		File::addDefaultDirectory(_gameDataPath + "execute/");
-		File::addDefaultDirectory(_gameDataPath + "EXECUTE/");
-	} else if (_game & GF_AMIGA) {
-		gss = PTR(simon1amiga_settings);
-	} else if (_game & GF_DEMO)
-		gss = PTR(simon1demo_settings);
-	else
-		gss = PTR(simon1_settings);
+			// Add default file directories
+			File::addDefaultDirectory(_gameDataPath + "execute/");
+			File::addDefaultDirectory(_gameDataPath + "EXECUTE/");
+		} else if (_game & GF_AMIGA) {
+			gss = PTR(simon1amiga_settings);
+		} else if (_game & GF_DEMO) {
+			gss = PTR(simon1demo_settings);
+		} else {
+			gss = PTR(simon1_settings);
+		}
+	}
 
-	if (!(_game & GF_SIMON2) && (_game & GF_TALKIE)) {
+	if ((_game & GF_SIMON1) && (_game & GF_TALKIE)) {
 		// Add default file directories
 		switch (_language) {
 		case 20:

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- sound.cpp	6 May 2005 11:37:33 -0000	1.78
+++ sound.cpp	8 May 2005 02:50:43 -0000	1.79
@@ -292,31 +292,22 @@
 			for (int i = 1; i <= end / 6; i++) {
 				_filenums[i] = file->readUint16BE();
 				_offsets[i] = file->readUint32BE();
+			}
+			_voice_file = true;
 		}
-		_voice_file = true;
-		delete file;
 	}
 	if (!_voice && gss->wav_filename && gss->wav_filename[0]) {
-			s = gss->wav_filename;
-			file->open(s);
-			if (file->isOpen() == false) {
-				debug(0, "Can't open voice file %s", s);
-				delete file;
-			} else	{
-				_voice_file = true;
-				_voice = new WavSound(_mixer, file);
-			}
+		file->open(gss->wav_filename);
+		if (file->isOpen()) {
+			_voice_file = true;
+			_voice = new WavSound(_mixer, file);
+		}
 	}
 	if (!_voice && gss->voc_filename && gss->voc_filename[0]) {
-			s = gss->voc_filename;
-			file->open(s);
-			if (file->isOpen() == false) {
-				debug(0, "Can't open voice file %s", s);
-				delete file;
-			} else {
-				_voice_file = true;
-				_voice = new VocSound(_mixer, file);
-			}
+		file->open(gss->voc_filename);
+		if (file->isOpen()) {
+			_voice_file = true;
+			_voice = new VocSound(_mixer, file);
 		}
 	}
 
@@ -350,7 +341,7 @@
 			s = gss->voc_effects_filename;
 			file->open(s);
 			if (file->isOpen() == false) {
-				warning("Can't open effects file %s", s);
+				debug(0, "Can't open effects file %s", s);
 			} else {
 				_effects = new VocSound(_mixer, file);
 			}





More information about the Scummvm-git-logs mailing list