diff options
author | Paul Gilbert | 2014-04-08 22:04:43 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-08 22:04:43 -0400 |
commit | 531ebab4da814aac23a9b084772a6156bfb3b9b8 (patch) | |
tree | d30f2483c62590706428a90738cf53135381a3d8 /engines/mads/game.cpp | |
parent | cd77110093c32f07b84325684ada9a425bdf6c93 (diff) | |
download | scummvm-rg350-531ebab4da814aac23a9b084772a6156bfb3b9b8.tar.gz scummvm-rg350-531ebab4da814aac23a9b084772a6156bfb3b9b8.tar.bz2 scummvm-rg350-531ebab4da814aac23a9b084772a6156bfb3b9b8.zip |
MADS: Added preliminary keyboard handling and keypress process stub
Diffstat (limited to 'engines/mads/game.cpp')
-rw-r--r-- | engines/mads/game.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index fd0294161d..f790341e8a 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -60,6 +60,7 @@ Game::Game(MADSEngine *vm): _vm(vm), _surface(nullptr), _objects(vm), _triggerMode = KERNEL_TRIGGER_PARSER; _triggerSetupMode = KERNEL_TRIGGER_DAEMON; _winStatus = 0; + _widepipeCtr = 0; // Load the inventory object list _objects.load(); @@ -379,4 +380,26 @@ Common::StringArray Game::getMessage(uint32 id) { error("Invalid message Id specified"); } +static const char *const DEBUG_STRING = "WIDEPIPE"; + +void Game::handleKeypress(const Common::Event &event) { + if (event.kbd.flags & Common::KBD_CTRL) { + if (_widepipeCtr == 8) { + // Implement original game cheating keys here someday + } else { + if (event.kbd.keycode == (Common::KEYCODE_a + + (DEBUG_STRING[_widepipeCtr] - 'a'))) { + if (++_widepipeCtr == 8) { + MessageDialog *dlg = new MessageDialog(_vm, 2, + "CHEATING ENABLED", "(for your convenience)."); + dlg->show(); + delete dlg; + } + } + } + } + + warning("TODO: handleKeypress - %d", (int)event.kbd.keycode); +} + } // End of namespace MADS |