diff options
author | Robert Špalek | 2010-06-28 04:04:16 +0000 |
---|---|---|
committer | Robert Špalek | 2010-06-28 04:04:16 +0000 |
commit | c7554c267e6eaf8457611c44476143a54bbb66c0 (patch) | |
tree | eee48d34c2be2e63eaafa0de268dfe38928c134a /engines/draci/draci.cpp | |
parent | 048ceb73d36e4729cb9c8dde292043c32a554234 (diff) | |
download | scummvm-rg350-c7554c267e6eaf8457611c44476143a54bbb66c0.tar.gz scummvm-rg350-c7554c267e6eaf8457611c44476143a54bbb66c0.tar.bz2 scummvm-rg350-c7554c267e6eaf8457611c44476143a54bbb66c0.zip |
Implement shortcuts for switching items in the inventory
slash: switch between the last held item and normal mouse
comma, period: replace the currently held item with the previous/next item in the inventory
Also, commented a bit better what happens when ESCAPE is present with respect to map
programs and cut-scenes.
svn-id: r50407
Diffstat (limited to 'engines/draci/draci.cpp')
-rw-r--r-- | engines/draci/draci.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index a87e9a476d..ee883f9881 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -253,19 +253,20 @@ void DraciEngine::handleEvents() { if (escRoom >= 0) { // Schedule room change - // TODO: gate 0 (always present) is not - // always best for returning from the - // map, e.g. in the starting location. - // also, after loading the game, we - // shouldn't run any gate program, but - // rather restore the state of all - // objects. + // TODO: gate 0 (always present) is not always best for + // returning from the map, e.g. in the starting location. + // also, after loading the game, we shouldn't run any gate + // program, but rather restore the state of all objects. _game->scheduleEnteringRoomUsingGate(escRoom, 0); - // Immediately cancel any running animation or dubbing. + // Immediately cancel any running animation or dubbing and + // end any currently running GPL programs. In the intro it + // works as intended---skipping the rest of it. + // + // In the map, this causes that animation on newly + // discovered locations will be re-run next time and + // cut-scenes won't be played. _game->setExitLoop(true); - - // End any currently running GPL programs _script->endCurrentProgram(true); } break; @@ -301,6 +302,16 @@ void DraciEngine::handleEvents() { openMainMenuDialog(); } break; + case Common::KEYCODE_COMMA: + case Common::KEYCODE_PERIOD: + case Common::KEYCODE_SLASH: + if ((_game->getLoopStatus() == kStatusOrdinary || + _game->getLoopStatus() == kStatusInventory) && + _game->getLoopSubstatus() == kOuterLoop && + _game->getRoomNum() != _game->getMapRoom()) { + _game->inventorySwitch(event.kbd.keycode); + } + break; default: break; } |