aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
authorMatthew Hoops2014-01-14 19:18:15 -0500
committerMatthew Hoops2014-06-01 22:08:28 -0400
commitc0a172bc71adeaed22fa53c539c5e3743fb87191 (patch)
tree49d88441409fedcddbddc289971651231c38fcc2 /engines/groovie
parent3638f1191cda18f47939aa36eae7a695fbe727c6 (diff)
downloadscummvm-rg350-c0a172bc71adeaed22fa53c539c5e3743fb87191.tar.gz
scummvm-rg350-c0a172bc71adeaed22fa53c539c5e3743fb87191.tar.bz2
scummvm-rg350-c0a172bc71adeaed22fa53c539c5e3743fb87191.zip
GROOVIE: Fix various roq glitches
They should now all decode correctly
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/roq.cpp17
-rw-r--r--engines/groovie/roq.h2
2 files changed, 15 insertions, 4 deletions
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 118b77edce..c7c8831c34 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -46,7 +46,8 @@ namespace Groovie {
ROQPlayer::ROQPlayer(GroovieEngine *vm) :
VideoPlayer(vm), _codingTypeCount(0),
- _bg(&_vm->_graphicsMan->_background) {
+ _bg(&_vm->_graphicsMan->_background),
+ _firstFrame(true) {
// Create the work surfaces
_currBuf = new Graphics::Surface();
@@ -83,6 +84,9 @@ uint16 ROQPlayer::loadInternal() {
_num2blocks = 0;
_num4blocks = 0;
+ // Reset the first frame flag
+ _firstFrame = true;
+
if ((blockHeader.size == 0) && (blockHeader.param == 0)) {
// Set the offset scaling to 2
_offScale = 2;
@@ -117,6 +121,12 @@ void ROQPlayer::buildShowBuf() {
}
}
+ // On the first frame, copy from the current buffer to the prev buffer
+ if (_firstFrame) {
+ _prevBuf->copyFrom(*_currBuf);
+ _firstFrame = false;
+ }
+
// Swap buffers
SWAP(_prevBuf, _currBuf);
}
@@ -237,6 +247,9 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) {
return false;
}
+ // Reset the first frame flag
+ _firstFrame = true;
+
// Save the alpha channel size
_alpha = blockHeader.param;
@@ -412,8 +425,6 @@ 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 (unfinished)");
-
Image::JPEGDecoder jpg;
uint32 startPos = _file->pos();
diff --git a/engines/groovie/roq.h b/engines/groovie/roq.h
index af68d6c14a..7e7d38580e 100644
--- a/engines/groovie/roq.h
+++ b/engines/groovie/roq.h
@@ -82,7 +82,7 @@ private:
byte _offScale;
bool _dirty;
byte _alpha;
-
+ bool _firstFrame;
};
} // End of Groovie namespace