From 2296aad042aad1c9983b4a9bf2e187912c361407 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Aug 2010 00:44:33 +0000 Subject: VIDEO/GOB: Fix IMD playing Fix IMD playing for some fringe cases, especially when seeking beforehand. svn-id: r51871 --- engines/gob/mult_v2.cpp | 9 +++++++-- engines/gob/videoplayer.h | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 8c58183b3c..d9e94199c3 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -1129,6 +1129,8 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir, return; } + _vm->_vidPlayer->evaluateFlags(props); + int slot; if ((slot = _vm->_vidPlayer->openVideo(true, imdFile, props)) < 0) return; @@ -1141,13 +1143,16 @@ void Mult_v2::playImd(const char *imdFile, Mult::Mult_ImdKey &key, int16 dir, uint32 baseFrame = startFrame % (props.lastFrame - props.palFrame + 1); + props.endFrame = props.lastFrame; props.startFrame = baseFrame + props.palFrame; props.lastFrame = baseFrame + props.palFrame; + props.flags &= 0x7F; + debugC(2, kDebugVideo, "Playing mult video \"%s\" @ %d+%d, frame %d, " - "paletteCmd %d (%d - %d), flags %X", imdFile, + "paletteCmd %d (%d - %d; %d), flags %X", imdFile, props.x, props.y, props.startFrame, - props.palCmd, props.palStart, props.palEnd, props.flags); + props.palCmd, props.palStart, props.palEnd, props.endFrame, props.flags); _vm->_vidPlayer->play(slot, props); } diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index f1245bca48..1b60e7ffd6 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -79,8 +79,8 @@ public: int16 breakKey; ///< Keycode of the break/abort key. uint16 palCmd; ///< Palette command. - uint16 palStart; ///< Palette entry to start with. - uint16 palEnd; ///< Palette entry to end at. + int16 palStart; ///< Palette entry to start with. + int16 palEnd; ///< Palette entry to end at. int32 palFrame; ///< Frame to apply the palette command at. bool fade; ///< Fade in? -- cgit v1.2.3