aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
authorMatthew Hoops2014-02-27 21:27:23 -0500
committerMatthew Hoops2014-02-28 00:27:28 -0500
commit740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7 (patch)
treed1f414522b8effe91dc2e4c75443ca18a30fc0ef /engines/groovie
parentcbf085287c74e0994fb18fb0830ccdb340b5b0ac (diff)
downloadscummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.tar.gz
scummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.tar.bz2
scummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.zip
IMAGE: Move all ImageDecoders to image/
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/roq.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 88f14b859e..4b3fb81828 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -32,7 +32,7 @@
#include "common/textconsole.h"
#include "graphics/palette.h"
-#include "graphics/decoders/jpeg.h"
+#include "image/jpeg.h"
#ifdef USE_RGB_COLOR
// Required for the YUV to RGB conversion
@@ -435,20 +435,18 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) {
warning("Groovie::ROQ: JPEG frame (unfinished)");
- Graphics::JPEGDecoder *jpg = new Graphics::JPEGDecoder();
- jpg->setOutputColorSpace(Graphics::JPEGDecoder::kColorSpaceYUV);
+ Image::JPEGDecoder jpg;
+ jpg.setOutputColorSpace(Image::JPEGDecoder::kColorSpaceYUV);
uint32 startPos = _file->pos();
Common::SeekableSubReadStream subStream(_file, startPos, startPos + blockHeader.size, DisposeAfterUse::NO);
- jpg->loadStream(subStream);
+ jpg.loadStream(subStream);
- const Graphics::Surface *srcSurf = jpg->getSurface();
+ const Graphics::Surface *srcSurf = jpg.getSurface();
const byte *src = (const byte *)srcSurf->getPixels();
byte *ptr = (byte *)_currBuf->getPixels();
memcpy(ptr, src, _currBuf->w * _currBuf->h * srcSurf->format.bytesPerPixel);
- delete jpg;
-
_file->seek(startPos + blockHeader.size);
return true;
}