From 94417e77438e779ee1a03e366d96dc49bff04e03 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Sat, 18 Jul 2009 03:00:12 +0000 Subject: * Added support for "walking" with the hero (i.e. moving the sprite to locations allowed by the walking map) * Enabled drawing the walking map with the 'w' hotkey for testing svn-id: r42581 --- engines/draci/draci.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/draci/draci.cpp') diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index b2b0083c22..1e7b292229 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -171,6 +171,7 @@ int DraciEngine::go() { Common::Event event; bool quit = false; + bool showWalkingMap = false; while (!quit) { while (_eventMan->pollEvent(event)) { switch (event.type) { @@ -182,7 +183,17 @@ int DraciEngine::go() { _game->changeRoom(_game->nextRoomNum()); else if (event.kbd.keycode == Common::KEYCODE_LEFT) _game->changeRoom(_game->prevRoomNum()); - break; + else if (event.kbd.keycode == Common::KEYCODE_w) { // Show walking map toggle + // Toggle + showWalkingMap = !showWalkingMap; + + if (showWalkingMap) { + _anims->play(-2); + } else { + _anims->stop(-2); + } + } + break; default: _mouse->handleEvent(event); } -- cgit v1.2.3