diff options
author | Filippos Karapetis | 2015-12-13 19:27:07 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:02 +0100 |
commit | 231dda2ba989fb2993d3c82f1dd79be34bba436f (patch) | |
tree | 05fc9a22b4874810cd11b26f43e4be0adcb5f077 /engines/lab | |
parent | dffaffdd096d9ee7457a8b3b8f1db78af1b0cff5 (diff) | |
download | scummvm-rg350-231dda2ba989fb2993d3c82f1dd79be34bba436f.tar.gz scummvm-rg350-231dda2ba989fb2993d3c82f1dd79be34bba436f.tar.bz2 scummvm-rg350-231dda2ba989fb2993d3c82f1dd79be34bba436f.zip |
LAB: Fix regression in animation code in looping animations
This fixes Daedalus' flight animation in the ending cutscene
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/anim.cpp | 9 | ||||
-rw-r--r-- | engines/lab/anim.h | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index 6762a42357..842d3d6432 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -56,6 +56,7 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { _frameNum = 0; _playOnce = false; _diffFile = nullptr; + _diffFileStart = nullptr; _size = 0; _rawDiffBM._bytesPerRow = 0; _rawDiffBM._drawOnScreen = false; @@ -75,8 +76,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { } void Anim::diffNextFrame(bool onlyDiffData) { - byte *buffer = _diffFile; - if (_header == 65535) // Already done. return; @@ -120,7 +119,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { _frameNum++; if ((_frameNum == 1) && (_continuous || (!_playOnce))) - buffer = _diffFile; + _diffFileStart = _diffFile; _isAnim = (_frameNum >= 3) && (!_playOnce); _curBit = 0; @@ -236,7 +235,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { // Random frame number so it never gets back to 2 _frameNum = 4; - _diffFile = buffer; + _diffFile = _diffFileStart; break; default: @@ -287,7 +286,7 @@ void Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) { _vm->_graphics->blackScreen(); } - _diffFile = buffer; + _diffFile = _diffFileStart = buffer; _continuous = false; uint32 signature = READ_BE_UINT32(_diffFile); diff --git a/engines/lab/anim.h b/engines/lab/anim.h index e2d79fa430..6e568a40a3 100644 --- a/engines/lab/anim.h +++ b/engines/lab/anim.h @@ -70,6 +70,7 @@ private: uint16 _frameNum; bool _playOnce; byte *_diffFile; + byte *_diffFileStart; uint32 _size; bool _stopPlayingEnd; uint16 _sampleSpeed; |