diff options
author | eriktorbjorn | 2011-06-11 20:44:58 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:34:13 +0200 |
commit | 985d2facf23718bf2dc6672914fc6dd4a59e8193 (patch) | |
tree | ab500c7d4cf9d21d6d08af4bb1625962ca33907e /engines | |
parent | 3ecd3f9ca1a1b530bc01d5090ff91ed5d8dbe306 (diff) | |
download | scummvm-rg350-985d2facf23718bf2dc6672914fc6dd4a59e8193.tar.gz scummvm-rg350-985d2facf23718bf2dc6672914fc6dd4a59e8193.tar.bz2 scummvm-rg350-985d2facf23718bf2dc6672914fc6dd4a59e8193.zip |
DREAMWEB: Notice when the user presses ESC.
Unfortunately, skipping the intro does not work because of a stack
underrun. I have no idea what's wrong.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 5b5f2c241f..6eee2e1e10 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -135,6 +135,16 @@ void DreamWebEngine::processEvents() { } break; default: + // As far as I can see, the only keys checked + // for in 'lasthardkey' are 1 (ESC) and 57 + // (space) so add special cases for them and + // treat everything else as 0. + if (event.kbd.keycode == Common::KEYCODE_ESCAPE) + _context.data.byte(dreamgen::kLasthardkey) = 1; + else if (event.kbd.keycode == Common::KEYCODE_SPACE) + _context.data.byte(dreamgen::kLasthardkey) = 57; + else + _context.data.byte(dreamgen::kLasthardkey) = 0; if (event.kbd.ascii) keyPressed(event.kbd.ascii); break; |