From 7cb18f8e7ac47e8c8c0b738401534ec0b99c2507 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Dec 2014 10:59:16 -0500 Subject: ACCESS: Fix crash in the introduction sequence --- engines/access/amazon/amazon_logic.cpp | 14 +++++++------- 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); -- cgit v1.2.3