aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-02-15 23:04:48 +0000
committerTravis Howell2006-02-15 23:04:48 +0000
commite98555249e2cef4665dfb7f937f7fa08d1a40dd4 (patch)
tree97b3ddaad63965070f572a60e115c404800b68ac
parentbcef7a167cd012c11eecdab91017b318a8b84fd8 (diff)
downloadscummvm-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.cpp56
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);
+ }
}
}