diff options
Diffstat (limited to 'engines/chewy/console.cpp')
-rw-r--r-- | engines/chewy/console.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp index 6fbd99278f..65c4a681d6 100644 --- a/engines/chewy/console.cpp +++ b/engines/chewy/console.cpp @@ -35,7 +35,8 @@ namespace Chewy { Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("dump", WRAP_METHOD(Console, Cmd_Dump)); registerCmd("dump_bg", WRAP_METHOD(Console, Cmd_DumpBg)); - registerCmd("draw", WRAP_METHOD(Console, Cmd_Draw)); + registerCmd("draw_image", WRAP_METHOD(Console, Cmd_DrawImage)); + registerCmd("draw_sprite", WRAP_METHOD(Console, Cmd_DrawSprite)); registerCmd("play_sound", WRAP_METHOD(Console, Cmd_PlaySound)); registerCmd("play_speech", WRAP_METHOD(Console, Cmd_PlaySpeech)); registerCmd("play_music", WRAP_METHOD(Console, Cmd_PlayMusic)); @@ -104,9 +105,9 @@ bool Console::Cmd_DumpBg(int argc, const char **argv) { } -bool Console::Cmd_Draw(int argc, const char **argv) { +bool Console::Cmd_DrawImage(int argc, const char **argv) { if (argc < 3) { - debugPrintf("Usage: draw <file> <resource number>\n"); + debugPrintf("Usage: draw_image <file> <resource number>\n"); return true; } @@ -118,6 +119,22 @@ bool Console::Cmd_Draw(int argc, const char **argv) { return false; } +bool Console::Cmd_DrawSprite(int argc, const char **argv) { + if (argc < 3) { + debugPrintf("Usage: draw_sprite <file> <resource number> [x] [y]\n"); + return true; + } + + Common::String filename = argv[1]; + int spriteNum = atoi(argv[2]); + int x = (argc < 4) ? 0 : atoi(argv[3]); + int y = (argc < 5) ? 0 : atoi(argv[4]); + + _vm->_graphics->drawSprite(filename, spriteNum, x, y); + + return false; +} + bool Console::Cmd_PlaySound(int argc, const char **argv) { if (argc < 2) { debugPrintf("Usage: play_sound <number>\n"); |