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/director/director.cpp | |
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/director/director.cpp')
-rw-r--r-- | engines/director/director.cpp | 21 |
1 files changed, 20 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 { |