diff options
Diffstat (limited to 'engines/tsage')
-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 |