diff options
author | Paul Gilbert | 2018-12-28 21:15:50 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-28 21:15:50 -0800 |
commit | 7a21e236035876c8ae581d4f9d61584c6385b89a (patch) | |
tree | 64adffd16ae97d040f73bdf688726f0dc48c0676 /engines/glk/frotz | |
parent | f218400d3b75ee1cf537e2ca9db23bc417475c10 (diff) | |
download | scummvm-rg350-7a21e236035876c8ae581d4f9d61584c6385b89a.tar.gz scummvm-rg350-7a21e236035876c8ae581d4f9d61584c6385b89a.tar.bz2 scummvm-rg350-7a21e236035876c8ae581d4f9d61584c6385b89a.zip |
GLK: FROTZ: Implement PageUp/PageDn scrolling of desc area in Beyond Zork
Diffstat (limited to 'engines/glk/frotz')
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 74d6e457ee..88abbe3f68 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -194,6 +194,13 @@ void GlkInterface::initialize() { // Add any sound folder or zip addSound(); + + // For Beyond Zork the Page Up/Down keys are remapped to scroll the description area, + // since the arrow keys the original used are in use now for cycling prior commands + if (_storyId == BEYOND_ZORK) { + uint32 KEYCODES[2] = { keycode_PageUp, keycode_PageDown }; + glk_set_terminators_line_event(gos_lower, KEYCODES, 2); + } } void GlkInterface::addSound() { @@ -588,6 +595,16 @@ zchar GlkInterface::os_read_line(int max, zchar *buf, int timeout, int width, in reset_status_ht(); curr_status_ht = 0; + if (ev.val2) { + // Line terminator specified, so return it + if (_storyId == BEYOND_ZORK && ev.val2 == keycode_PageUp) + return ZC_ARROW_UP; + else if (_storyId == BEYOND_ZORK && ev.val2 == keycode_PageDown) + return ZC_ARROW_DOWN; + + return ev.val2; + } + return ZC_RETURN; } |