aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r--engines/sci/console.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 943be4bfa7..1ff0a1550c 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -121,6 +121,7 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
DCmd_Register("draw_cel", WRAP_METHOD(Console, cmdDrawCel));
#ifdef ENABLE_SCI32
DCmd_Register("draw_robot", WRAP_METHOD(Console, cmdDrawRobot));
+ DCmd_Register("play_robot_audio", WRAP_METHOD(Console, cmdPlayRobotAudio));
#endif
DCmd_Register("undither", WRAP_METHOD(Console, cmdUndither));
DCmd_Register("pic_visualize", WRAP_METHOD(Console, cmdPicVisualize));
@@ -1527,6 +1528,24 @@ bool Console::cmdDrawRobot(int argc, const char **argv) {
}
return true;
}
+
+bool Console::cmdPlayRobotAudio(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Draws frames from a robot resource\n");
+ DebugPrintf("Usage: %s <resourceId>\n", argv[0]);
+ DebugPrintf("where <resourceId> is the id of the robot resource to draw\n");
+ return true;
+ }
+
+ uint16 resourceId = atoi(argv[1]);
+
+ if (_engine->_gfxPaint32) {
+ _engine->_gfxPaint32->debugPlayRobotAudio(resourceId);
+ } else {
+ DebugPrintf("command not available in non-sci32 games");
+ }
+ return true;
+}
#endif
bool Console::cmdUndither(int argc, const char **argv) {