diff options
Diffstat (limited to 'engines/groovie')
| -rw-r--r-- | engines/groovie/roq.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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; |
