diff options
author | Filippos Karapetis | 2015-12-08 11:29:23 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:33:55 +0100 |
commit | 21fc36bfad679426f19e77c4d783ba809038735c (patch) | |
tree | 79dee21934ebe625b4dd5774336e7f75d6dc437b /engines/lab/anim.cpp | |
parent | ae056a767ba8c983b7d38afd2532ba18fd3cb724 (diff) | |
download | scummvm-rg350-21fc36bfad679426f19e77c4d783ba809038735c.tar.gz scummvm-rg350-21fc36bfad679426f19e77c4d783ba809038735c.tar.bz2 scummvm-rg350-21fc36bfad679426f19e77c4d783ba809038735c.zip |
LAB: Get rid of _isBM
Diffstat (limited to 'engines/lab/anim.cpp')
-rw-r--r-- | engines/lab/anim.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index 4927b25eae..fef1edfa4c 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -37,7 +37,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { _header = 0; _curBit = 0; _numChunks = 1; - _isBM = false; _headerdata._width = 0; _headerdata._height = 0; _headerdata._fps = 0; @@ -78,7 +77,7 @@ void Anim::readBlock(void *Buffer, uint32 Size, byte **File) { (*File) += Size; } -void Anim::diffNextFrame() { +void Anim::diffNextFrame(bool onlyDiffData) { if (_header == 65535) /* Already done. */ return; @@ -96,7 +95,7 @@ void Anim::diffNextFrame() { if (_curBit >= _numChunks) { _vm->_event->mouseShow(); - if (!_isBM) { + if (!onlyDiffData) { if (_headerdata._fps) { _vm->waitForTime(_waitSec, _waitMicros); _vm->addCurTime(0L, _delayMicros, &_waitSec, &_waitMicros); @@ -110,7 +109,7 @@ void Anim::diffNextFrame() { _donePal = true; } - if (_isPal && !_noPalChange && !_isBM && !_donePal) { + if (_isPal && !_noPalChange && !onlyDiffData && !_donePal) { _vm->_graphics->setPalette(_diffPalette, 256); _isPal = false; } @@ -147,7 +146,7 @@ void Anim::diffNextFrame() { case 10L: _rawDiffBM._planes[_curBit] = _diffFile; - if (_isBM) + if (onlyDiffData) _diffFile += _size; else { readBlock(DrawBitMap->_planes[_curBit], _size, &_diffFile); @@ -246,7 +245,7 @@ void Anim::diffNextFrame() { /** * A separate task launched by readDiff. Plays the DIFF. */ -void Anim::playDiff(byte *buffer) { +void Anim::playDiff(byte *buffer, bool onlyDiffData) { _waitSec = 0L; _waitMicros = 0L; _delayMicros = 0L; @@ -325,9 +324,9 @@ void Anim::playDiff(byte *buffer) { if (_playOnce) { while (_header != 65535) - diffNextFrame(); + diffNextFrame(onlyDiffData); } else - diffNextFrame(); + diffNextFrame(onlyDiffData); } /** @@ -354,9 +353,9 @@ void Anim::stopDiffEnd() { /** * Reads in a DIFF file. */ -bool Anim::readDiff(byte *buffer, bool playOnce) { +bool Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) { _playOnce = playOnce; - playDiff(buffer); + playDiff(buffer, onlyDiffData); return true; } |