diff options
author | Paul Gilbert | 2014-12-20 10:59:16 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-20 10:59:16 -0500 |
commit | 7cb18f8e7ac47e8c8c0b738401534ec0b99c2507 (patch) | |
tree | a4e027c4b6b3b15dadf89128dabb336991eb9cf1 /engines/access | |
parent | a7bfa55aa802b7f6adfe85cb981af9f2f42c2586 (diff) | |
download | scummvm-rg350-7cb18f8e7ac47e8c8c0b738401534ec0b99c2507.tar.gz scummvm-rg350-7cb18f8e7ac47e8c8c0b738401534ec0b99c2507.tar.bz2 scummvm-rg350-7cb18f8e7ac47e8c8c0b738401534ec0b99c2507.zip |
ACCESS: Fix crash in the introduction sequence
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 14 | ||||
-rw-r--r-- | engines/access/asurface.cpp | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 97bd9de650..e6a96b67d6 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -148,7 +148,7 @@ void CampScene::mWhileDoOpen() { _vm->_animation->animate(0); _vm->_animation->animate(1); pan(); - _vm->_buffer2.blitFrom(_vm->_buffer1); + _vm->_buffer2.copyFrom(_vm->_buffer1); _vm->_newRects.clear(); _vm->plotList(); _vm->copyBlocks(); @@ -176,8 +176,8 @@ void CampScene::mWhileDoOpen() { } events.showCursor(); - _vm->_buffer2.blitFrom(*_vm->_screen); - _vm->_buffer1.blitFrom(*_vm->_screen); + _vm->_buffer2.copyFrom(*_vm->_screen); + _vm->_buffer1.copyFrom(*_vm->_screen); _vm->freeCells(); _vm->_oldRects.clear(); @@ -323,8 +323,8 @@ void Opening::doTitle() { _vm->_files->_setPaletteFlag = false; _vm->_files->loadScreen(0, 3); - _vm->_buffer2.blitFrom(*_vm->_screen); - _vm->_buffer1.blitFrom(*_vm->_screen); + _vm->_buffer2.copyFrom(*_vm->_screen); + _vm->_buffer1.copyFrom(*_vm->_screen); screen.forceFadeIn(); _vm->_sound->playSound(1); @@ -347,8 +347,8 @@ void Opening::doTitle() { _vm->_files->loadScreen(0, 4); _vm->_sound->playSound(1); - _vm->_buffer2.blitFrom(*_vm->_screen); - _vm->_buffer1.blitFrom(*_vm->_screen); + _vm->_buffer2.copyFrom(*_vm->_screen); + _vm->_buffer1.copyFrom(*_vm->_screen); _vm->_sound->playSound(1); const int COUNTDOWN[6] = { 2, 0x80, 1, 0x7d, 0, 0x87 }; diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp index e9a2e8a427..5f4372d5af 100644 --- a/engines/access/asurface.cpp +++ b/engines/access/asurface.cpp @@ -253,6 +253,7 @@ void ASurface::transBlitFrom(ASurface &src) { } void ASurface::blitFrom(Graphics::Surface &src) { + assert(w >= src.w && h >= src.h); for (int y = 0; y < src.h; ++y) { const byte *srcP = (const byte *)src.getBasePtr(0, y); byte *destP = (byte *)getBasePtr(0, y); |