diff options
author | Paul Gilbert | 2016-05-13 22:19:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-05-13 22:19:03 -0400 |
commit | cc11941203f5058bea73bf709478854746d7ea60 (patch) | |
tree | 14e6f6a2e0535bc8864565755226ade821e92875 /engines/access/amazon/amazon_logic.cpp | |
parent | dd69e8409e5622aa9f00e2f03881800cf7ae7b06 (diff) | |
download | scummvm-rg350-cc11941203f5058bea73bf709478854746d7ea60.tar.gz scummvm-rg350-cc11941203f5058bea73bf709478854746d7ea60.tar.bz2 scummvm-rg350-cc11941203f5058bea73bf709478854746d7ea60.zip |
ACCESS: Fix crash at end of AGOE floppy chapter 6
Diffstat (limited to 'engines/access/amazon/amazon_logic.cpp')
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
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(); } } |