diff options
author | Travis Howell | 2009-10-08 09:33:20 +0000 |
---|---|---|
committer | Travis Howell | 2009-10-08 09:33:20 +0000 |
commit | 982950941c8fa0f240dcc3b4393beb0a61d23a31 (patch) | |
tree | b6ee677692de52037c86ade9fe6a4c8356d1f815 | |
parent | bac0c769475bde85a240c557b7dab28c345dae4a (diff) | |
download | scummvm-rg350-982950941c8fa0f240dcc3b4393beb0a61d23a31.tar.gz scummvm-rg350-982950941c8fa0f240dcc3b4393beb0a61d23a31.tar.bz2 scummvm-rg350-982950941c8fa0f240dcc3b4393beb0a61d23a31.zip |
The layout of global object data is different in the PCE version of Loom.
svn-id: r44779
-rw-r--r-- | engines/scumm/resource_v4.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/engines/scumm/resource_v4.cpp b/engines/scumm/resource_v4.cpp index 75858f7b42..808fcbd73e 100644 --- a/engines/scumm/resource_v4.cpp +++ b/engines/scumm/resource_v4.cpp @@ -199,14 +199,28 @@ void ScummEngine_v4::readGlobalObjects() { uint32 bits; byte tmp; - for (i = 0; i != num; i++) { - bits = _fileHandle->readByte(); - bits |= _fileHandle->readByte() << 8; - bits |= _fileHandle->readByte() << 16; - _classData[i] = bits; - tmp = _fileHandle->readByte(); - _objectOwnerTable[i] = tmp & OF_OWNER_MASK; - _objectStateTable[i] = tmp >> OF_STATE_SHL; + if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) { + for (i = 0; i != num; i++) { + bits = _fileHandle->readByte(); + bits |= _fileHandle->readByte() << 8; + bits |= _fileHandle->readByte() << 16; + _classData[i] = bits; + } + for (i = 0; i != num; i++) { + tmp = _fileHandle->readByte(); + _objectOwnerTable[i] = tmp & OF_OWNER_MASK; + _objectStateTable[i] = tmp >> OF_STATE_SHL; + } + } else { + for (i = 0; i != num; i++) { + bits = _fileHandle->readByte(); + bits |= _fileHandle->readByte() << 8; + bits |= _fileHandle->readByte() << 16; + _classData[i] = bits; + tmp = _fileHandle->readByte(); + _objectOwnerTable[i] = tmp & OF_OWNER_MASK; + _objectStateTable[i] = tmp >> OF_STATE_SHL; + } } // FIXME: Indy3 FM-TOWNS has 32 extra bytes of unknown meaning |