diff options
author | Paweł Kołodziejski | 2003-06-02 17:32:13 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-06-02 17:32:13 +0000 |
commit | 0bf6779189b0fd66b5ec1d12cd6446a4a2c52ecd (patch) | |
tree | 9da5272d3ca56c4d5c8be1b2cc58bedbfb03b5af | |
parent | fa93fe294fd7f6fd412cfa069aa26cdba5425cad (diff) | |
download | scummvm-rg350-0bf6779189b0fd66b5ec1d12cd6446a4a2c52ecd.tar.gz scummvm-rg350-0bf6779189b0fd66b5ec1d12cd6446a4a2c52ecd.tar.bz2 scummvm-rg350-0bf6779189b0fd66b5ec1d12cd6446a4a2c52ecd.zip |
added load directory support for v1 games
svn-id: r8273
-rw-r--r-- | scumm/resource_v2.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp index 1e0fc3c073..07722a3297 100644 --- a/scumm/resource_v2.cpp +++ b/scumm/resource_v2.cpp @@ -25,7 +25,41 @@ #include "resource.h" void Scumm_v2::readClassicIndexFile() { - error("Classic non-blocked format not yet implemented"); + if (_gameId == GID_MANIAC) { + _numGlobalObjects = 800; + _numRooms = 55; + _numCostumes = 35; + _numScripts = 200; + _numSounds = 100; + } else if (_gameId == GID_ZAK) { + _numGlobalObjects = 775; + _numRooms = 61; + _numCostumes = 37; + _numScripts = 155; + _numSounds = 120; + } else { + error("Scumm_v1::readEchancedIndexFile(). Unknown game variant."); + } + + _fileHandle.seek(0, SEEK_SET); + + readMAXS(); + + // Jamieson630: palManipulate variable initialization + _palManipCounter = 0; + _palManipPalette = 0; // Will allocate when needed + _palManipIntermediatePal = 0; // Will allocate when needed + + _fileHandle.readUint16LE(); /* version magic number */ + for (int i = 0; i != _numGlobalObjects; i++) { + byte tmp = _fileHandle.readByte(); + _objectOwnerTable[i] = tmp & OF_OWNER_MASK; + _objectStateTable[i] = tmp >> OF_STATE_SHL; + } + readResTypeList(rtRoom, MKID('ROOM'), "room"); + readResTypeList(rtCostume, MKID('COST'), "costume"); + readResTypeList(rtScript, MKID('SCRP'), "script"); + readResTypeList(rtSound, MKID('SOUN'), "sound"); } void Scumm_v2::readEnhancedIndexFile() { |