diff options
author | Matthew Hoops | 2010-05-23 18:33:55 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-05-23 18:33:55 +0000 |
commit | 2f31b05651baf87ea07bc00cced798955a5fa6be (patch) | |
tree | eedade6bd746422fe45e8c48c76d1dd667a45b20 /engines/mohawk/graphics.cpp | |
parent | e2a388e2f59f689cd89995013236e90a1b004264 (diff) | |
download | scummvm-rg350-2f31b05651baf87ea07bc00cced798955a5fa6be.tar.gz scummvm-rg350-2f31b05651baf87ea07bc00cced798955a5fa6be.tar.bz2 scummvm-rg350-2f31b05651baf87ea07bc00cced798955a5fa6be.zip |
Move Mohawk's QuickTime code to graphics/ (and QDM2 to sound, disabled when Mohawk is not enabled) so SCI can use the code.
svn-id: r49165
Diffstat (limited to 'engines/mohawk/graphics.cpp')
-rw-r--r-- | engines/mohawk/graphics.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp index 35691c36aa..1b220c861b 100644 --- a/engines/mohawk/graphics.cpp +++ b/engines/mohawk/graphics.cpp @@ -78,8 +78,7 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : _vm(vm) { error("Myst requires greater than 256 colors to run"); if (_vm->getFeatures() & GF_ME) { - // We want to delete our own JPEG surfaces, so don't free after use. - _jpegDecoder = new JPEGDecoder(false); + _jpegDecoder = new Graphics::JPEGDecoder(); _pictDecoder = new MystPICT(_jpegDecoder); } else { _jpegDecoder = NULL; @@ -152,9 +151,10 @@ void MystGraphics::copyImageSectionToScreen(uint16 image, Common::Rect src, Comm if (_vm->getFeatures() & GF_ME && _vm->getPlatform() == Common::kPlatformMacintosh && _pictureFile.picFile.isOpen()) { for (uint32 i = 0; i < _pictureFile.pictureCount; i++) if (_pictureFile.entries[i].id == image) { - if (_pictureFile.entries[i].type == 0) - surface = _jpegDecoder->decodeImage(new Common::SeekableSubReadStream(&_pictureFile.picFile, _pictureFile.entries[i].offset, _pictureFile.entries[i].offset + _pictureFile.entries[i].size)); - else if (_pictureFile.entries[i].type == 1) + if (_pictureFile.entries[i].type == 0) { + Graphics::Surface *jpegSurface = _jpegDecoder->decodeImage(new Common::SeekableSubReadStream(&_pictureFile.picFile, _pictureFile.entries[i].offset, _pictureFile.entries[i].offset + _pictureFile.entries[i].size)); + surface->copyFrom(*jpegSurface); + } else if (_pictureFile.entries[i].type == 1) surface = _pictDecoder->decodeImage(new Common::SeekableSubReadStream(&_pictureFile.picFile, _pictureFile.entries[i].offset, _pictureFile.entries[i].offset + _pictureFile.entries[i].size)); else error ("Unknown Picture File type %d", _pictureFile.entries[i].type); |