aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-10-07 23:01:53 -0400
committerMatthew Hoops2011-10-07 23:13:31 -0400
commit8a717d28d82b0cd48a9dfdacd7686d88abcc09f2 (patch)
treefa44477740fb500c08f340e322d14ee0a1d176b3 /engines
parente1dc4db7aa53d1bbc4cdb03d1163c97d049702f5 (diff)
downloadscummvm-rg350-8a717d28d82b0cd48a9dfdacd7686d88abcc09f2.tar.gz
scummvm-rg350-8a717d28d82b0cd48a9dfdacd7686d88abcc09f2.tar.bz2
scummvm-rg350-8a717d28d82b0cd48a9dfdacd7686d88abcc09f2.zip
PEGASUS: Fix frames after turning
Diffstat (limited to 'engines')
-rwxr-xr-xengines/pegasus/movie.cpp11
-rwxr-xr-xengines/pegasus/movie.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp
index be3819efb3..ec1b033cfd 100755
--- a/engines/pegasus/movie.cpp
+++ b/engines/pegasus/movie.cpp
@@ -177,6 +177,17 @@ void Movie::pause() {
TimeBase::pause();
}
+TimeValue Movie::getDuration(const TimeScale scale) const {
+ // Unlike TimeBase::getDuration(), this returns the whole duration of the movie
+ // The original source has a TODO to make this behave like TimeBase::getDuration(),
+ // but the problem is that too much code requires this function to behave this way...
+
+ if (_video)
+ return _video->getDuration() * ((scale == 0) ? getScale() : scale) / 1000;
+
+ return 0;
+}
+
void Movie::checkCallBacks() {
TimeBase::checkCallBacks();
diff --git a/engines/pegasus/movie.h b/engines/pegasus/movie.h
index 3983a6f942..31b567407f 100755
--- a/engines/pegasus/movie.h
+++ b/engines/pegasus/movie.h
@@ -64,6 +64,8 @@ public:
virtual void moveMovieBoxTo(const tCoordType, const tCoordType);
+ virtual TimeValue getDuration(const TimeScale = 0) const;
+
// *** HACK ALERT
Video::SeekableVideoDecoder *getMovie() { return _video; }
void setVolume(uint16);