LAB: Read the header of DIFF files when opening them

This commit is contained in:
Filippos Karapetis 2016-01-14 02:14:54 +02:00
parent b61ade788e
commit 280bd0f7c2
2 changed files with 3 additions and 4 deletions

View File

@ -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;
}

View File

@ -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) {