Skip to content
Permalink
Browse files

ZVISION: Fix frame rate for RLF videos and remove hack in AnimationNode

_frameTime refers to msec, not ticks
  • Loading branch information
bluegr committed Dec 25, 2014
1 parent 5535cb0 commit 36c851d0e47b18205ac7ac91eb33666e4abe95ca
Showing with 5 additions and 13 deletions.
  1. +4 −12 engines/zvision/scripting/sidefx/animation_node.cpp
  2. +1 −1 engines/zvision/video/rlf_decoder.h
@@ -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;
@@ -53,7 +53,7 @@ class RLFDecoder : public Video::VideoDecoder {
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 {

0 comments on commit 36c851d

Please sign in to comment.
You can’t perform that action at this time.