ACCESS: Fix crash in the introduction sequence

This commit is contained in:
Paul Gilbert 2014-12-20 10:59:16 -05:00
parent a7bfa55aa8
commit 7cb18f8e7a
2 changed files with 8 additions and 7 deletions

View File

@ -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 };

View File

@ -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);