diff options
| author | Paul Gilbert | 2015-12-11 22:42:18 -0500 |
|---|---|---|
| committer | Paul Gilbert | 2015-12-11 22:42:18 -0500 |
| commit | d4bbf4d2503f7d89094db64e85e6bd5c4c2b38e8 (patch) | |
| tree | 1c171ed7cd8c6bfbee84a9b4efa86a52de127a3f /engines/access/amazon | |
| parent | 95ac0214aea59b777d61367a101dc7d932280d34 (diff) | |
| download | scummvm-rg350-d4bbf4d2503f7d89094db64e85e6bd5c4c2b38e8.tar.gz scummvm-rg350-d4bbf4d2503f7d89094db64e85e6bd5c4c2b38e8.tar.bz2 scummvm-rg350-d4bbf4d2503f7d89094db64e85e6bd5c4c2b38e8.zip | |
ACCESS: Fix differences in floppy chapter changes
Diffstat (limited to 'engines/access/amazon')
| -rw-r--r-- | engines/access/amazon/amazon_game.cpp | 36 | ||||
| -rw-r--r-- | engines/access/amazon/amazon_scripts.cpp | 17 |
2 files changed, 36 insertions, 17 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index cf90beae96..3bb19676e8 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -640,25 +640,27 @@ void AmazonEngine::startChapter(int chapter) { _room->init4Quads(); } - if (chapter == 14) { - _conversation = 31; - _char->loadChar(_conversation); - _events->setCursor(CURSOR_ARROW); - - _images.clear(); - _oldRects.clear(); - _scripts->_sequence = 0; - _scripts->searchForSequence(); + if (isCD()) { + if (chapter == 14) { + _conversation = 31; + _char->loadChar(_conversation); + _events->setCursor(CURSOR_ARROW); + + _images.clear(); + _oldRects.clear(); + _scripts->_sequence = 0; + _scripts->searchForSequence(); + + if (_screen->_vesaMode) { + _converseMode = 1; + } + } else if (chapter != 1) { + _player->_roomNumber = CHAPTER_JUMP[_chapter - 1]; + _room->_function = FN_CLEAR1; + _converseMode = 0; - if (_screen->_vesaMode) { - _converseMode = 1; + _scripts->cmdRetPos(); } - } else if (chapter != 1) { - _player->_roomNumber = CHAPTER_JUMP[_chapter - 1]; - _room->_function = FN_CLEAR1; - _converseMode = 0; - - _scripts->cmdRetPos(); } } diff --git a/engines/access/amazon/amazon_scripts.cpp b/engines/access/amazon/amazon_scripts.cpp index 9ff6a2952d..48438e9c95 100644 --- a/engines/access/amazon/amazon_scripts.cpp +++ b/engines/access/amazon/amazon_scripts.cpp @@ -473,12 +473,29 @@ void AmazonScripts::cmdCycleBack() { if (_vm->_startup == -1) _vm->_screen->cyclePaletteBackwards(); } + void AmazonScripts::cmdChapter() { + Resource *activeScript = nullptr; + if (_vm->isDemo()) { cmdSetHelp(); } else { int chapter = _data->readByte(); + + if (!_vm->isCD()) { + // For floppy version, the current script remains active even + // after the end of the chapter start, so we need to save it + activeScript = _resource; + _resource = nullptr; + _data = nullptr; + } + _game->startChapter(chapter); + + if (!_vm->isCD()) { + assert(!_resource); + setScript(activeScript, false); + } } } |
