diff options
-rw-r--r-- | engines/sherlock/objects.cpp | 13 | ||||
-rw-r--r-- | engines/sherlock/resources.cpp | 1 | ||||
-rw-r--r-- | engines/sherlock/scene.cpp | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 772f9d23d1..9620a01806 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -477,6 +477,7 @@ Object::Object() { * Load the data for the object */ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { + uint32 p = s.pos(); warning("%.4x", p); char buffer[41]; s.read(buffer, 12); _name = Common::String(buffer); @@ -508,11 +509,10 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { _goto.x = s.readSint16LE(); _goto.y = s.readSint16LE(); - _pickup = s.readByte(); - _defaultCommand = s.readByte(); - _lookFlag = s.readUint16LE(); - if (!isRoseTattoo) - _pickupFlag = s.readUint16LE(); + _pickup = isRoseTattoo ? 0 : s.readByte(); + _defaultCommand = isRoseTattoo ? 0 : s.readByte(); + _lookFlag = s.readSint16LE(); + _pickupFlag = isRoseTattoo ? 0 : s.readSint16LE(); _requiredFlag = s.readSint16LE(); _noShapeSize.x = s.readUint16LE(); _noShapeSize.y = s.readUint16LE(); @@ -547,7 +547,7 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { _quickDraw = s.readByte(); _scaleVal = s.readUint16LE(); - _requiredFlag1 = s.readUint16LE(); + _requiredFlag1 = s.readSint16LE(); _gotoSeq = s.readByte(); _talkSeq = s.readByte(); _restoreSlot = s.readByte(); @@ -559,6 +559,7 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { for (int idx = 0; idx < 4; ++idx) _use[idx].load(s, false); } + warning("%.4x", s.pos() - p); } /** diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp index 9acba0ba2f..1c154a3a5f 100644 --- a/engines/sherlock/resources.cpp +++ b/engines/sherlock/resources.cpp @@ -324,7 +324,6 @@ void ImageFile::load(Common::SeekableReadStream &stream, bool skipPalette, bool frame._offset.y = stream.readByte(); } - frame._offset.y = stream.readByte(); frame._rleEncoded = !skipPalette && frame._rleEncoded; if (frame._paletteBase) { diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 54155db4bb..bf8d837f9e 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -318,11 +318,11 @@ bool Scene::loadScene(const Common::String &filename) { // Read information if (_vm->getGameID() == GType_SerratedScalpel) { Common::SeekableReadStream *infoStream = !_lzwMode ? rrmStream : - res.decompress(*rrmStream, bgHeader._numImages * 569 + bgHeader._descSize + bgHeader._seqSize); + res.decompress(*rrmStream, bgHeader._numStructs * 569 + bgHeader._descSize + bgHeader._seqSize); _bgShapes.resize(bgHeader._numStructs); for (int idx = 0; idx < bgHeader._numStructs; ++idx) - _bgShapes[idx].load(*infoStream, _vm->getGameID() == GType_RoseTattoo); + _bgShapes[idx].load(*infoStream, false); if (bgHeader._descSize) { _descText.resize(bgHeader._descSize); @@ -338,11 +338,11 @@ bool Scene::loadScene(const Common::String &filename) { delete infoStream; } else { // Load shapes - Common::SeekableReadStream *infoStream = !_lzwMode ? rrmStream : res.decompress(*rrmStream, bgHeader._numImages * 625); + Common::SeekableReadStream *infoStream = !_lzwMode ? rrmStream : res.decompress(*rrmStream, bgHeader._numStructs * 625); _bgShapes.resize(bgHeader._numStructs); for (int idx = 0; idx < bgHeader._numStructs; ++idx) - _bgShapes[idx].load(*infoStream, _vm->getGameID() == GType_RoseTattoo); + _bgShapes[idx].load(*infoStream, true); if (_lzwMode) delete infoStream; |