[Scummvm-cvs-logs] SF.net SVN: scummvm: [21748] scummvm/trunk/engines/simon

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Apr 10 00:14:01 CEST 2006


Revision: 21748
Author:   eriktorbjorn
Date:     2006-04-10 00:13:21 -0700 (Mon, 10 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21748&view=rev

Log Message:
-----------
Merged o_playMusic() into o1_playTune().

Modified Paths:
--------------
    scummvm/trunk/engines/simon/items.cpp
    scummvm/trunk/engines/simon/simon.h
Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp	2006-04-10 07:09:03 UTC (rev 21747)
+++ scummvm/trunk/engines/simon/items.cpp	2006-04-10 07:13:21 UTC (rev 21748)
@@ -1053,7 +1053,32 @@
 
 void SimonEngine::o1_playTune() {
 	// 127: deals with music
-	o_playMusic();
+	int music = getVarOrWord();
+	int track = getVarOrWord();
+
+	// Jamieson630:
+	// This appears to be a "load or play music" command.
+	// The music resource is specified, and optionally
+	// a track as well. Normally we see two calls being
+	// made, one to load the resource and another to
+	// actually start a track (so the resource is
+	// effectively preloaded so there's no latency when
+	// starting playback).
+	if (getGameType() == GType_SIMON2) {
+		int loop = getVarOrByte();
+
+		midi.setLoop(loop != 0);
+		if (_lastMusicPlayed != music)
+			_nextMusicToPlay = music;
+		else
+			midi.startTrack(track);
+	} else {
+		if (music != _lastMusicPlayed) {
+			_lastMusicPlayed = music;
+			loadMusic(music);
+			midi.startTrack(track);
+		}
+	}
 }
 
 void SimonEngine::o1_waitEndTune() {
@@ -1939,35 +1964,6 @@
 	_vgaBufStart = _vgaFileBufOrg;
 }
 
-void SimonEngine::o_playMusic() {
-	int music = getVarOrWord();
-	int track = getVarOrWord();
-
-	// Jamieson630:
-	// This appears to be a "load or play music" command.
-	// The music resource is specified, and optionally
-	// a track as well. Normally we see two calls being
-	// made, one to load the resource and another to
-	// actually start a track (so the resource is
-	// effectively preloaded so there's no latency when
-	// starting playback).
-	if (getGameType() == GType_SIMON2) {
-		int loop = getVarOrByte();
-
-		midi.setLoop (loop != 0);
-		if (_lastMusicPlayed != music)
-			_nextMusicToPlay = music;
-		else
-			midi.startTrack (track);
-	} else {
-		if (music != _lastMusicPlayed) {
-			_lastMusicPlayed = music;
-			loadMusic (music);
-			midi.startTrack (track);
-		}
-	}
-}
-
 void SimonEngine::o_sync(uint a) {
 	uint16 id = to16Wrapper(a);
 	_lockWord |= 0x8000;

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-10 07:09:03 UTC (rev 21747)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-10 07:13:21 UTC (rev 21748)
@@ -574,7 +574,6 @@
 	void o_waitForSync(uint a);
 	void skipSpeech();
 	void o_sync(uint a);
-	void o_playMusic();
 	void o_saveGame();
 	void o_loadGame();
 	void o_confirmQuit();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list