diff options
author | Matthew Hoops | 2012-11-15 10:03:33 -0500 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | c607b85a4653ad18de81df0128688e9e537fa5ba (patch) | |
tree | 455b24f90921bc53afab967444d1b3b657b5a9aa /engines | |
parent | b4cf46486de25caa8df84de6b78fc85e0aaec581 (diff) | |
download | scummvm-rg350-c607b85a4653ad18de81df0128688e9e537fa5ba.tar.gz scummvm-rg350-c607b85a4653ad18de81df0128688e9e537fa5ba.tar.bz2 scummvm-rg350-c607b85a4653ad18de81df0128688e9e537fa5ba.zip |
DIRECTOR: Add parsing support for v7
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/director.cpp | 21 | ||||
-rw-r--r-- | engines/director/director.h | 1 |
2 files changed, 21 insertions, 1 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 10dce678f8..f7593127f6 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -80,6 +80,11 @@ void DirectorEngine::loadEXE() { case 5: loadEXEv5(exeStream); break; + case 7: + loadEXEv7(exeStream); + break; + default: + error("Unhandled Windows EXE version %d", getVersion()); } } @@ -138,6 +143,20 @@ void DirectorEngine::loadEXEv5(Common::SeekableReadStream *stream) { loadEXERIFX(stream, rifxOffset); } +void DirectorEngine::loadEXEv7(Common::SeekableReadStream *stream) { + if (stream->readUint32LE() != MKTAG('P', 'J', '0', '0')) + error("Invalid projector tag found in v5 EXE"); + + uint32 rifxOffset = stream->readUint32LE(); + stream->readUint32LE(); // unknown + stream->readUint32LE(); // unknown + stream->readUint32LE(); // unknown + stream->readUint32LE(); // unknown + stream->readUint32LE(); // some DLL offset + + loadEXERIFX(stream, rifxOffset); +} + void DirectorEngine::loadEXERIFX(Common::SeekableReadStream *stream, uint32 offset) { stream->seek(offset); @@ -168,7 +187,7 @@ void DirectorEngine::loadMac() { uint32 tag = dataFork->readUint32BE(); - if (SWAP_BYTES_32(tag) == MKTAG('P', 'J', '9', '3') || tag == MKTAG('P', 'J', '9', '5')) { + if (SWAP_BYTES_32(tag) == MKTAG('P', 'J', '9', '3') || tag == MKTAG('P', 'J', '9', '5') || tag == MKTAG('P', 'J', '0', '0')) { // PPC: The RIFX shares the data fork with the binary dataFork->seek(dataFork->readUint32BE()); } else { diff --git a/engines/director/director.h b/engines/director/director.h index 00198014e5..2d1c39518a 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -67,6 +67,7 @@ private: void loadEXEv3(Common::SeekableReadStream *stream); void loadEXEv4(Common::SeekableReadStream *stream); void loadEXEv5(Common::SeekableReadStream *stream); + void loadEXEv7(Common::SeekableReadStream *stream); void loadEXERIFX(Common::SeekableReadStream *stream, uint32 offset); void loadMac(); |