[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.25,1.26 simon.h,1.3,1.4

Travis Howell kirben at users.sourceforge.net
Thu Oct 24 00:15:03 CEST 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv19143/simon

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

add some work arounds, to allow simon 1/2 dos talkie to work, even though music and sfx aren't supported.
allow speech in simon 2 dos talkie


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- simon.cpp	23 Oct 2002 14:02:46 -0000	1.25
+++ simon.cpp	24 Oct 2002 07:14:27 -0000	1.26
@@ -86,8 +86,8 @@
 	1128 / 4,											/* MUSIC_INDEX_BASE */
 	1660 / 4,											/* SOUND_INDEX_BASE */
 	"SIMON2.GME",									/* gme_filename */
-	NULL,										/* wav_filename */
-	NULL,
+	"",										/* wav_filename */
+	"",
 	"",
 	"GAME32",											/* gamepc_filename */
 };
@@ -4720,7 +4720,10 @@
 	_mixer->stop(_voice_sound);
 	_voice_file->seek(_voice_offsets[voice], SEEK_SET);
 
-	if (!_effects_offsets) {			/* WAVE audio */
+	const char *s2 = gss->wav_filename2;
+	_music_file = new File();
+	_music_file->open(s2, _gameDataPath);
+	if (_music_file->isOpen() == false) {			/* WAVE audio */
 		WaveHeader wave_hdr;
 		uint32 data[2];
 
@@ -4806,6 +4809,14 @@
 
 			_mixer->playRaw(&_effects_sound, buffer, size, samples_per_sec, SoundMixer::FLAG_UNSIGNED);
 		} else {
+		/* FIXME: not properly implemented */
+		/* Simon 1/2 dos talkie sfx aren't supported */
+		/* Simon 2 dos sfx isn't supported */
+		const char *s2 = gss->wav_filename2;
+		_music_file = new File();
+		_music_file->open(s2, _gameDataPath);
+		if (_music_file->isOpen() == false) {
+
 			byte *p;
 
 			_mixer->stop(_playing_sound);
@@ -4833,6 +4844,7 @@
 			_mixer->playRaw(&_playing_sound, p + 8, READ_LE_UINT32(p + 4), 22050,
 											 SoundMixer::FLAG_UNSIGNED);
 		}
+		}
 	} else {
 		warning("playSound(%d)", sound);
 	}
@@ -4840,9 +4852,17 @@
 
 void SimonState::playMusic(uint music)
 {
-	midi.shutdown();
-
+	warning ("play music point reached");
 	/* FIXME: not properly implemented */
+	/* Simon 1/2 dos talkie music aren't supported */
+	/* Simon 2 dos music isn't supported */
+	const char *s2 = gss->wav_filename2;
+	_music_file = new File();
+	_music_file->open(s2, _gameDataPath);
+	if (_music_file->isOpen() == false) {
+
+	midi.shutdown();
+	
 	if (_game & GAME_WIN) {
 		_game_file->seek(_game_offsets_ptr[gss->MUSIC_INDEX_BASE + music], SEEK_SET);
 		File *f = _game_file;
@@ -4862,6 +4882,7 @@
 
 	midi.initialize();
 	midi.play();
+	}
 }
 
 byte *SimonState::dx_lock_2()

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- simon.h	16 Sep 2002 08:22:30 -0000	1.3
+++ simon.h	24 Oct 2002 07:14:28 -0000	1.4
@@ -125,6 +125,7 @@
 
 
 	File *_game_file;
+	File *_music_file;
 	File *_voice_file;
 	uint32 *_voice_offsets;
 	File *_effects_file;





More information about the Scummvm-git-logs mailing list