From 6097828f546fd6f135bc907d6cd0586bb473d9b5 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Mon, 20 Jul 2009 17:34:19 +0000 Subject: Made 'show walking map overlay' setting persist when changing rooms. svn-id: r42628 --- engines/draci/draci.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'engines/draci/draci.cpp') diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index 1e7b292229..7e892a7e1e 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -181,23 +181,27 @@ int DraciEngine::go() { 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()); - else if (event.kbd.keycode == Common::KEYCODE_w) { // Show walking map toggle - // Toggle - showWalkingMap = !showWalkingMap; - if (showWalkingMap) { - _anims->play(-2); - } else { - _anims->stop(-2); - } + // Show walking map toggle + else if (event.kbd.keycode == Common::KEYCODE_w) { + showWalkingMap = !showWalkingMap; } break; default: _mouse->handleEvent(event); } } + + // Show walking map overlay + if (showWalkingMap) { + _anims->play(kWalkingMapOverlay); + } else { + _anims->stop(kWalkingMapOverlay); + } + _game->loop(); _anims->drawScene(_screen->getSurface()); _screen->copyToScreen(); -- cgit v1.2.3