From 7a7c2ad61ea461c5c7185e5595cdacb2c9cde021 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 4 Jul 2015 00:41:29 +0300 Subject: SHERLOCK: Use IS_ROSE_TATTOO / IS_SERRATED_SCALPEL in more places --- engines/sherlock/image_file.cpp | 2 +- engines/sherlock/resources.cpp | 6 +++--- engines/sherlock/scene.cpp | 2 +- engines/sherlock/talk.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp index b9d87d4f0d..c202ab3dca 100644 --- a/engines/sherlock/image_file.cpp +++ b/engines/sherlock/image_file.cpp @@ -96,7 +96,7 @@ void ImageFile::load(Common::SeekableReadStream &stream, bool skipPalette, bool byte *data = new byte[frame._size + 4]; stream.read(data, frame._size); Common::fill(data + frame._size, data + frame._size + 4, 0); - frame.decompressFrame(data, _vm->getGameID() == GType_RoseTattoo); + frame.decompressFrame(data, IS_ROSE_TATTOO); delete[] data; push_back(frame); diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp index 5aea8cc071..206d7173ac 100644 --- a/engines/sherlock/resources.cpp +++ b/engines/sherlock/resources.cpp @@ -298,7 +298,7 @@ int Resources::resourceIndex() const { Common::SeekableReadStream *Resources::decompress(Common::SeekableReadStream &source) { // This variation can't be used by Rose Tattoo, since compressed resources include the input size, // not the output size. Which means their decompression has to be done via passed buffers - assert(_vm->getGameID() == GType_SerratedScalpel); + assert(IS_SERRATED_SCALPEL); uint32 id = source.readUint32BE(); assert(id == MKTAG('L', 'Z', 'V', 0x1A)); @@ -308,7 +308,7 @@ Common::SeekableReadStream *Resources::decompress(Common::SeekableReadStream &so } Common::SeekableReadStream *Resources::decompress(Common::SeekableReadStream &source, uint32 outSize) { - int inSize = (_vm->getGameID() == GType_RoseTattoo) ? source.readSint32LE() : -1; + int inSize = IS_ROSE_TATTOO ? source.readSint32LE() : -1; byte *outBuffer = (byte *)malloc(outSize); Common::MemoryReadStream *outStream = new Common::MemoryReadStream(outBuffer, outSize, DisposeAfterUse::YES); @@ -318,7 +318,7 @@ Common::SeekableReadStream *Resources::decompress(Common::SeekableReadStream &so } void Resources::decompress(Common::SeekableReadStream &source, byte *buffer, uint32 outSize) { - int inputSize = (_vm->getGameID() == GType_RoseTattoo) ? source.readSint32LE() : -1; + int inputSize = IS_ROSE_TATTOO ? source.readSint32LE() : -1; decompressLZ(source, buffer, outSize, inputSize); } diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index c948baa176..ea761fea49 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -390,7 +390,7 @@ bool Scene::loadScene(const Common::String &filename) { _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 (_compressed) delete infoStream; diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index d7388fc32b..217b24a772 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -424,7 +424,7 @@ void Talk::talkTo(const Common::String &filename) { // previous script can continue popStack(); - if (_vm->getGameID() == GType_SerratedScalpel && filename == "Tube59c") { + if (IS_SERRATED_SCALPEL && filename == "Tube59c") { // WORKAROUND: Original game bug causes the results of testing the powdery substance // to disappear too quickly. Introduce a delay to allow it to be properly displayed ui._menuCounter = 30; -- cgit v1.2.3