Skip to content

Commit

Permalink
ACCESS: Fix restoring game scene after using help
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent eadaf53 commit 16a8d70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engines/access/amazon/amazon_game.cpp
Expand Up @@ -722,7 +722,7 @@ void AmazonEngine::drawHelp(const Common::String str) {
_screen->setPanel(2);
_screen->saveScreen();
}
_screen->setPalette();
_screen->savePalette();
_screen->fadeOut();
_screen->clearBuffer();
if (_moreHelp == 1) {
Expand Down
11 changes: 7 additions & 4 deletions engines/access/amazon/amazon_scripts.cpp
Expand Up @@ -390,8 +390,8 @@ void AmazonScripts::cmdHelp() {

_game->drawHelp(helpMessage);

while(true) {
while(!_vm->shouldQuit() && !_vm->_events->_leftButton)
while (!_vm->shouldQuit()) {
while (!_vm->shouldQuit() && !_vm->_events->_leftButton)
_vm->_events->pollEventsAndWait();

_vm->_events->debounceLeft();
Expand All @@ -410,21 +410,24 @@ void AmazonScripts::cmdHelp() {
continue;

if (choice == 1) {
// Done button selected
_game->_helpLevel = 0;
_game->_moreHelp = 1;
_game->_useItem = 0;
_vm->_events->hideCursor();
_vm->_screen->restoreScreen();
_vm->_screen->setPanel(0);
_vm->_buffer2.copyFrom(*_vm->_screen);
_vm->_screen->copyFrom(_vm->_buffer2);
_vm->_screen->restorePalette();
_vm->_screen->setPalette();
_vm->_events->showCursor();
free(_vm->_objectsTable[45]);

delete _vm->_objectsTable[45];
_vm->_objectsTable[45] = nullptr;
_vm->_timers.restoreTimers();
break;
} else {
// More button selected
if ((_game->_moreHelp == 0) || (choice != 0))
continue;
++_game->_helpLevel;
Expand Down

0 comments on commit 16a8d70

Please sign in to comment.