diff options
author | Johannes Schickel | 2013-09-16 17:10:57 -0700 |
---|---|---|
committer | Johannes Schickel | 2013-09-16 17:10:57 -0700 |
commit | 46a69c89f47451ec2a69cf66025624399ca1c2a2 (patch) | |
tree | 88bcf27a7d060c59e41dccd2c3413d3bcf5dba23 /engines | |
parent | ce63a325103234a0bd382891b81a7a6ac4f857a2 (diff) | |
parent | 4063de40705c2b21e092f2a275182b0f41070b15 (diff) | |
download | scummvm-rg350-46a69c89f47451ec2a69cf66025624399ca1c2a2.tar.gz scummvm-rg350-46a69c89f47451ec2a69cf66025624399ca1c2a2.tar.bz2 scummvm-rg350-46a69c89f47451ec2a69cf66025624399ca1c2a2.zip |
Merge pull request #376 from lordhoto/libjpeg
GRAPHICS: Implement JPEGDecoder based on libjpeg.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/configure.engines | 4 | ||||
-rw-r--r-- | engines/groovie/roq.cpp | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/engines/configure.engines b/engines/configure.engines index 195cdda6c7..3c7397fcba 100644 --- a/engines/configure.engines +++ b/engines/configure.engines @@ -16,7 +16,7 @@ add_engine dreamweb "Dreamweb" yes add_engine fullpipe "Full Pipe" yes add_engine gob "Gobli*ns" yes add_engine groovie "Groovie" yes "groovie2" "7th Guest" -add_engine groovie2 "Groovie 2 games" no +add_engine groovie2 "Groovie 2 games" no "" "" "jpeg" add_engine hopkins "Hopkins FBI" yes "" "" "16bit" add_engine hugo "Hugo Trilogy" yes add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3" @@ -52,4 +52,4 @@ add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit" add_engine tsage "TsAGE" yes add_engine tucker "Bud Tucker in Double Trouble" yes -add_engine wintermute "Wintermute" no "" "" "png zlib vorbis 16bit" +add_engine wintermute "Wintermute" no "" "" "jpeg png zlib vorbis 16bit" diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index f9a938bfd4..5592d848a9 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -435,17 +435,13 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { warning("Groovie::ROQ: JPEG frame (unfinished)"); Graphics::JPEGDecoder *jpg = new Graphics::JPEGDecoder(); + jpg->setOutputColorSpace(Graphics::JPEGDecoder::kColorSpaceYUV); jpg->loadStream(*_file); - const byte *y = (const byte *)jpg->getComponent(1)->getPixels(); - const byte *u = (const byte *)jpg->getComponent(2)->getPixels(); - const byte *v = (const byte *)jpg->getComponent(3)->getPixels(); + const Graphics::Surface *srcSurf = jpg->getSurface(); + const byte *src = (const byte *)srcSurf->getPixels(); byte *ptr = (byte *)_currBuf->getPixels(); - for (int i = 0; i < _currBuf->w * _currBuf->h; i++) { - *ptr++ = *y++; - *ptr++ = *u++; - *ptr++ = *v++; - } + memcpy(ptr, src, _currBuf->w * _currBuf->h); delete jpg; return true; |