[Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.61,1.62 simon.cpp,1.425,1.426 vga.cpp,1.114,1.115

Max Horn fingolfin at users.sourceforge.net
Sat Feb 28 05:16:03 CET 2004


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

Modified Files:
	midi.cpp simon.cpp vga.cpp 
Log Message:
renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend

Index: midi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/midi.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- midi.cpp	6 Jan 2004 12:45:31 -0000	1.61
+++ midi.cpp	28 Feb 2004 12:58:11 -0000	1.62
@@ -56,7 +56,7 @@
 	// this is where we'll initialize stuff that must persist
 	// between songs.
 	_system = system;
-	_mutex = system->create_mutex();
+	_mutex = system->createMutex();
 	_driver = 0;
 	_map_mt32_to_gm = false;
 	
@@ -74,10 +74,10 @@
 }
 
 MidiPlayer::~MidiPlayer() {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	close();
-	_system->unlock_mutex(_mutex);
-	_system->delete_mutex(_mutex);
+	_system->unlockMutex(_mutex);
+	_system->deleteMutex(_mutex);
 }
 
 int MidiPlayer::open() {
@@ -94,12 +94,12 @@
 
 void MidiPlayer::close() {
 	stop();
-//	_system->lock_mutex (_mutex);
+//	_system->lockMutex (_mutex);
 	if (_driver)
 		_driver->close();
 	_driver = NULL;
 	clearConstructs();
-//	_system->unlock_mutex (_mutex);
+//	_system->unlockMutex (_mutex);
 }
 
 void MidiPlayer::send(uint32 b) {
@@ -150,9 +150,9 @@
 		// Have to unlock it before calling jump()
 		// (which locks it itself), and then relock it
 		// upon returning.
-		_system->unlock_mutex(_mutex);
+		_system->unlockMutex(_mutex);
 		startTrack (destination);
-		_system->lock_mutex(_mutex);
+		_system->lockMutex(_mutex);
 	} else {
 		stop();
 	}
@@ -160,7 +160,7 @@
 
 void MidiPlayer::onTimer (void *data) {
 	MidiPlayer *p = (MidiPlayer *) data;
-	p->_system->lock_mutex(p->_mutex);
+	p->_system->lockMutex(p->_mutex);
 	if (!p->_paused) {
 		if (p->_music.parser && p->_currentTrack != 255) {
 			p->_current = &p->_music;
@@ -172,7 +172,7 @@
 		p->_sfx.parser->onTimer();
 	}
 	p->_current = 0;
-	p->_system->unlock_mutex(p->_mutex);
+	p->_system->unlockMutex(p->_mutex);
 }
 
 void MidiPlayer::startTrack (int track) {
@@ -183,7 +183,7 @@
 		if (track >= _music.num_songs)
 			return;
 
-		_system->lock_mutex(_mutex);
+		_system->lockMutex(_mutex);
 
 		if (_music.parser) {
 			_current = &_music;
@@ -205,9 +205,9 @@
 		_currentTrack = (byte) track;
 		_music.parser = parser; // That plugs the power cord into the wall
 	} else if (_music.parser) {
-		_system->lock_mutex(_mutex);
+		_system->lockMutex(_mutex);
 		if (!_music.parser->setTrack(track)) {
-			_system->unlock_mutex(_mutex);
+			_system->unlockMutex(_mutex);
 			return;
 		}
 		_currentTrack = (byte) track;
@@ -216,18 +216,18 @@
 		_current = 0;
 	}
 
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::stop() {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	if (_music.parser) {
 		_current = &_music;
 		_music.parser->jumpToTick(0);
 	}
 	_current = 0;
 	_currentTrack = 255;
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::pause (bool b) {
@@ -235,14 +235,14 @@
 		return;
 	_paused = b;
 
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_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->unlockMutex(_mutex);
 }
 
 void MidiPlayer::set_volume (int volume) {
@@ -256,7 +256,7 @@
 	_masterVolume = volume;
 
 	// Now tell all the channels this.
-	_system->lock_mutex (_mutex);
+	_system->lockMutex (_mutex);
 	if (_driver && !_paused) {
 		for (int i = 0; i < 16; ++i) {
 			if (_music.channel[i])
@@ -265,7 +265,7 @@
 				_sfx.channel[i]->volume(_sfx.volume[i] * _masterVolume / 255);
 		}
 	}
-	_system->unlock_mutex (_mutex);
+	_system->unlockMutex (_mutex);
 }
 
 void MidiPlayer::set_driver(MidiDriver *md) {
@@ -276,27 +276,27 @@
 }
 
 void MidiPlayer::mapMT32toGM (bool map) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	_map_mt32_to_gm = map;
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::setLoop (bool loop) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	_loopTrack = loop;
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::queueTrack (int track, bool loop) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	if (_currentTrack == 255) {
-		_system->unlock_mutex(_mutex);
+		_system->unlockMutex(_mutex);
 		setLoop(loop);
 		startTrack(track);
 	} else {
 		_queuedTrack = track;
 		_loopQueuedTrack = loop;
-		_system->unlock_mutex(_mutex);
+		_system->unlockMutex(_mutex);
 	}
 }
 
@@ -351,7 +351,7 @@
 };
 
 void MidiPlayer::loadSMF (File *in, int song, bool sfx) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
 	clearConstructs (*p);
 
@@ -418,7 +418,7 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::loadMultipleSMF (File *in, bool sfx) {
@@ -431,14 +431,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->lockMutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
 	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->unlockMutex(_mutex);
 		return;
 	}
 
@@ -451,7 +451,7 @@
 		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);
+			_system->unlockMutex (_mutex);
 			return;
 		}
 		in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
