[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.495,1.496 sound.cpp,1.80,1.81 sound.h,1.21,1.22

kirben kirben at users.sourceforge.net
Sat May 7 22:25:12 CEST 2005


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

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

Auto detect effect file type in Simon the Sorcerer 1.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.495
retrieving revision 1.496
diff -u -d -r1.495 -r1.496
--- simon.cpp	8 May 2005 02:50:26 -0000	1.495
+++ simon.cpp	8 May 2005 05:23:30 -0000	1.496
@@ -64,7 +64,7 @@
 	{"simon1amiga", "Simon the Sorcerer 1 (Amiga)", GAME_SIMON1AMIGA, "gameamiga"},
 	{"simon2dos", "Simon the Sorcerer 2 (DOS)", GAME_SIMON2DOS, "GAME32"},
 	{"simon1talkie", "Simon the Sorcerer 1 Talkie", GAME_SIMON1TALKIE, "GAMEPC"},
-	{"simon1win", "Simon the Sorcerer 1 Talkie (Windows)", GAME_SIMON1WIN, 0},
+	{"simon1win", "Simon the Sorcerer 1 Talkie (Windows)", GAME_SIMON1TALKIE, 0},
 	{"simon2talkie", "Simon the Sorcerer 2 Talkie", GAME_SIMON2TALKIE, "GSPTR30"},
 	{"simon2win", "Simon the Sorcerer 2 Talkie (Windows)", GAME_SIMON2WIN, 0},
 	{"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", GAME_SIMON2WIN, 0},
@@ -1343,7 +1343,7 @@
 
 				if (_game & GF_SIMON2) {
 					_sound->loadSfxTable(_gameFile, _gameOffsetsPtr[atoi(filename + 6) - 1 + SOUND_INDEX_BASE]);
-				} else if (_game & GF_WIN) {
+				} else {
 					memcpy(filename, "SFXXXX", 6);
 					_sound->readSfxFile(filename);
 				}

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- sound.cpp	8 May 2005 04:54:08 -0000	1.80
+++ sound.cpp	8 May 2005 05:23:31 -0000	1.81
@@ -241,6 +241,7 @@
 	_last_voice_file = 0;
 	_offsets = 0;
 
+	_effects_file = false;
 	_voice_file = false;
 	_ambient_playing = 0;
 
@@ -317,6 +318,7 @@
 		if (!_effects && gss->mp3_effects_filename && gss->mp3_effects_filename[0]) {
 			file->open(gss->mp3_effects_filename);
 			if (file->isOpen()) {
+				_effects_file = true;
 				_effects = new MP3Sound(_mixer, file);
 			}
 		}
@@ -325,6 +327,7 @@
 		if (!_effects && gss->vorbis_effects_filename && gss->vorbis_effects_filename[0]) {
 			file->open(gss->vorbis_effects_filename);
 			if (file->isOpen()) {
+				_effects_file = true;
 				_effects = new VorbisSound(_mixer, file);
 			}
 		}
@@ -333,6 +336,7 @@
 		if (!_effects && gss->flac_effects_filename && gss->flac_effects_filename[0]) {
 			file->open(gss->flac_effects_filename);
 			if (file->isOpen()) {
+				_effects_file = true;
 				_effects = new FlacSound(_mixer, file);
 			}
 		}
@@ -340,6 +344,7 @@
 		if (!_effects && gss->voc_effects_filename && gss->voc_effects_filename[0]) {
 			file->open(gss->voc_effects_filename);
 			if (file->isOpen()) {
+				_effects_file = true;
 				_effects = new VocSound(_mixer, file);
 			}
 		}
@@ -355,6 +360,9 @@
 }
 
 void Sound::readSfxFile(const char *filename) {
+	if (_effects_file)
+		return;
+
 	stopAll();
 
 	File *file = new File();

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- sound.h	6 May 2005 11:37:33 -0000	1.21
+++ sound.h	8 May 2005 05:23:31 -0000	1.22
@@ -49,6 +49,7 @@
 	SoundHandle _effects_handle;
 	SoundHandle _ambient_handle;
 
+	bool _effects_file;
 	bool _voice_file;
 	uint _ambient_playing;
 





More information about the Scummvm-git-logs mailing list