[Scummvm-cvs-logs] scummvm master -> 405914d6553a713b207809034d1b305a23f2be39

eriktorbjorn eriktorbjorn at telia.com
Wed Jun 3 22:14:02 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
405914d655 SHERLOCK: Add "song" debugger command


Commit: 405914d6553a713b207809034d1b305a23f2be39
    https://github.com/scummvm/scummvm/commit/405914d6553a713b207809034d1b305a23f2be39
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-03T22:12:53+02:00

Commit Message:
SHERLOCK: Add "song" debugger command

It could be more user-friendly, but should work well enough for now.

Changed paths:
    engines/sherlock/debugger.cpp
    engines/sherlock/debugger.h



diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp
index d8db595..27f4441 100644
--- a/engines/sherlock/debugger.cpp
+++ b/engines/sherlock/debugger.cpp
@@ -22,6 +22,7 @@
 
 #include "sherlock/debugger.h"
 #include "sherlock/sherlock.h"
+#include "sherlock/music.h"
 
 #include "sherlock/scalpel/3do/movie_decoder.h"
 
@@ -31,6 +32,7 @@ Debugger::Debugger(SherlockEngine *vm) : GUI::Debugger(), _vm(vm) {
 	registerCmd("continue",	     WRAP_METHOD(Debugger, cmdExit));
 	registerCmd("scene",         WRAP_METHOD(Debugger, cmdScene));
 	registerCmd("3do_playmovie", WRAP_METHOD(Debugger, cmd3DO_PlayMovie));
+	registerCmd("song",          WRAP_METHOD(Debugger, cmdSong));
 }
 
 void Debugger::postEnter() {
@@ -82,4 +84,17 @@ bool Debugger::cmd3DO_PlayMovie(int argc, const char **argv) {
 	return cmdExit(0, 0);
 }
 
+bool Debugger::cmdSong(int argc, const char **argv) {
+	if (argc != 2) {
+		debugPrintf("Format: song <number>\n");
+		return true;
+	}
+
+	if (!_vm->_music->loadSong(strToInt(argv[1]))) {
+		debugPrintf("Invalid song number.\n");
+		return true;
+	}
+	return false;
+}
+
 } // End of namespace Sherlock
diff --git a/engines/sherlock/debugger.h b/engines/sherlock/debugger.h
index c394c52..39866d0 100644
--- a/engines/sherlock/debugger.h
+++ b/engines/sherlock/debugger.h
@@ -55,6 +55,11 @@ private:
 	 */
 	bool cmd3DO_PlayMovie(int argc, const char **argv);
 
+	/**
+	 * Plays a song
+	 */
+	bool cmdSong(int argc, const char **argv);
+
 private:
 	Common::String _3doPlayMovieFile;
 };






More information about the Scummvm-git-logs mailing list