@@ -476,11 +476,11 @@
 		_currentTrack = 255;
 		resetVolumeTable();
 	}
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::loadXMIDI(File *in, bool sfx) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
 	clearConstructs(*p);
 
@@ -499,7 +499,7 @@
 		}
 		if (memcmp(buf, "CAT ", 4)) {
 			warning("Could not find 'CAT ' tag to determine resource size!");
-			_system->unlock_mutex (_mutex);
+			_system->unlockMutex (_mutex);
 			return;
 		}
 		size += 4 + in->readUint32BE();
@@ -508,7 +508,7 @@
 		in->read(p->data, size);
 	} else {
 		warning("Expected 'FORM' tag but found '%c%c%c%c' instead!", buf[0], buf[1], buf[2], buf[3]);
-		_system->unlock_mutex(_mutex);
+		_system->unlockMutex(_mutex);
 		return;
 	}
 
@@ -526,18 +526,18 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 void MidiPlayer::loadS1D (File *in, bool sfx) {
-	_system->lock_mutex(_mutex);
+	_system->lockMutex(_mutex);
 	MusicInfo *p = sfx ? &_sfx : &_music;
 	clearConstructs(*p);
 
 	uint16 size = in->readUint16LE();
 	if (size != in->size() - 2) {
 		warning("Size mismatch in simon1demo MUS file (%ld versus reported %d)", (long) in->size() - 2, (int) size);
-		_system->unlock_mutex(_mutex);
+		_system->unlockMutex(_mutex);
 		return;
 	}
 
@@ -558,7 +558,7 @@
 		resetVolumeTable();
 	}
 	p->parser = parser; // That plugs the power cord into the wall
-	_system->unlock_mutex(_mutex);
+	_system->unlockMutex(_mutex);
 }
 
 } // End of namespace Simon

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.425
retrieving revision 1.426
diff -u -d -r1.425 -r1.426
--- simon.cpp	26 Feb 2004 12:05:13 -0000	1.425
+++ simon.cpp	28 Feb 2004 12:58:11 -0000	1.426
@@ -2477,9 +2477,9 @@
 		palette_fadeout((uint32 *)_video_buf_1 + 32 + 16, 144);
 		palette_fadeout((uint32 *)_video_buf_1 + 32 + 16 + 144 + 16, 48);
 
-		_system->set_palette(_video_buf_1, 0, 256);
+		_system->setPalette(_video_buf_1, 0, 256);
 		if (_fade)
-			_system->update_screen();
+			_system->updateScreen();
 		delay(5);
 	} while (--i);
 
@@ -4666,12 +4666,12 @@
 		_video_var_9 = 0;
 		if (memcmp(_palette, _palette_backup, 256 * 4) != 0) {
 			memcpy(_palette_backup, _palette, 256 * 4);
-			_system->set_palette(_palette, 0, 256);
+			_system->setPalette(_palette, 0, 256);
 		}
 	}
 
 	_system->copy_rect(_sdl_buf_attached, 320, 0, 0, 320, 200);
-	_system->update_screen();
+	_system->updateScreen();
 
 	memcpy(_sdl_buf_attached, _sdl_buf, 320 * 200);
 
@@ -4691,7 +4691,7 @@
 	if (_palette_color_count & 0x8000) {
 		fadeUpPalette();
 	} else {
-		_system->set_palette(_palette, 0, _palette_color_count);
+		_system->setPalette(_palette, 0, _palette_color_count);
 	}
 
 	_palette_color_count = 0;
@@ -4750,7 +4750,7 @@
 			src += 4;
 		}
 
-		_system->set_palette(_video_buf_1, 0, _video_num_pal_colors);
+		_system->setPalette(_video_buf_1, 0, _video_num_pal_colors);
 		delay(5);
  	} while (!done);
 }

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- vga.cpp	9 Feb 2004 05:11:54 -0000	1.114
+++ vga.cpp	28 Feb 2004 12:58:12 -0000	1.115
@@ -1727,9 +1727,9 @@
 		memcpy(_video_buf_1, _palette_backup, _video_num_pal_colors * sizeof(uint32));
 		for (i = NUM_PALETTE_FADEOUT; i != 0; --i) {
 			palette_fadeout((uint32 *)_video_buf_1, _video_num_pal_colors);
-			_system->set_palette(_video_buf_1, 0, _video_num_pal_colors);
+			_system->setPalette(_video_buf_1, 0, _video_num_pal_colors);
 			if (_fade)
-				_system->update_screen();
+				_system->updateScreen();
 			delay(5);
 		}
 





More information about the Scummvm-git-logs mailing list