aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/coktelvideo.cpp
diff options
context:
space:
mode:
authorSven Hesse2008-02-29 22:24:52 +0000
committerSven Hesse2008-02-29 22:24:52 +0000
commit5878f701c103cf792db6b5454688dca0c3379477 (patch)
tree23e518f81aeebe6ba2c34ba7aaffd8e7bed38cf8 /engines/gob/coktelvideo.cpp
parenta47e5aa5f57055bb399382f7a30811f0a8629f92 (diff)
downloadscummvm-rg350-5878f701c103cf792db6b5454688dca0c3379477.tar.gz
scummvm-rg350-5878f701c103cf792db6b5454688dca0c3379477.tar.bz2
scummvm-rg350-5878f701c103cf792db6b5454688dca0c3379477.zip
Fixed some Lost in Time bugs:
- CD cutscenes are drawn correctly know - CD cutscenes are (more) correctly synced now - The cursor doesn't flicker anymore when a video is played in the background svn-id: r31014
Diffstat (limited to 'engines/gob/coktelvideo.cpp')
-rw-r--r--engines/gob/coktelvideo.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index 6e8c8d9efd..1668a123be 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -131,7 +131,7 @@ bool Imd::load(Common::SeekableReadStream &stream) {
_audioStream = Audio::makeAppendableAudioStream(_soundFreq, 0);
} else
- _frameLength = 1000 / 12; // 12 FPS for a video without sound
+ _frameLength = 1000 / _frameRate;
// Sizes of the frame data and extra video buffer
if (_features & kFeaturesDataSize) {
@@ -185,6 +185,14 @@ void Imd::unload() {
clear();
}
+void Imd::setFrameRate(int16 frameRate) {
+ if (frameRate == 0)
+ frameRate = 1;
+
+ _frameRate = frameRate;
+ _frameLength = 1000 / _frameRate;
+}
+
void Imd::setXY(int16 x, int16 y) {
// Adjusting the standard coordinates
if (_stdX != -1) {
@@ -426,6 +434,7 @@ void Imd::clear(bool del) {
_audioStream = 0;
+ _frameRate = 12;
_frameLength = 0;
_lastFrameTime = 0;
}
@@ -927,7 +936,7 @@ bool Vmd::load(Common::SeekableReadStream &stream) {
_audioStream = Audio::makeAppendableAudioStream(_soundFreq,
(_soundBytesPerSample == 2) ? Audio::Mixer::FLAG_16BITS : 0);
} else
- _frameLength = 1000 / 12; // 12 FPS for a video without sound
+ _frameLength = 1000 / _frameRate;
uint32 frameInfoOffset = _stream->readUint32LE();