aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorFilippos Karapetis2016-01-14 02:14:54 +0200
committerFilippos Karapetis2016-01-14 23:41:34 +0200
commit280bd0f7c2d426a1725118067db08ca2ca917e43 (patch)
tree90e17d036bae7865b39a6369d877e265c0c66e29 /engines/lab
parentb61ade788e75f7c610f46333aefd4559ad6f28e1 (diff)
downloadscummvm-rg350-280bd0f7c2d426a1725118067db08ca2ca917e43.tar.gz
scummvm-rg350-280bd0f7c2d426a1725118067db08ca2ca917e43.tar.bz2
scummvm-rg350-280bd0f7c2d426a1725118067db08ca2ca917e43.zip
LAB: Read the header of DIFF files when opening them
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/anim.cpp5
-rw-r--r--engines/lab/dispman.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index 6e2f6fd81d..3da4519109 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -286,10 +286,9 @@ void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) {
_diffFile = diffFile;
_continuous = false;
- uint32 signature1 = _diffFile->readUint32BE();
- uint32 signature2 = _diffFile->readUint32LE();
- if ((signature1 != MKTAG('D', 'I', 'F', 'F')) || (signature2 != 1219009121)) {
+ uint32 magicBytes = _diffFile->readUint32LE();
+ if (magicBytes != 1219009121) {
_isPlaying = false;
return;
}
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index e4bef24f5f..674549a9c4 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -67,7 +67,7 @@ DisplayMan::~DisplayMan() {
void DisplayMan::loadPict(const Common::String filename) {
freePict();
- _curBitmap = _vm->_resource->openDataFile(filename);
+ _curBitmap = _vm->_resource->openDataFile(filename, MKTAG('D', 'I', 'F', 'F'));
}
void DisplayMan::loadBackPict(const Common::String fileName, uint16 *highPal) {