[Scummvm-cvs-logs] scummvm master -> 36c851d0e47b18205ac7ac91eb33666e4abe95ca

bluegr bluegr at gmail.com
Thu Dec 25 15:23:36 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:
36c851d0e4 ZVISION: Fix frame rate for RLF videos and remove hack in AnimationNode


Commit: 36c851d0e47b18205ac7ac91eb33666e4abe95ca
    https://github.com/scummvm/scummvm/commit/36c851d0e47b18205ac7ac91eb33666e4abe95ca
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-25T16:22:36+02:00

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

_frameTime refers to msec, not ticks

Changed paths:
    engines/zvision/scripting/sidefx/animation_node.cpp
    engines/zvision/video/rlf_decoder.h



diff --git a/engines/zvision/scripting/sidefx/animation_node.cpp b/engines/zvision/scripting/sidefx/animation_node.cpp
index dec70e2..97c6eee 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 d56ff2d..740f3fd 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 {






More information about the Scummvm-git-logs mailing list