diff options
author | Filippos Karapetis | 2015-12-10 12:45:21 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:00 +0100 |
commit | aa7ec3654dfc8a01c734c41946db5d8e79f3cf9b (patch) | |
tree | d915aa85800a78488e7e06e1db1ae0ee81833d37 /engines/lab/anim.cpp | |
parent | 9f7ad4b5f25e3c9d6437f0ac0e5e26dba4cab330 (diff) | |
download | scummvm-rg350-aa7ec3654dfc8a01c734c41946db5d8e79f3cf9b.tar.gz scummvm-rg350-aa7ec3654dfc8a01c734c41946db5d8e79f3cf9b.tar.bz2 scummvm-rg350-aa7ec3654dfc8a01c734c41946db5d8e79f3cf9b.zip |
LAB: Refactor readPictToMem()
This fixes crashes in the teleporter and the journal, and plugs several
memory leaks
Diffstat (limited to 'engines/lab/anim.cpp')
-rw-r--r-- | engines/lab/anim.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index 936c49223c..20d1473c67 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -82,13 +82,13 @@ void Anim::diffNextFrame(bool onlyDiffData) { // Already done. return; - if (_vm->_graphics->_dispBitMap->_drawOnScreen) { - _vm->_graphics->_dispBitMap->_planes[0] = _vm->_graphics->getCurrentDrawingBuffer(); - _vm->_graphics->_dispBitMap->_planes[1] = _vm->_graphics->_dispBitMap->_planes[0] + 0x10000; - _vm->_graphics->_dispBitMap->_planes[2] = _vm->_graphics->_dispBitMap->_planes[1] + 0x10000; - _vm->_graphics->_dispBitMap->_planes[3] = _vm->_graphics->_dispBitMap->_planes[2] + 0x10000; - _vm->_graphics->_dispBitMap->_planes[4] = _vm->_graphics->_dispBitMap->_planes[3] + 0x10000; - } + if (_vm->_graphics->_dispBitMap->_drawOnScreen) + _vm->_graphics->_dispBitMap->_planes[0] = _vm->_graphics->getCurrentDrawingBuffer(); + + _vm->_graphics->_dispBitMap->_planes[1] = _vm->_graphics->_dispBitMap->_planes[0] + 0x10000; + _vm->_graphics->_dispBitMap->_planes[2] = _vm->_graphics->_dispBitMap->_planes[1] + 0x10000; + _vm->_graphics->_dispBitMap->_planes[3] = _vm->_graphics->_dispBitMap->_planes[2] + 0x10000; + _vm->_graphics->_dispBitMap->_planes[4] = _vm->_graphics->_dispBitMap->_planes[3] + 0x10000; _vm->_event->mouseHide(); |