[Scummvm-cvs-logs] scummvm master -> 9948d3ca16ceff79dd3ccf6dde5024de04470f08
bluegr
bluegr at gmail.com
Wed Dec 24 05:14:48 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9948d3ca16 ZVISION: Add a hack to set the correct frame delay for RLF videos
Commit: 9948d3ca16ceff79dd3ccf6dde5024de04470f08
https://github.com/scummvm/scummvm/commit/9948d3ca16ceff79dd3ccf6dde5024de04470f08
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-24T06:13:49+02:00
Commit Message:
ZVISION: Add a hack to set the correct frame delay for RLF videos
Also, use Common::Rational to avoid using floating point math
Changed paths:
engines/zvision/scripting/sidefx/animation_node.cpp
diff --git a/engines/zvision/scripting/sidefx/animation_node.cpp b/engines/zvision/scripting/sidefx/animation_node.cpp
index 134ab13..1f62b61 100644
--- a/engines/zvision/scripting/sidefx/animation_node.cpp
+++ b/engines/zvision/scripting/sidefx/animation_node.cpp
@@ -39,8 +39,20 @@ AnimationNode::AnimationNode(ZVision *engine, uint32 controlKey, const Common::S
_mask(mask),
_animation(NULL) {
- _animation = engine->loadAnimation(fileName);
- _frmDelay = 1000.0 / _animation->getDuration().framerate();
+ 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 = tmp->readUint32LE() / 10;
+ delete tmp;
+ }
+
+ _animation = engine->loadAnimation(fileName);
+ } else {
+ _animation = engine->loadAnimation(fileName);
+ _frmDelay = Common::Rational(1000, _animation->getDuration().framerate()).toInt();
+ }
if (frate > 0)
_frmDelay = 1000.0 / frate;
More information about the Scummvm-git-logs
mailing list