mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
GROOVIE: Fix various roq glitches
They should now all decode correctly
This commit is contained in:
parent
3638f1191c
commit
c0a172bc71
@ -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();
|
||||
|
@ -82,7 +82,7 @@ private:
|
||||
byte _offScale;
|
||||
bool _dirty;
|
||||
byte _alpha;
|
||||
|
||||
bool _firstFrame;
|
||||
};
|
||||
|
||||
} // End of Groovie namespace
|
||||
|
Loading…
Reference in New Issue
Block a user