aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/chewy/console.cpp23
-rw-r--r--engines/chewy/console.h3
2 files changed, 22 insertions, 4 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");
diff --git a/engines/chewy/console.h b/engines/chewy/console.h
index ae2be15f30..2ceb1df4e6 100644
--- a/engines/chewy/console.h
+++ b/engines/chewy/console.h
@@ -39,7 +39,8 @@ private:
bool Cmd_Dump(int argc, const char **argv);
bool Cmd_DumpBg(int argc, const char **argv);
- bool Cmd_Draw(int argc, const char **argv);
+ bool Cmd_DrawImage(int argc, const char **argv);
+ bool Cmd_DrawSprite(int argc, const char **argv);
bool Cmd_PlaySound(int argc, const char **argv);
bool Cmd_PlaySpeech(int argc, const char **argv);
bool Cmd_PlayMusic(int argc, const char **argv);