diff options
author | Denis Kasak | 2009-08-05 02:42:23 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-05 02:42:23 +0000 |
commit | 1363a0680a564c356f497d0e90aefeef5f426f76 (patch) | |
tree | f0d2406ea0744479302ef09d83e2faeadf670042 /engines/draci | |
parent | 6546c2ed8eb30201f0af68639cb5e37f65620741 (diff) | |
download | scummvm-rg350-1363a0680a564c356f497d0e90aefeef5f426f76.tar.gz scummvm-rg350-1363a0680a564c356f497d0e90aefeef5f426f76.tar.bz2 scummvm-rg350-1363a0680a564c356f497d0e90aefeef5f426f76.zip |
* Implemented the "escape room" feature of the original engine which lets a user switch to another location (or skip the intro) by pressing ESC (the escRoom for every location is stored in the data files).
* Reworked the left and right arrow key commands so they don't call changeRoom() themselves but instead schedule the room change via Game::setRoomNum(). In this way, changing rooms like that is still a hack but a bit more "natural", since the loop doesn't get skipped, the gate scripts get run, etc.
svn-id: r43065
Diffstat (limited to 'engines/draci')
-rw-r--r-- | engines/draci/draci.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index 612f255fc6..87408dbccf 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -191,12 +191,21 @@ bool DraciEngine::handleEvents() { _game->setQuit(true); break; case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == Common::KEYCODE_RIGHT) - _game->changeRoom(_game->nextRoomNum()); - - else if (event.kbd.keycode == Common::KEYCODE_LEFT) - _game->changeRoom(_game->prevRoomNum()); - + if (event.kbd.keycode == Common::KEYCODE_RIGHT) { + _game->setRoomNum(_game->nextRoomNum()); + _game->setGateNum(0); + _game->_roomChange = true; + } + else if (event.kbd.keycode == Common::KEYCODE_LEFT) { + _game->setRoomNum(_game->prevRoomNum()); + _game->setGateNum(0); + _game->_roomChange = true; + } + else if (event.kbd.keycode == Common::KEYCODE_ESCAPE) { + _game->setRoomNum(_game->getEscRoom()); + _game->setGateNum(0); + _game->_roomChange = true; + } // Show walking map toggle else if (event.kbd.keycode == Common::KEYCODE_w) { _showWalkingMap = !_showWalkingMap; |