[Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.57,1.58 midiparser_s1d.cpp,1.5,1.6 res.cpp,1.24,1.25 simon.cpp,1.298,1.299 vga.cpp,1.80,1.81

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Sep 23 23:32:10 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv10375

Modified Files:
	midi.cpp midiparser_s1d.cpp res.cpp simon.cpp vga.cpp 
Log Message:
Whitespace changes


Index: midi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/midi.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- midi.cpp	11 Aug 2003 05:25:33 -0000	1.57
+++ midi.cpp	24 Sep 2003 06:31:42 -0000	1.58
@@ -49,7 +49,7 @@
 
 
 
-MidiPlayer::MidiPlayer (OSystem *system) {
+MidiPlayer::MidiPlayer(OSystem *system) {
 	// Since initialize() is called every time the music changes,
 	// this is where we'll initialize stuff that must persist
 	// between songs.
@@ -72,10 +72,10 @@
 }
 
 MidiPlayer::~MidiPlayer() {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	close();
-	_system->unlock_mutex (_mutex);
-	_system->delete_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
+	_system->delete_mutex(_mutex);
 }
 
 int MidiPlayer::open() {
@@ -86,7 +86,7 @@
 	int ret = _driver->open();
 	if (ret)
 		return ret;
-	_driver->setTimerCallback (this, &onTimer);
+	_driver->setTimerCallback(this, &onTimer);
 	return 0;
 }
 
@@ -100,7 +100,7 @@
 //	_system->unlock_mutex (_mutex);
 }
 
-void MidiPlayer::send (uint32 b) {
+void MidiPlayer::send(uint32 b) {
 	if (!_current)
 		return;
 
@@ -108,22 +108,22 @@
 	if ((b & 0xFFF0) == 0x07B0) {
 		// Adjust volume changes by master volume.
 		byte volume = (byte) ((b >> 16) & 0x7F);
-		_current->volume [channel] = volume;
+		_current->volume[channel] = volume;
 		volume = volume * _masterVolume / 255;
 		b = (b & 0xFF00FFFF) | (volume << 16);
 	} else if ((b & 0xF0) == 0xC0 && _map_mt32_to_gm) {
-		b = (b & 0xFFFF00FF) | (mt32_to_gm [(b >> 8) & 0xFF] << 8);
+		b = (b & 0xFFFF00FF) | (mt32_to_gm[(b >> 8) & 0xFF] << 8);
 	} else if ((b & 0xFFF0) == 0x007BB0) {
 		// Only respond to an All Notes Off if this channel
 		// has already been allocated.
-		if (!_current->channel [b & 0x0F])
+		if (!_current->channel[b & 0x0F])
 			return;
 	}
 
-	if (!_current->channel [channel])
+	if (!_current->channel[channel])
 		_current->channel[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
-	if (_current->channel [channel])
-		_current->channel[channel]->send (b);
+	if (_current->channel[channel])
+		_current->channel[channel]->send(b);
 }
 
 void MidiPlayer::metaEvent (byte type, byte *data, uint16 length) {
@@ -131,9 +131,9 @@
 	if (!_current || type != 0x2F) {
 		return;
 	} else if (_current == &_sfx) {
-		clearConstructs (_sfx);
+		clearConstructs(_sfx);
 	} else if (_loopTrack) {
-		_current->parser->jumpToTick (0);
+		_current->parser->jumpToTick(0);
 	} else if (_queuedTrack != 255) {
 		_currentTrack = 255;
 		byte destination = _queuedTrack;
@@ -145,9 +145,9 @@
 		// Have to unlock it before calling jump()
 		// (which locks it itself), and then relock it
 		// upon returning.
-		_system->unlock_mutex (_mutex);
+		_system->unlock_mutex(_mutex);
 		startTrack (destination);
-		_system->lock_mutex (_mutex);
+		_system->lock_mutex(_mutex);
 	} else {
 		stop();
 	}
@@ -155,7 +155,7 @@
 
 void MidiPlayer::onTimer (void *data) {
 	MidiPlayer *p = (MidiPlayer *) data;
-	p->_system->lock_mutex (p->_mutex);
+	p->_system->lock_mutex(p->_mutex);
 	if (!p->_paused) {
 		if (p->_music.parser && p->_currentTrack != 255) {
 			p->_current = &p->_music;
@@ -167,7 +167,7 @@
 		p->_sfx.parser->onTimer();
 	}
 	p->_current = 0;
-	p->_system->unlock_mutex (p->_mutex);
+	p->_system->unlock_mutex(p->_mutex);
 }
 
 void MidiPlayer::startTrack (int track) {
@@ -178,7 +178,7 @@
 		if (track >= _music.num_songs)
 			return;
 
-		_system->lock_mutex (_mutex);
+		_system->lock_mutex(_mutex);
 
 		if (_music.parser) {
 			_current = &_music;
@@ -200,29 +200,29 @@
 		_currentTrack = (byte) track;
 		_music.parser = parser; // That plugs the power cord into the wall
 	} else if (_music.parser) {
-		_system->lock_mutex (_mutex);
-		if (!_music.parser->setTrack (track)) {
-			_system->unlock_mutex (_mutex);
+		_system->lock_mutex(_mutex);
+		if (!_music.parser->setTrack(track)) {
+			_system->unlock_mutex(_mutex);
 			return;
 		}
 		_currentTrack = (byte) track;
 		_current = &_music;
-		_music.parser->jumpToTick (0);
+		_music.parser->jumpToTick(0);
 		_current = 0;
 	}
 
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::stop() {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	if (_music.parser) {
 		_current = &_music;
 		_music.parser->jumpToTick(0);
 	}
 	_current = 0;
 	_currentTrack = 255;
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::pause (bool b) {
@@ -230,14 +230,14 @@
 		return;
 	_paused = b;
 
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	for (int i = 0; i < 16; ++i) {
 		if (_music.channel[i])
 			_music.channel[i]->volume (_paused ? 0 : (_music.volume[i] * _masterVolume / 255));
 		if (_sfx.channel[i])
 			_sfx.channel[i]->volume (_paused ? 0 : (_sfx.volume[i] * _masterVolume / 255));
 	}
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::set_volume (int volume) {
@@ -255,9 +255,9 @@
 	if (_driver && !_paused) {
 		for (int i = 0; i < 16; ++i) {
 			if (_music.channel[i])
-				_music.channel[i]->volume (_music.volume[i] * _masterVolume / 255);
+				_music.channel[i]->volume(_music.volume[i] * _masterVolume / 255);
 			if (_sfx.channel[i])
-				_sfx.channel[i]->volume (_sfx.volume[i] * _masterVolume / 255);
+				_sfx.channel[i]->volume(_sfx.volume[i] * _masterVolume / 255);
 		}
 	}
 	_system->unlock_mutex (_mutex);
@@ -271,45 +271,45 @@
 }
 
 void MidiPlayer::mapMT32toGM (bool map) {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	_map_mt32_to_gm = map;
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::setLoop (bool loop) {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	_loopTrack = loop;
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::queueTrack (int track, bool loop) {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	if (_currentTrack == 255) {
-		_system->unlock_mutex (_mutex);
-		setLoop (loop);
-		startTrack (track);
+		_system->unlock_mutex(_mutex);
+		setLoop(loop);
+		startTrack(track);
 	} else {
 		_queuedTrack = track;
 		_loopQueuedTrack = loop;
-		_system->unlock_mutex (_mutex);
+		_system->unlock_mutex(_mutex);
 	}
 }
 
 void MidiPlayer::clearConstructs() {
-	clearConstructs (_music);
-	clearConstructs (_sfx);
+	clearConstructs(_music);
+	clearConstructs(_sfx);
 }
 
-void MidiPlayer::clearConstructs (MusicInfo &info) {
+void MidiPlayer::clearConstructs(MusicInfo &info) {
 	int i;
 	if (info.num_songs > 0) {
 		for (i = 0; i < info.num_songs; ++i)
-			free (info.songs [i]);
+			free (info.songs[i]);
 		info.num_songs = 0;
 	}
 
 	if (info.data) {
-		free (info.data);
+		free(info.data);
 		info.data = 0;
 	} // end if
 
@@ -346,15 +346,15 @@
 };
 
 void MidiPlayer::loadSMF (File *in, int song, bool sfx) {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
 	clearConstructs (*p);
 
 	uint32 startpos = in->pos();
 	byte header[4];
-	in->read (header, 4);
+	in->read(header, 4);
 	bool isGMF = !memcmp (header, "GMF\x1", 4);
-	in->seek (startpos, SEEK_SET);
+	in->seek(startpos, SEEK_SET);
 
 	uint32 size = in->size() - in->pos();
 	if (isGMF) {
@@ -363,29 +363,29 @@
 			// but each one is referenced by a pointer at the
 			// beginning of the file. Those pointers can be used
 			// to determine file size.
-			in->seek (0, SEEK_SET);
+			in->seek(0, SEEK_SET);
 			uint16 value = in->readUint16LE() >> 2; // Number of resources
 			if (song != value - 1) {
-				in->seek (song * 2 + 2, SEEK_SET);
+				in->seek(song * 2 + 2, SEEK_SET);
 				value = in->readUint16LE();
 				size = value - startpos;
 			}
-			in->seek (startpos, SEEK_SET);
+			in->seek(startpos, SEEK_SET);
 		} else if (size >= 64000) {
 			// For GMF resources not in separate
 			// files, we're going to have to use
 			// hardcoded size tables.
-			size = simon1_gmf_size [song];
+			size = simon1_gmf_size[song];
 		}
 	}
 
 	// When allocating space, add 4 bytes in case
 	// this is a GMF and we have to tack on our own
 	// End of Track event.
-	p->data = (byte *) calloc (size + 4, 1);
-	in->read (p->data, size);
+	p->data = (byte *) calloc(size + 4, 1);
+	in->read(p->data, size);
 
-	if (!memcmp (p->data, "GMF\x1", 4)) {
+	if (!memcmp(p->data, "GMF\x1", 4)) {
 		// BTW, here's what we know about the GMF header,
 		// the 7 bytes preceding the actual MIDI events.
 		// 3 BYTES: 'GMF'
@@ -394,15 +394,15 @@
 		// 1 BYTE : Ranges from 0x02 to 0x08 (always 0x02 for SFX, though)
 		// 1 BYTE : Loop control. 0 = no loop, 1 = loop
 		if (!sfx)
-			setLoop (p->data[6] != 0);
+			setLoop(p->data[6] != 0);
 
 	}
 
 	MidiParser *parser = MidiParser::createParser_SMF();
-	parser->property (MidiParser::mpMalformedPitchBends, 1);
-	parser->setMidiDriver (this);
-	parser->setTimerRate (_driver->getBaseTempo());
-	if (!parser->loadMusic (p->data, size)) {
+	parser->property(MidiParser::mpMalformedPitchBends, 1);
+	parser->setMidiDriver(this);
+	parser->setTimerRate(_driver->getBaseTempo());
+	if (!parser->loadMusic(p->data, size)) {
 		printf ("Error reading track!\n");
 		delete parser;
 		parser = 0;
@@ -413,7 +413,7 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::loadMultipleSMF (File *in, bool sfx) {
@@ -426,14 +426,14 @@
 	// We need to load ALL the songs and then
 	// treat them as separate tracks -- for the
 	// purpose of jumps, anyway.
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
-	clearConstructs (*p);
+	clearConstructs(*p);
 
 	p->num_songs = in->readByte();
 	if (p->num_songs > 16) {
 		printf ("playMultipleSMF: %d is too many songs to keep track of!\n", (int) p->num_songs);
-		_system->unlock_mutex (_mutex);
+		_system->unlock_mutex(_mutex);
 		return;
 	}
 
@@ -443,27 +443,27 @@
 		uint32 pos = in->pos();
 
 		// Make sure there's a MThd
-		in->read (buf, 4);
+		in->read(buf, 4);
 		if (memcmp (buf, "MThd", 4)) {
 			printf ("Expected MThd but found '%c%c%c%c' instead!\n", buf[0], buf[1], buf[2], buf[3]);
 			_system->unlock_mutex (_mutex);
 			return;
 		}
-		in->seek (in->readUint32BE() + in->pos(), SEEK_SET);
+		in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
 
 		// Now skip all the MTrk blocks
 		while (true) {
 			in->read (buf, 4);
-			if (memcmp (buf, "MTrk", 4))
+			if (memcmp(buf, "MTrk", 4))
 				break;
-			in->seek (in->readUint32BE() + in->pos(), SEEK_SET);
+			in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
 		}
 
 		uint32 pos2 = in->pos() - 4;
 		uint32 size = pos2 - pos;
-		p->songs[i] = (byte *) calloc (size, 1);
-		in->seek (pos, SEEK_SET);
-		in->read (p->songs[i], size);
+		p->songs[i] = (byte *) calloc(size, 1);
+		in->seek(pos, SEEK_SET);
+		in->read(p->songs[i], size);
 		p->song_sizes[i] = size;
 	}
 
@@ -471,47 +471,47 @@
 		_currentTrack = 255;
 		resetVolumeTable();
 	}
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
-void MidiPlayer::loadXMIDI (File *in, bool sfx) {
-	_system->lock_mutex (_mutex);
+void MidiPlayer::loadXMIDI(File *in, bool sfx) {
+	_system->lock_mutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
-	clearConstructs (*p);
+	clearConstructs(*p);
 
 	char buf[4];
 	uint32 pos = in->pos();
 	uint32 size = 4;
-	in->read (buf, 4);
-	if (!memcmp (buf, "FORM", 4)) {
+	in->read(buf, 4);
+	if (!memcmp(buf, "FORM", 4)) {
 		int i;
 		for (i = 0; i < 16; ++i) {
-			if (!memcmp (buf, "CAT ", 4))
+			if (!memcmp(buf, "CAT ", 4))
 				break;
 			size += 2;
-			memcpy (buf, &buf[2], 2);
-			in->read (&buf[2], 2);
+			memcpy(buf, &buf[2], 2);
+			in->read(&buf[2], 2);
 		}
-		if (memcmp (buf, "CAT ", 4)) {
-			printf ("ERROR! Could not find 'CAT ' tag to determine resource size!\n");
+		if (memcmp(buf, "CAT ", 4)) {
+			warning("Could not find 'CAT ' tag to determine resource size!");
 			_system->unlock_mutex (_mutex);
 			return;
 		}
 		size += 4 + in->readUint32BE();
-		in->seek (pos, 0);
-		p->data = (byte *) calloc (size, 1);
-		in->read (p->data, size);
+		in->seek(pos, 0);
+		p->data = (byte *) calloc(size, 1);
+		in->read(p->data, size);
 	} else {
-		printf ("ERROR! Expected 'FORM' tag but found '%c%c%c%c' instead!\n", buf[0], buf[1], buf[2], buf[3]);
-		_system->unlock_mutex (_mutex);
+		warning("Expected 'FORM' tag but found '%c%c%c%c' instead!", buf[0], buf[1], buf[2], buf[3]);
+		_system->unlock_mutex(_mutex);
 		return;
 	}
 
 	MidiParser *parser = MidiParser::createParser_XMIDI();
-	parser->setMidiDriver (this);
-	parser->setTimerRate (_driver->getBaseTempo());
-	if (!parser->loadMusic (p->data, size)) {
-		printf ("Error reading track!\n");
+	parser->setMidiDriver(this);
+	parser->setTimerRate(_driver->getBaseTempo());
+	if (!parser->loadMusic(p->data, size)) {
+		warning("Error reading track!");
 		delete parser;
 		parser = 0;
 	}
@@ -521,29 +521,29 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }
 
 void MidiPlayer::loadS1D (File *in, bool sfx) {
-	_system->lock_mutex (_mutex);
+	_system->lock_mutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
-	clearConstructs (*p);
+	clearConstructs(*p);
 
 	uint16 size = in->readUint16LE();
 	if (size != in->size() - 2) {
-		printf ("ERROR! Size mismatch in simon1demo MUS file (%ld versus reported %d)\n", (long) in->size() - 2, (int) size);
-		_system->unlock_mutex (_mutex);
+		warning("Size mismatch in simon1demo MUS file (%ld versus reported %d)", (long) in->size() - 2, (int) size);
+		_system->unlock_mutex(_mutex);
 		return;
 	}
 
-	p->data = (byte *) calloc (size, 1);
-	in->read (p->data, size);
+	p->data = (byte *) calloc(size, 1);
+	in->read(p->data, size);
 
 	MidiParser *parser = MidiParser_createS1D();
-	parser->setMidiDriver (this);
-	parser->setTimerRate (_driver->getBaseTempo());
-	if (!parser->loadMusic (p->data, size)) {
-		printf ("Error reading track!\n");
+	parser->setMidiDriver(this);
+	parser->setTimerRate(_driver->getBaseTempo());
+	if (!parser->loadMusic(p->data, size)) {
+		warning("Error reading track!");
 		delete parser;
 		parser = 0;
 	}
@@ -553,5 +553,5 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex (_mutex);
+	_system->unlock_mutex(_mutex);
 }

Index: midiparser_s1d.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/midiparser_s1d.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- midiparser_s1d.cpp	10 Aug 2003 20:57:41 -0000	1.5
+++ midiparser_s1d.cpp	24 Sep 2003 06:31:42 -0000	1.6
@@ -40,12 +40,12 @@
 protected:
 	void parseNextEvent (EventInfo &info);
 	void resetTracking();
-	uint32 readVLQ2 (byte * &data);
+	uint32 readVLQ2(byte * &data);
 
 public:
 	MidiParser_S1D() : _data(0), _no_delta(false) {}
 
-	bool loadMusic (byte *data, uint32 size);
+	bool loadMusic(byte *data, uint32 size);
 };
 
 
@@ -64,7 +64,7 @@
 
 // The VLQs for simon1demo seem to be
 // in Little Endian format.
-uint32 MidiParser_S1D::readVLQ2 (byte * &data) {
+uint32 MidiParser_S1D::readVLQ2(byte * &data) {
 	byte str;
 	uint32 value = 0;
 	int i;
@@ -79,9 +79,9 @@
 	return value;
 }
 
-void MidiParser_S1D::parseNextEvent (EventInfo &info) {
+void MidiParser_S1D::parseNextEvent(EventInfo &info) {
 	info.start = _position._play_pos;
-	info.delta = _no_delta ? 0 : readVLQ2 (_position._play_pos);
+	info.delta = _no_delta ? 0 : readVLQ2(_position._play_pos);
 
 	_no_delta = false;
 	info.event = *(_position._play_pos++);
@@ -127,7 +127,7 @@
 	}
 }
 
-bool MidiParser_S1D::loadMusic (byte *data, uint32 size) {
+bool MidiParser_S1D::loadMusic(byte *data, uint32 size) {
 	unloadMusic();
 
 	byte *pos = data;
@@ -149,8 +149,8 @@
 	// will persist beyond this call, i.e. we do NOT
 	// copy the data to our own buffer. Take warning....
 	resetTracking();
-	setTempo (500000);
-	setTrack (0);
+	setTempo(500000);
+	setTrack(0);
 	return true;
 }
 

Index: res.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/res.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- res.cpp	24 Sep 2003 06:19:30 -0000	1.24
+++ res.cpp	24 Sep 2003 06:31:42 -0000	1.25
@@ -353,7 +353,6 @@
 			*ptr++ = val >> 8;
 			*ptr++ = val & 255;
 			break;
-
 		default:
 			error("Bad cmd table entry %c", l);
 		}

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -d -r1.298 -r1.299
--- simon.cpp	24 Sep 2003 06:19:30 -0000	1.298
+++ simon.cpp	24 Sep 2003 06:31:42 -0000	1.299
@@ -3387,73 +3387,63 @@
 
 void SimonEngine::processSpecialKeys() {
 	switch (_key_pressed) {
-		case 27: // escape
+	case 27: // escape
+		_exit_cutscene = true;
+		break;
+	case 59: // F1
+		vc_write_var(5, 50);
+		vc_write_var(86, 0);
+		break;
+	case 60: // F2
+		vc_write_var(5, 75);
+		vc_write_var(86, 1);
+		break;
+	case 61: // F3
+		vc_write_var(5, 125);
+		vc_write_var(86, 2);
+		break;
+	case 63: // F5
+		if (_game & GF_SIMON2)
 			_exit_cutscene = true;
-			break;
-
-		case 59: // F1
-			vc_write_var(5, 50);
-			vc_write_var(86, 0);
-			break;
-		case 60: // F2
-			vc_write_var(5, 75);
-			vc_write_var(86, 1);
-			break;
-		case 61: // F3
-			vc_write_var(5, 125);
-			vc_write_var(86, 2);
-			break;
-		case 63: // F5
-			if (_game & GF_SIMON2)
-				_exit_cutscene = true;
-			break;
-
-		case 't':
-			if (_game & GF_SIMON2 && _game & GF_TALKIE || _game & GF_TALKIE && _language > 1)
-				_subtitles ^= 1;
-			break;
-
-		case '+':
-			midi.set_volume(midi.get_volume() + 16);
-			break;
-
-		case '-':
-			midi.set_volume(midi.get_volume() - 16);
-			break;
-
-		case 'm':
-			midi.pause(_music_paused ^= 1);
-			break;
-
-		case 's':
-			if (_game == GAME_SIMON1DOS)
-				midi._enable_sfx ^= 1;
-			else
-				_sound->effectsPause(_effects_paused ^= 1);
-			break;
-
-		case 'b':
-			_sound->ambientPause(_ambient_paused ^= 1);
-			break;
-
-		case 'r':
-			if (_debugMode)
-				_start_mainscript ^= 1;
-			break;
-
-		case 'o':
-			if (_debugMode)
-				_continous_mainscript ^= 1;
-			break;
-
-		case 'v':
-			if (_debugMode)
-				_continous_vgascript ^= 1;
-			break;
-		case 'i':
-			if (_debugMode)
-				_draw_images_debug ^= 1;
-			break;
+		break;
+	case 't':
+		if (_game & GF_SIMON2 && _game & GF_TALKIE || _game & GF_TALKIE && _language > 1)
+			_subtitles ^= 1;
+		break;
+	case '+':
+		midi.set_volume(midi.get_volume() + 16);
+		break;
+	case '-':
+		midi.set_volume(midi.get_volume() - 16);
+		break;
+	case 'm':
+		midi.pause(_music_paused ^= 1);
+		break;
+	case 's':
+		if (_game == GAME_SIMON1DOS)
+			midi._enable_sfx ^= 1;
+		else
+			_sound->effectsPause(_effects_paused ^= 1);
+		break;
+	case 'b':
+		_sound->ambientPause(_ambient_paused ^= 1);
+		break;
+	case 'r':
+		if (_debugMode)
+			_start_mainscript ^= 1;
+		break;
+	case 'o':
+		if (_debugMode)
+			_continous_mainscript ^= 1;
+		break;
+	case 'v':
+		if (_debugMode)
+			_continous_vgascript ^= 1;
+		break;
+	case 'i':
+		if (_debugMode)
+			_draw_images_debug ^= 1;
+		break;
 	}
 	
 	_key_pressed = 0;
@@ -4565,45 +4555,40 @@
 
 		while (_system->poll_event(&event)) {
 			switch (event.event_code) {
-				case OSystem::EVENT_KEYDOWN:
-					if (event.kbd.flags==OSystem::KBD_CTRL) {
-						if (event.kbd.keycode == 'f')
-							_fast_mode ^= 1;
-					}
-					// Make sure backspace works right (this fixes a small issue on OS X)
-					if (event.kbd.keycode == 8)
-						_key_pressed = 8;
-					else
-						_key_pressed = (byte)event.kbd.ascii;
-					break;
-
-				case OSystem::EVENT_MOUSEMOVE:
-					_sdl_mouse_x = event.mouse.x;
-					_sdl_mouse_y = event.mouse.y;
-					break;
-
-					case OSystem::EVENT_LBUTTONDOWN:
-					_left_button_down++;
+			case OSystem::EVENT_KEYDOWN:
+				if (event.kbd.flags==OSystem::KBD_CTRL) {
+					if (event.kbd.keycode == 'f')
+						_fast_mode ^= 1;
+				}
+				// Make sure backspace works right (this fixes a small issue on OS X)
+				if (event.kbd.keycode == 8)
+					_key_pressed = 8;
+				else
+					_key_pressed = (byte)event.kbd.ascii;
+				break;
+			case OSystem::EVENT_MOUSEMOVE:
+				_sdl_mouse_x = event.mouse.x;
+				_sdl_mouse_y = event.mouse.y;
+				break;
+			case OSystem::EVENT_LBUTTONDOWN:
+				_left_button_down++;
 #ifdef _WIN32_WCE
-					_sdl_mouse_x = event.mouse.x;
-					_sdl_mouse_y = event.mouse.y;
+				_sdl_mouse_x = event.mouse.x;
+				_sdl_mouse_y = event.mouse.y;
 #endif
-					break;
-
-				case OSystem::EVENT_RBUTTONDOWN:
-					if (_game & GF_SIMON2)
- 						_skip_speech = true;
-					else
-						_exit_cutscene = true;
- 					break;
-
-				case OSystem::EVENT_QUIT:
-					shutdown();
-					return;
-					break;
-				
-				default:
-					break;
+				break;
+			case OSystem::EVENT_RBUTTONDOWN:
+				if (_game & GF_SIMON2)
+					_skip_speech = true;
+				else
+					_exit_cutscene = true;
+				break;
+			case OSystem::EVENT_QUIT:
+				shutdown();
+				return;
+				break;
+			default:
+				break;
 			}
 		}
 

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- vga.cpp	30 Aug 2003 20:35:07 -0000	1.80
+++ vga.cpp	24 Sep 2003 06:31:42 -0000	1.81
@@ -1838,8 +1838,8 @@
 	// specifying a non-valid track number (999 or -1)
 	// as a means of stopping what music is currently
 	// playing.
-	midi.setLoop (loop != 0);
-	midi.startTrack (track);
+	midi.setLoop(loop != 0);
+	midi.startTrack(track);
 }
 
 void SimonEngine::vc_70_queue_music() {
@@ -1853,9 +1853,9 @@
 	// track and, if not, whether to switch to
 	// a different track upon completion.
 	if (track != 0xFFFF && track != 999)
-		midi.queueTrack (track, loop != 0);
+		midi.queueTrack(track, loop != 0);
 	else
-		midi.setLoop (loop != 0);
+		midi.setLoop(loop != 0);
 }
 
 void SimonEngine::vc_71_check_music_queue() {





More information about the Scummvm-git-logs mailing list