VIDEO: Add CoktelDecoder::setFrameRate().
Allows client code to overwrite the video's frame rate. svn-id: r51860
This commit is contained in:
parent
f7363fdb10
commit
aa113e5ab3
2 changed files with 11 additions and 1 deletions
|
@ -35,7 +35,7 @@ CoktelDecoder::State::State() : flags(0), speechId(0) {
|
||||||
|
|
||||||
CoktelDecoder::CoktelDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) :
|
CoktelDecoder::CoktelDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) :
|
||||||
_mixer(&mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0), _frameCount(0),
|
_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);
|
memset(_palette, 0, 768);
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,10 @@ void CoktelDecoder::setXY(uint16 x, uint16 y) {
|
||||||
_y = y;
|
_y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoktelDecoder::setFrameRate(Common::Rational frameRate) {
|
||||||
|
_frameRate = frameRate;
|
||||||
|
}
|
||||||
|
|
||||||
const Common::List<Common::Rect> &CoktelDecoder::getDirtyRects() const {
|
const Common::List<Common::Rect> &CoktelDecoder::getDirtyRects() const {
|
||||||
return _dirtyRects;
|
return _dirtyRects;
|
||||||
}
|
}
|
||||||
|
@ -235,6 +239,9 @@ Surface *PreIMDDecoder::decodeNextFrame() {
|
||||||
|
|
||||||
_curFrame++;
|
_curFrame++;
|
||||||
|
|
||||||
|
if (_curFrame == 0)
|
||||||
|
_startTime = g_system->getMillis();
|
||||||
|
|
||||||
return &_surface;
|
return &_surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,9 @@ public:
|
||||||
/** Draw the video starting at this position within the video memory. */
|
/** Draw the video starting at this position within the video memory. */
|
||||||
void setXY(uint16 x, uint16 y);
|
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. */
|
/** Return a list of rectangles that changed in the last frame. */
|
||||||
const Common::List<Common::Rect> &getDirtyRects() const;
|
const Common::List<Common::Rect> &getDirtyRects() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue