diff options
author | Scott Thomas | 2009-07-01 15:08:11 +0000 |
---|---|---|
committer | Scott Thomas | 2009-07-01 15:08:11 +0000 |
commit | bf18c79ba602172fb5b01293b9dc2e98b75e2e09 (patch) | |
tree | 9e8161c1c6d66b67266867e083331fd00dccfcea /engines/groovie | |
parent | f67f820010665e83e753da097a4ce20559afd36a (diff) | |
download | scummvm-rg350-bf18c79ba602172fb5b01293b9dc2e98b75e2e09.tar.gz scummvm-rg350-bf18c79ba602172fb5b01293b9dc2e98b75e2e09.tar.bz2 scummvm-rg350-bf18c79ba602172fb5b01293b9dc2e98b75e2e09.zip |
Add JPEG support to 11H for ROQ playback
svn-id: r41991
Diffstat (limited to 'engines/groovie')
-rw-r--r-- | engines/groovie/roq.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index cacc243c2c..3868443e96 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -29,6 +29,8 @@ #include "groovie/groovie.h" #include "groovie/roq.h" +#include "graphics/jpeg.h" + #ifdef ENABLE_RGB_COLOR // Required for the YUV to RGB conversion #include "graphics/dither.h" @@ -485,18 +487,21 @@ void ROQPlayer::processBlockQuadVectorBlockSub(int baseX, int baseY, int8 Mx, in bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::ROQ: Processing still (JPEG) block"); - warning("Groovie::ROQ: JPEG frame (unimplemented)"); + warning("Groovie::ROQ: JPEG frame (unfinshed)"); + + Graphics::JPEG *jpg = new Graphics::JPEG(); + jpg->read(_file); + byte *y = (byte *)jpg->getComponent(1)->getBasePtr(0, 0); + byte *u = (byte *)jpg->getComponent(2)->getBasePtr(0, 0); + byte *v = (byte *)jpg->getComponent(3)->getBasePtr(0, 0); - // HACK: Initialize to a black frame - //memset(_prevBuf->getBasePtr(0, 0), 0, _prevBuf->w * _prevBuf->h * _prevBuf->bytesPerPixel); byte *ptr = (byte *)_prevBuf->getBasePtr(0, 0); for (int i = 0; i < _prevBuf->w * _prevBuf->h; i++) { - *ptr++ = 0; - *ptr++ = 128; - *ptr++ = 128; + *ptr++ = *y++; + *ptr++ = *u++; + *ptr++ = *v++; } - _file->skip(blockHeader.size); return true; } |