From cc11941203f5058bea73bf709478854746d7ea60 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 13 May 2016 22:19:03 -0400 Subject: ACCESS: Fix crash at end of AGOE floppy chapter 6 --- engines/access/amazon/amazon_logic.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'engines/access') diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index e78f92cda7..08006fe1b7 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -185,16 +185,24 @@ void CampScene::mWhileDoOpen() { _vm->_numAnimTimers = 0; _vm->_images.clear(); - if (_vm->_conversation == 2) { - // Cutscene at end of Chapter 6 - Resource *spriteData = _vm->_files->loadFile(28, 37); - _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); - delete spriteData; - - _vm->_animation->freeAnimationData(); - animResource = _vm->_files->loadFile(28, 38); - _vm->_animation->loadAnimations(animResource); - delete animResource; + if (_vm->isCD()) { + if (_vm->_conversation == 2) { + // Cutscene at end of Chapter 6 + Resource *spriteData = _vm->_files->loadFile(28, 37); + _vm->_objectsTable[28] = new SpriteResource(_vm, spriteData); + delete spriteData; + + _vm->_animation->freeAnimationData(); + animResource = _vm->_files->loadFile(28, 38); + _vm->_animation->loadAnimations(animResource); + delete animResource; + } + } else { + _vm->freeCells(); + _vm->_oldRects.clear(); + _vm->_newRects.clear(); + _vm->_numAnimTimers = 0; + _vm->_images.clear(); } } -- cgit v1.2.3