diff options
author | Paul Gilbert | 2011-07-27 22:24:06 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-07-28 07:30:42 +1000 |
commit | 4778bf99eb358df0ba315ac95df3a422c6a94604 (patch) | |
tree | e6c2db392b91ab424d8fe5d776c8bbedea8fc7b9 /engines | |
parent | 0034257976dc2ad5c91cb3825021681c4919811f (diff) | |
download | scummvm-rg350-4778bf99eb358df0ba315ac95df3a422c6a94604.tar.gz scummvm-rg350-4778bf99eb358df0ba315ac95df3a422c6a94604.tar.bz2 scummvm-rg350-4778bf99eb358df0ba315ac95df3a422c6a94604.zip |
TSAGE: Added sound debugger command
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/debugger.cpp | 14 | ||||
-rw-r--r-- | engines/tsage/debugger.h | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index 9277fd429a..00cd61ae07 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -38,6 +38,7 @@ Debugger::Debugger() : GUI::Debugger() { DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects)); DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject)); DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots)); + DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound)); } static int strToInt(const char *s) { @@ -434,5 +435,18 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) { return false; } +/** + * Play the specified sound + */ +bool Debugger::Cmd_Sound(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Usage: %s <sound number>\n", argv[0]); + return true; + } + + int soundNum = strToInt(argv[1]); + _globals->_soundHandler.play(soundNum); + return false; +} } // End of namespace tSage diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h index 3c14cd7bed..44fd61ec5e 100644 --- a/engines/tsage/debugger.h +++ b/engines/tsage/debugger.h @@ -42,8 +42,8 @@ protected: bool Cmd_ClearFlag(int argc, const char **argv); bool Cmd_ListObjects(int argc, const char **argv); bool Cmd_MoveObject(int argc, const char **argv); - bool Cmd_Hotspots(int argc, const char **argv); + bool Cmd_Sound(int argc, const char **argv); }; } // End of namespace tSage |