diff options
author | Paul Gilbert | 2014-11-28 22:42:27 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:52:26 -0500 |
commit | 16a8d705baab154498cf33905655c4ed4b93b545 (patch) | |
tree | 1588cf1cb18d9a0b496e8fb4a098846d90a7b115 /engines | |
parent | eadaf534865c674bbe11588818539c34da278e0e (diff) | |
download | scummvm-rg350-16a8d705baab154498cf33905655c4ed4b93b545.tar.gz scummvm-rg350-16a8d705baab154498cf33905655c4ed4b93b545.tar.bz2 scummvm-rg350-16a8d705baab154498cf33905655c4ed4b93b545.zip |
ACCESS: Fix restoring game scene after using help
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 2 | ||||
-rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 8958239a15..b05bb7bb82 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -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) { diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 4c3b83869c..e2d18141f4 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -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(); @@ -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; |