diff options
author | Martin Kiewitz | 2015-06-13 10:00:36 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-13 10:18:46 +0200 |
commit | b5a4f622c293733b6067a27af09b44931295fd72 (patch) | |
tree | 70ac04060d5cd57fcaef11e8abaec542495d600a /engines/sherlock/scalpel | |
parent | 0f1b756242def7cf09d7f7f4427a3d5122879f1c (diff) | |
download | scummvm-rg350-b5a4f622c293733b6067a27af09b44931295fd72.tar.gz scummvm-rg350-b5a4f622c293733b6067a27af09b44931295fd72.tar.bz2 scummvm-rg350-b5a4f622c293733b6067a27af09b44931295fd72.zip |
SHERLOCK: 3DO: support for cAnim data (startCAnim)
it's now possible to leave the first room
Conflicts:
engines/sherlock/objects.cpp
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_scene.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/sherlock/scalpel/scalpel_scene.cpp b/engines/sherlock/scalpel/scalpel_scene.cpp index 813e4188ae..c4da8e09a0 100644 --- a/engines/sherlock/scalpel/scalpel_scene.cpp +++ b/engines/sherlock/scalpel/scalpel_scene.cpp @@ -568,21 +568,26 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) { Common::String fname = cAnim._name + ".vgs"; if (!res.isInCache(fname)) { // Set up RRM scene data - Common::SeekableReadStream *rrmStream = res.load(_rrmName); - rrmStream->seek(44 + cAnimNum * 4); - rrmStream->seek(rrmStream->readUint32LE()); + Common::SeekableReadStream *roomStream = res.load(_roomFilename); + roomStream->seek(cAnim._dataOffset); + //rrmStream->seek(44 + cAnimNum * 4); + //rrmStream->seek(rrmStream->readUint32LE()); // Load the canimation into the cache - Common::SeekableReadStream *imgStream = !_lzwMode ? rrmStream->readStream(cAnim._size) : - Resources::decompressLZ(*rrmStream, cAnim._size); + Common::SeekableReadStream *imgStream = !_lzwMode ? roomStream->readStream(cAnim._dataSize) : + Resources::decompressLZ(*roomStream, cAnim._dataSize); res.addToCache(fname, *imgStream); delete imgStream; - delete rrmStream; + delete roomStream; } // Now load the resource as an image - cObj._images = new ImageFile(fname); + if (_vm->getPlatform() != Common::kPlatform3DO) { + cObj._images = new ImageFile(fname); + } else { + cObj._images = new ImageFile3DO(fname, kImageFile3DOType_RoomFormat); + } cObj._imageFrame = &(*cObj._images)[0]; cObj._maxFrames = cObj._images->size(); |