diff options
author | Cameron Cawley | 2019-12-31 15:04:16 +0000 |
---|---|---|
committer | Filippos Karapetis | 2019-12-31 21:38:45 +0200 |
commit | 4d9ec631f122721ee0a4533461c9042b1dc6c11e (patch) | |
tree | d22a24009980dd8e2bc615b484202a45a5c5de6f | |
parent | ff3f7170f8c218afac0e564e1c65bbd8496eb079 (diff) | |
download | scummvm-rg350-4d9ec631f122721ee0a4533461c9042b1dc6c11e.tar.gz scummvm-rg350-4d9ec631f122721ee0a4533461c9042b1dc6c11e.tar.bz2 scummvm-rg350-4d9ec631f122721ee0a4533461c9042b1dc6c11e.zip |
MOHAWK: LB: Add a console command to change the cursor
-rw-r--r-- | engines/mohawk/console.cpp | 12 | ||||
-rw-r--r-- | engines/mohawk/console.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp index 1cb6c8daee..2bbb525870 100644 --- a/engines/mohawk/console.cpp +++ b/engines/mohawk/console.cpp @@ -21,6 +21,7 @@ */ #include "mohawk/console.h" +#include "mohawk/cursors.h" #include "mohawk/livingbooks.h" #include "mohawk/resource.h" #include "mohawk/sound.h" @@ -754,6 +755,7 @@ LivingBooksConsole::LivingBooksConsole(MohawkEngine_LivingBooks *vm) : GUI::Debu registerCmd("stopSound", WRAP_METHOD(LivingBooksConsole, Cmd_StopSound)); registerCmd("drawImage", WRAP_METHOD(LivingBooksConsole, Cmd_DrawImage)); registerCmd("changePage", WRAP_METHOD(LivingBooksConsole, Cmd_ChangePage)); + registerCmd("changeCursor", WRAP_METHOD(LivingBooksConsole, Cmd_ChangeCursor)); } LivingBooksConsole::~LivingBooksConsole() { @@ -811,6 +813,16 @@ bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) { return true; } +bool LivingBooksConsole::Cmd_ChangeCursor(int argc, const char **argv) { + if (argc == 1) { + debugPrintf("Usage: changeCursor <value>\n"); + return true; + } + + _vm->_cursor->setCursor((uint16)atoi(argv[1])); + return true; +} + #ifdef ENABLE_CSTIME CSTimeConsole::CSTimeConsole(MohawkEngine_CSTime *vm) : GUI::Debugger(), _vm(vm) { diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h index 88db580ca8..0e24857158 100644 --- a/engines/mohawk/console.h +++ b/engines/mohawk/console.h @@ -106,6 +106,7 @@ private: bool Cmd_StopSound(int argc, const char **argv); bool Cmd_DrawImage(int argc, const char **argv); bool Cmd_ChangePage(int argc, const char **argv); + bool Cmd_ChangeCursor(int argc, const char **argv); }; #ifdef ENABLE_CSTIME |