diff options
author | Filippos Karapetis | 2015-12-13 17:46:39 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:02 +0100 |
commit | ceb5ef18e5490d07c40adb5797f026de05036387 (patch) | |
tree | f226a4fd4d216f10af7cd19cfb8247dae9aac393 /engines/lab/anim.cpp | |
parent | ff43ec7e868b0b707ee5584bc004c593c3bd70ef (diff) | |
download | scummvm-rg350-ceb5ef18e5490d07c40adb5797f026de05036387.tar.gz scummvm-rg350-ceb5ef18e5490d07c40adb5797f026de05036387.tar.bz2 scummvm-rg350-ceb5ef18e5490d07c40adb5797f026de05036387.zip |
LAB: Get rid of a superfluous global variable
Diffstat (limited to 'engines/lab/anim.cpp')
-rw-r--r-- | engines/lab/anim.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index ae4fb80df2..6762a42357 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -55,7 +55,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { _donePal = false; _frameNum = 0; _playOnce = false; - _buffer = nullptr; _diffFile = nullptr; _size = 0; _rawDiffBM._bytesPerRow = 0; @@ -76,6 +75,8 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { } void Anim::diffNextFrame(bool onlyDiffData) { + byte *buffer = _diffFile; + if (_header == 65535) // Already done. return; @@ -119,7 +120,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { _frameNum++; if ((_frameNum == 1) && (_continuous || (!_playOnce))) - _buffer = _diffFile; + buffer = _diffFile; _isAnim = (_frameNum >= 3) && (!_playOnce); _curBit = 0; @@ -235,7 +236,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { // Random frame number so it never gets back to 2 _frameNum = 4; - _diffFile = _buffer; + _diffFile = buffer; break; default: |