aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2015-12-18 02:01:31 +0100
committerWillem Jan Palenstijn2015-12-23 21:34:08 +0100
commitf452834f7067c63357c5f45d9e15e53d6b178b4b (patch)
treec12087c49d50cf9bbfbf67229bbbe9a146bcf93b
parent69680808d0acb9583f7e60f259f9c70b9e7ed6c5 (diff)
downloadscummvm-rg350-f452834f7067c63357c5f45d9e15e53d6b178b4b.tar.gz
scummvm-rg350-f452834f7067c63357c5f45d9e15e53d6b178b4b.tar.bz2
scummvm-rg350-f452834f7067c63357c5f45d9e15e53d6b178b4b.zip
LAB: Remove unused variables in DIFFHeader and BitMap
-rw-r--r--engines/lab/anim.cpp12
-rw-r--r--engines/lab/anim.h5
-rw-r--r--engines/lab/dispman.cpp1
3 files changed, 7 insertions, 11 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index 75a9af32af..648634bc8f 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -62,7 +62,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) {
_rawDiffBM._drawOnScreen = false;
for (int i = 0; i < 16; i++)
_rawDiffBM._planes[i] = nullptr;
- _rawDiffBM._rows = 0;
_waitForEffect = false;
_stopPlayingEnd = false;
_sampleSpeed = 0;
@@ -298,10 +297,12 @@ void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) {
if (_header == 0) {
// sizeof(headerdata) != 18, but the padding might be at the end
- _headerdata._version = _diffFile->readUint16LE();
+ // 2 bytes, version, unused.
+ _diffFile->skip(2);
_headerdata._width = _diffFile->readUint16LE();
_headerdata._height = _diffFile->readUint16LE();
- _headerdata._depth = _diffFile->readByte();
+ // 1 byte, depth, unused
+ _diffFile->skip(1);
_headerdata._fps = _diffFile->readByte();
// HACK: The original game defines a 1 second delay when changing screens, which is
@@ -313,8 +314,9 @@ void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) {
if (_headerdata._fps == 1)
_headerdata._fps = 0;
- _headerdata._bufferSize = _diffFile->readUint32LE();
- _headerdata._machine = _diffFile->readUint16LE();
+
+ // 4 + 2 bytes, buffer size and machine, unused
+ _diffFile->skip(6);
_headerdata._flags = _diffFile->readUint32LE();
_diffFile->skip(_size - 18);
diff --git a/engines/lab/anim.h b/engines/lab/anim.h
index 0d2497bb73..7e2156742e 100644
--- a/engines/lab/anim.h
+++ b/engines/lab/anim.h
@@ -37,19 +37,14 @@ class LabEngine;
#define CONTINUOUS 0xFFFF
struct DIFFHeader {
- uint16 _version; // unused
uint16 _width;
uint16 _height;
- char _depth; // unused
char _fps;
- uint32 _bufferSize; // unused
- uint16 _machine; // unused
uint32 _flags;
};
struct BitMap {
uint16 _bytesPerRow;
- uint16 _rows; // unused
bool _drawOnScreen;
byte *_planes[16];
};
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index d230225488..77245ef843 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -103,7 +103,6 @@ void DisplayMan::readPict(const char *filename, bool playOnce, bool onlyDiffData
_vm->_music->stopSoundEffect();
_dispBitMap->_bytesPerRow = _screenWidth;
- _dispBitMap->_rows = (maxHeight > 0) ? maxHeight : _screenHeight;
_dispBitMap->_drawOnScreen = (memoryBuffer == nullptr);
if (memoryBuffer)
_dispBitMap->_planes[0] = memoryBuffer;