aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lab/anim.cpp7
-rw-r--r--engines/lab/anim.h1
2 files changed, 4 insertions, 4 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:
diff --git a/engines/lab/anim.h b/engines/lab/anim.h
index 6c18224932..e2d79fa430 100644
--- a/engines/lab/anim.h
+++ b/engines/lab/anim.h
@@ -69,7 +69,6 @@ private:
bool _donePal;
uint16 _frameNum;
bool _playOnce;
- byte *_buffer;
byte *_diffFile;
uint32 _size;
bool _stopPlayingEnd;