aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/animation_he.cpp3
-rw-r--r--engines/scumm/he/script_v100he.cpp2
-rw-r--r--engines/scumm/he/script_v90he.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp
index 11d7e87f34..5bd60d32e3 100644
--- a/engines/scumm/he/animation_he.cpp
+++ b/engines/scumm/he/animation_he.cpp
@@ -128,9 +128,8 @@ void MoviePlayer::handleNextFrame() {
_vm->markRectAsDirty(kMainVirtScreen, imageRect);
}
- if (getCurFrame() == getFrameCount()) {
+ if (endOfVideo())
closeFile();
- }
}
void MoviePlayer::setPalette(byte *pal) {
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index b304454e19..e32409fe85 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -2937,7 +2937,7 @@ void ScummEngine_v100he::o100_getVideoData() {
break;
case 73:
pop();
- push(_moviePlay->getCurFrame());
+ push(_moviePlay->endOfVideo() ? -1 : (_moviePlay->getCurFrame() + 1));
break;
case 84:
pop();
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index cff34412bd..091bf5027b 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -1464,7 +1464,7 @@ void ScummEngine_v90he::o90_getVideoData() {
break;
case 52: // Get current frame
pop();
- push(_moviePlay->getCurFrame());
+ push(_moviePlay->endOfVideo() ? -1 : (_moviePlay->getCurFrame() + 1));
break;
case 63: // Get image number
pop();