aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/video/coktel_decoder.cpp26
-rw-r--r--graphics/video/coktel_decoder.h2
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;