aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2014-12-25 16:22:36 +0200
committerFilippos Karapetis2014-12-25 16:22:36 +0200
commit36c851d0e47b18205ac7ac91eb33666e4abe95ca (patch)
treedfd87482fa37bf4186495ae49c1621178b1651aa /engines
parent5535cb02fc8dfaf2c77911c223c912f5b07bdb63 (diff)
downloadscummvm-rg350-36c851d0e47b18205ac7ac91eb33666e4abe95ca.tar.gz
scummvm-rg350-36c851d0e47b18205ac7ac91eb33666e4abe95ca.tar.bz2
scummvm-rg350-36c851d0e47b18205ac7ac91eb33666e4abe95ca.zip
ZVISION: Fix frame rate for RLF videos and remove hack in AnimationNode
_frameTime refers to msec, not ticks
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/scripting/sidefx/animation_node.cpp16
-rw-r--r--engines/zvision/video/rlf_decoder.h2
2 files changed, 5 insertions, 13 deletions
diff --git a/engines/zvision/scripting/sidefx/animation_node.cpp b/engines/zvision/scripting/sidefx/animation_node.cpp
index dec70e2642..97c6eeeab5 100644
--- a/engines/zvision/scripting/sidefx/animation_node.cpp
+++ b/engines/zvision/scripting/sidefx/animation_node.cpp
@@ -39,20 +39,12 @@ AnimationNode::AnimationNode(ZVision *engine, uint32 controlKey, const Common::S
_mask(mask),
_animation(NULL) {
- if (fileName.hasSuffix(".rlf")) {
- // HACK: Read the frame delay directly
- Common::File *tmp = engine->getSearchManager()->openFile(fileName);
- if (tmp) {
- tmp->seek(176, SEEK_SET);
- _frmDelay = Common::Rational(tmp->readUint32LE(), 10).toInt();
- delete tmp;
- }
+ _animation = engine->loadAnimation(fileName);
- _animation = engine->loadAnimation(fileName);
- } else {
- _animation = engine->loadAnimation(fileName);
+ if (fileName.hasSuffix(".rlf"))
+ _frmDelay = _animation->getTimeToNextFrame();
+ else
_frmDelay = Common::Rational(1000, _animation->getDuration().framerate()).toInt();
- }
if (frate > 0)
_frmDelay = 1000.0 / frate;
diff --git a/engines/zvision/video/rlf_decoder.h b/engines/zvision/video/rlf_decoder.h
index d56ff2da92..740f3fdd43 100644
--- a/engines/zvision/video/rlf_decoder.h
+++ b/engines/zvision/video/rlf_decoder.h
@@ -53,7 +53,7 @@ private:
bool seek(const Audio::Timestamp &time);
protected:
- Common::Rational getFrameRate() const { return Common::Rational(60, _frameTime); }
+ Common::Rational getFrameRate() const { return Common::Rational(1000, _frameTime); }
private:
enum EncodingType {