From a6a9315d6e0db500d9be2508b038b84cb6d4bc98 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 2 Dec 2015 21:13:12 -0500 Subject: ACCESS: Fix corruption of scrolling screen when using ui buttons --- engines/access/room.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/access/room.cpp b/engines/access/room.cpp index 8a5526e310..9a6efd32fc 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -611,6 +611,7 @@ void Room::handleCommand(int commandId) { void Room::executeCommand(int commandId) { EventsManager &events = *_vm->_events; + Screen &screen = *_vm->_screen; _selectCommand = commandId; if (_vm->getGameID() == GType_MartianMemorandum) { @@ -697,8 +698,8 @@ void Room::executeCommand(int commandId) { break; } } - _vm->_screen->saveScreen(); - _vm->_screen->setDisplayScan(); + screen.saveScreen(); + screen.setDisplayScan(); // Get the toolbar icons resource Resource *iconData = _vm->_files->loadFile("ICONS.LZ"); @@ -706,8 +707,9 @@ void Room::executeCommand(int commandId) { delete iconData; // Draw the button as selected - roomMenu(); - _vm->_screen->plotImage(spr, _selectCommand + 2, + screen.plotImage(spr, 0, Common::Point(0, 177)); + screen.plotImage(spr, 1, Common::Point(143, 177)); + screen.plotImage(spr, _selectCommand + 2, Common::Point(_rMouse[_selectCommand][0], (_vm->getGameID() == GType_MartianMemorandum) ? 184 : 176)); _vm->_screen->restoreScreen(); -- cgit v1.2.3