From ceb5ef18e5490d07c40adb5797f026de05036387 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 13 Dec 2015 17:46:39 +0200 Subject: LAB: Get rid of a superfluous global variable --- engines/lab/anim.cpp | 7 ++++--- engines/lab/anim.h | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3