aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/debugger.cpp15
-rw-r--r--engines/sherlock/debugger.h5
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp
index d8db5950b9..27f4441dd0 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 c394c52cd5..39866d0cd3 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;
};