[Scummvm-cvs-logs] SF.net SVN: scummvm:[51912] scummvm/trunk/graphics/video

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Aug 8 03:03:50 CEST 2010


Revision: 51912
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51912&view=rev
Author:   drmccoy
Date:     2010-08-08 01:03:50 +0000 (Sun, 08 Aug 2010)

Log Message:
-----------
VIDEO: Implement VMDDecoder::setXY()

Modified Paths:
--------------
    scummvm/trunk/graphics/video/coktel_decoder.cpp
    scummvm/trunk/graphics/video/coktel_decoder.h

Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-08-08 01:03:21 UTC (rev 51911)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-08-08 01:03:50 UTC (rev 51912)
@@ -1502,6 +1502,30 @@
 	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 @@
 
 	if (_externalCodec) {
 		// TODO
+		warning("_external codec");
 		return false;
 	}
 
 	if (_blitMode > 0) {
 		// TODO
+		warning("_blitMode == %d", _blitMode);
 		return false;
 	}
 

Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h	2010-08-08 01:03:21 UTC (rev 51911)
+++ scummvm/trunk/graphics/video/coktel_decoder.h	2010-08-08 01:03:50 UTC (rev 51912)
@@ -343,6 +343,8 @@
 
 	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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list