aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/movie.cpp10
-rw-r--r--engines/titanic/support/movie.h10
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp
index 3bb9fb88cf..50a55c8218 100644
--- a/engines/titanic/support/movie.cpp
+++ b/engines/titanic/support/movie.cpp
@@ -122,20 +122,20 @@ void OSMovie::play(uint startFrame, uint endFrame, uint initialFrame, uint flags
movieStarted();
}
-void OSMovie::playClip(const Point &drawPos, uint startFrame, uint endFrame) {
+void OSMovie::playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) {
if (!_movieSurface)
_movieSurface = CScreenManager::_screenManagerPtr->createSurface(600, 340);
bool widthLess = _videoSurface->getWidth() < 600;
bool heightLess = _videoSurface->getHeight() < 340;
- Rect r(drawPos.x, drawPos.y,
- drawPos.x + (widthLess ? CLIP_WIDTH_REDUCED : CLIP_WIDTH),
- drawPos.y + (heightLess ? CLIP_HEIGHT_REDUCED : CLIP_HEIGHT)
+ Rect r(drawRect.left, drawRect.top,
+ drawRect.left + (widthLess ? CLIP_WIDTH_REDUCED : CLIP_WIDTH),
+ drawRect.top + (heightLess ? CLIP_HEIGHT_REDUCED : CLIP_HEIGHT)
);
uint timePerFrame = (uint)(1000.0 / _aviSurface._frameRate);
- for (; endFrame >= startFrame; ++startFrame) {
+ for (; startFrame < endFrame; ++startFrame) {
// Set the frame
_aviSurface.setFrame(startFrame);
diff --git a/engines/titanic/support/movie.h b/engines/titanic/support/movie.h
index 2d1c264f03..8c89f9e6dd 100644
--- a/engines/titanic/support/movie.h
+++ b/engines/titanic/support/movie.h
@@ -84,9 +84,10 @@ public:
virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj) = 0;
/**
- * Plays a sub-section of a movie
+ * Plays a sub-section of a movie, and doesn't return until either
+ * the playback ends or a key has been pressed
*/
- virtual void playClip(const Point &drawPos, uint startFrame, uint endFrame) = 0;
+ virtual void playCutscene(const Rect &drawRect, uint startFrame, uint endFrame) = 0;
/**
* Stops the movie
@@ -182,9 +183,10 @@ public:
virtual void play(uint startFrame, uint endFrame, uint initialFrame, uint flags, CGameObject *obj);
/**
- * Plays a sub-section of a movie
+ * Plays a sub-section of a movie, and doesn't return until either
+ * the playback ends or a key has been pressed
*/
- virtual void playClip(const Point &drawPos, uint startFrame, uint endFrame);
+ virtual void playCutscene(const Rect &drawRect, uint startFrame, uint endFrame);
/**
* Stops the movie