[Scummvm-cvs-logs] SF.net SVN: scummvm:[51860] scummvm/trunk/graphics/video
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Aug 8 02:39:33 CEST 2010
Revision: 51860
http://scummvm.svn.sourceforge.net/scummvm/?rev=51860&view=rev
Author: drmccoy
Date: 2010-08-08 00:39:32 +0000 (Sun, 08 Aug 2010)
Log Message:
-----------
VIDEO: Add CoktelDecoder::setFrameRate().
Allows client code to overwrite the video's frame rate.
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 00:39:03 UTC (rev 51859)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp 2010-08-08 00:39:32 UTC (rev 51860)
@@ -35,7 +35,7 @@
CoktelDecoder::CoktelDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) :
_mixer(&mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0), _frameCount(0),
- _paletteDirty(false), _ownSurface(true) {
+ _paletteDirty(false), _ownSurface(true), _frameRate(12) {
memset(_palette, 0, 768);
}
@@ -97,6 +97,10 @@
_y = y;
}
+void CoktelDecoder::setFrameRate(Common::Rational frameRate) {
+ _frameRate = frameRate;
+}
+
const Common::List<Common::Rect> &CoktelDecoder::getDirtyRects() const {
return _dirtyRects;
}
@@ -235,6 +239,9 @@
_curFrame++;
+ if (_curFrame == 0)
+ _startTime = g_system->getMillis();
+
return &_surface;
}
Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h 2010-08-08 00:39:03 UTC (rev 51859)
+++ scummvm/trunk/graphics/video/coktel_decoder.h 2010-08-08 00:39:32 UTC (rev 51860)
@@ -67,6 +67,9 @@
/** Draw the video starting at this position within the video memory. */
void setXY(uint16 x, uint16 y);
+ /** Override the video's frame rate. */
+ void setFrameRate(Common::Rational frameRate);
+
/** Return a list of rectangles that changed in the last frame. */
const Common::List<Common::Rect> &getDirtyRects() 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