diff options
author | Sven Hesse | 2010-08-08 01:03:50 +0000 |
---|---|---|
committer | Sven Hesse | 2010-08-08 01:03:50 +0000 |
commit | af96a0fa3bfe0509efbdf99d15b1dd0d146f8968 (patch) | |
tree | 8ab2893808957f75b28ac274a508402e55ecc95e /graphics/video | |
parent | cebc1aca818eb3912feaee12716e78d6d8210b48 (diff) | |
download | scummvm-rg350-af96a0fa3bfe0509efbdf99d15b1dd0d146f8968.tar.gz scummvm-rg350-af96a0fa3bfe0509efbdf99d15b1dd0d146f8968.tar.bz2 scummvm-rg350-af96a0fa3bfe0509efbdf99d15b1dd0d146f8968.zip |
VIDEO: Implement VMDDecoder::setXY()
svn-id: r51912
Diffstat (limited to 'graphics/video')
-rw-r--r-- | graphics/video/coktel_decoder.cpp | 26 | ||||
-rw-r--r-- | graphics/video/coktel_decoder.h | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index 9d056da48d..3caf7f2e7f 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -1502,6 +1502,30 @@ bool VMDDecoder::seek(int32 frame, int whence, bool restart) { return true; } +void VMDDecoder::setXY(uint16 x, uint16 y) { + for (uint32 i = 0; i < _frameCount; i++) { + for (int j = 0; j < _partsPerFrame; j++) { + + if (_frames[i].parts[j].type == kPartTypeVideo) { + if (x != 0xFFFF) { + _frames[i].parts[j].left = _frames[i].parts[j].left - _x + x; + _frames[i].parts[j].right = _frames[i].parts[j].right - _x + x; + } + if (y != 0xFFFF) { + _frames[i].parts[j].top = _frames[i].parts[j].top - _y + y; + _frames[i].parts[j].bottom = _frames[i].parts[j].bottom - _y + y; + } + } + + } + } + + if (x != 0xFFFF) + _x = x; + if (y != 0xFFFF) + _y = y; +} + bool VMDDecoder::load(Common::SeekableReadStream *stream) { close(); @@ -2047,11 +2071,13 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) { if (_externalCodec) { // TODO + warning("_external codec"); return false; } if (_blitMode > 0) { // TODO + warning("_blitMode == %d", _blitMode); return false; } diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index 60fdb57123..755406b491 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -343,6 +343,8 @@ public: bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); + void setXY(uint16 x, uint16 y); + bool getFrameCoords(int16 frame, int16 &x, int16 &y, int16 &width, int16 &height); bool hasEmbeddedFiles() const; |