diff options
author | Travis Howell | 2006-02-15 23:04:48 +0000 |
---|---|---|
committer | Travis Howell | 2006-02-15 23:04:48 +0000 |
commit | e98555249e2cef4665dfb7f937f7fa08d1a40dd4 (patch) | |
tree | 97b3ddaad63965070f572a60e115c404800b68ac | |
parent | bcef7a167cd012c11eecdab91017b318a8b84fd8 (diff) | |
download | scummvm-rg350-e98555249e2cef4665dfb7f937f7fa08d1a40dd4.tar.gz scummvm-rg350-e98555249e2cef4665dfb7f937f7fa08d1a40dd4.tar.bz2 scummvm-rg350-e98555249e2cef4665dfb7f937f7fa08d1a40dd4.zip |
Read correct index by block size in HE games again, to help track down unknown versions.
svn-id: r20709
-rw-r--r-- | engines/scumm/resource.cpp | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index c916183b9e..42599dc3d0 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -1233,35 +1233,37 @@ void ScummEngine_v7::readMAXS(int blockSize) { #endif void ScummEngine_v6::readMAXS(int blockSize) { - debug(0, "ScummEngine_v6 readMAXS: MAXS has blocksize %d", blockSize); + if (blockSize == 38) { + debug(0, "ScummEngine_v6 readMAXS: MAXS has blocksize %d", blockSize); + + _numVariables = _fileHandle->readUint16LE(); + _fileHandle->readUint16LE(); + _numBitVariables = _fileHandle->readUint16LE(); + _numLocalObjects = _fileHandle->readUint16LE(); + _numArray = _fileHandle->readUint16LE(); + _fileHandle->readUint16LE(); + _numVerbs = _fileHandle->readUint16LE(); + _numFlObject = _fileHandle->readUint16LE(); + _numInventory = _fileHandle->readUint16LE(); + _numRooms = _fileHandle->readUint16LE(); + _numScripts = _fileHandle->readUint16LE(); + _numSounds = _fileHandle->readUint16LE(); + _numCharsets = _fileHandle->readUint16LE(); + _numCostumes = _fileHandle->readUint16LE(); + _numGlobalObjects = _fileHandle->readUint16LE(); + _numNewNames = 50; + + _objectRoomTable = NULL; + _numGlobalScripts = 200; - _numVariables = _fileHandle->readUint16LE(); - _fileHandle->readUint16LE(); - _numBitVariables = _fileHandle->readUint16LE(); - _numLocalObjects = _fileHandle->readUint16LE(); - _numArray = _fileHandle->readUint16LE(); - _fileHandle->readUint16LE(); - _numVerbs = _fileHandle->readUint16LE(); - _numFlObject = _fileHandle->readUint16LE(); - _numInventory = _fileHandle->readUint16LE(); - _numRooms = _fileHandle->readUint16LE(); - _numScripts = _fileHandle->readUint16LE(); - _numSounds = _fileHandle->readUint16LE(); - _numCharsets = _fileHandle->readUint16LE(); - _numCostumes = _fileHandle->readUint16LE(); - _numGlobalObjects = _fileHandle->readUint16LE(); - _numNewNames = 50; - - _objectRoomTable = NULL; - _numGlobalScripts = 200; - - if (_heversion >= 70) { - _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); - } + if (_heversion >= 70) { + _objectRoomTable = (byte *)calloc(_numGlobalObjects, 1); + } - if (_heversion <= 70) { - _shadowPaletteSize = 256; - _shadowPalette = (byte *)calloc(_shadowPaletteSize, 1); + if (_heversion <= 70) { + _shadowPaletteSize = 256; + _shadowPalette = (byte *)calloc(_shadowPaletteSize, 1); + } } } |