mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-15 06:18:33 +00:00
Made 'show walking map overlay' setting persist when changing rooms.
svn-id: r42628
This commit is contained in:
parent
a2a71cb8fb
commit
6097828f54
@ -30,7 +30,7 @@
|
||||
|
||||
namespace Draci {
|
||||
|
||||
enum { kOverlayImage = -1, kUnused = -2 };
|
||||
enum { kOverlayImage = -1, kWalkingMapOverlay = -2, kUnused = -3 };
|
||||
|
||||
enum { kCurrentFrame = -1 };
|
||||
|
||||
|
@ -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();
|
||||
|
@ -345,7 +345,7 @@ void Game::loadRoom(int roomNum) {
|
||||
|
||||
Sprite *ov = new Sprite(wlk, kScreenWidth, kScreenHeight, 0, 0, false);
|
||||
|
||||
Animation *map = _vm->_anims->addAnimation(-2, 255, false);
|
||||
Animation *map = _vm->_anims->addAnimation(kWalkingMapOverlay, 255, false);
|
||||
map->addFrame(ov);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user