diff options
author | Filippos Karapetis | 2007-10-13 23:48:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-10-13 23:48:59 +0000 |
commit | a08b6606a68eebbb89b6e7adf7c04dafeb968442 (patch) | |
tree | 3f24fe6f67332ac6ae9f67dfee56e09ebd0c7b53 /engines/agi/preagi_winnie.cpp | |
parent | 86b6429e9766d1f9b43734ea89314d9561bc85c7 (diff) | |
download | scummvm-rg350-a08b6606a68eebbb89b6e7adf7c04dafeb968442.tar.gz scummvm-rg350-a08b6606a68eebbb89b6e7adf7c04dafeb968442.tar.bz2 scummvm-rg350-a08b6606a68eebbb89b6e7adf7c04dafeb968442.zip |
Add a debug console in Winnie (patch by clone2727)
svn-id: r29215
Diffstat (limited to 'engines/agi/preagi_winnie.cpp')
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index 0a39438fff..893742b05c 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -919,6 +919,12 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { incMenuSel(iSel, fCanSel); break; case Common::EVENT_KEYDOWN: + if (event.kbd.keycode == Common::KEYCODE_d && (event.kbd.flags & Common::KBD_CTRL) && _vm->_console) { + _vm->_console->attach(); + _vm->_console->onFrame(); + continue; + } + switch (event.kbd.keycode) { case Common::KEYCODE_ESCAPE: *iSel = IDI_WTP_SEL_HOME; @@ -1006,8 +1012,10 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { break; } default: - keyHelp(); - clrMenuSel(iSel, fCanSel); + if (!(event.kbd.flags & Common::KBD_CTRL)) { + keyHelp(); + clrMenuSel(iSel, fCanSel); + } break; } break; @@ -1213,8 +1221,14 @@ void Winnie::loadGame() { free(buffer); } -Winnie::Winnie(PreAgiEngine* vm) : _vm(vm) { +// Console-related functions + +void Winnie::debugCurRoom() { + _vm->_console->DebugPrintf("Current Room = %d\n", _room); +} +Winnie::Winnie(PreAgiEngine* vm) : _vm(vm) { + _vm->_console = new Winnie_Console(_vm, this); } void Winnie::init() { |