[Scummvm-cvs-logs] SF.net SVN: scummvm:[46670] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Dec 28 12:23:20 CET 2009


Revision: 46670
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46670&view=rev
Author:   thebluegr
Date:     2009-12-28 11:23:20 +0000 (Mon, 28 Dec 2009)

Log Message:
-----------
SCI/new music code: Implemented the "songlib" debug command

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/sfx/music.cpp
    scummvm/trunk/engines/sci/sfx/music.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-12-28 10:42:14 UTC (rev 46669)
+++ scummvm/trunk/engines/sci/console.cpp	2009-12-28 11:23:20 UTC (rev 46670)
@@ -43,6 +43,8 @@
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 #include "sci/sfx/iterator/songlib.h"	// for SongLibrary
 #include "sci/sfx/iterator/iterator.h"	// for SCI_SONG_ITERATOR_TYPE_SCI0
+#else
+#include "sci/sfx/music.h"
 #endif
 #include "sci/sfx/softseq/mididriver.h"
 #include "sci/vocabulary.h"
@@ -1623,6 +1625,8 @@
 		DebugPrintf("\n");
 	} while (seeker);
 	DebugPrintf("\n");
+#else
+	_vm->getEngineState()->_soundCmd->_music->printSongLib(this);
 #endif
 
 	return true;

Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-28 10:42:14 UTC (rev 46669)
+++ scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-28 11:23:20 UTC (rev 46670)
@@ -27,6 +27,7 @@
 #include "common/config-manager.h"
 
 #include "sci/sci.h"
+#include "sci/console.h"
 #include "sci/resource.h"
 #include "sci/engine/kernel.h"
 #include "sci/engine/state.h"
@@ -492,6 +493,17 @@
 	_pMixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol);
 }
 
+void SciMusic::printSongLib(Console *con) {
+	Common::StackLock lock(_mutex);
+	const char *musicStatus[] = { "Stopped", "Initialized", "Paused", "Playing" };
+
+	for (uint32 i = 0; i < _playList.size(); i++) {
+		con->DebugPrintf("%d: %04x:%04x, priority: %d, status: %s\n", i, 
+						PRINT_REG(_playList[i]->soundObj), _playList[i]->prio,
+						musicStatus[_playList[i]->status]);
+	}
+}
+
 void SciMusic::reconstructSounds(int savegame_version) {
 	Common::StackLock lock(_mutex);
 

Modified: scummvm/trunk/engines/sci/sfx/music.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.h	2009-12-28 10:42:14 UTC (rev 46669)
+++ scummvm/trunk/engines/sci/sfx/music.h	2009-12-28 11:23:20 UTC (rev 46670)
@@ -140,6 +140,8 @@
 		_playList.push_back(slotEntry);
 	}
 
+	void printSongLib(Console *con);
+
 	void reconstructSounds(int savegame_version);
 
 #ifndef USE_OLD_MUSIC_FUNCTIONS


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