aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2009-04-22 10:19:10 +0000
committerTravis Howell2009-04-22 10:19:10 +0000
commitd6247fa0e00aa2027c2f03b9863989144a20507b (patch)
tree407756d549f3a8b197486abfa71ded1f449e2679
parentad1f7385df43929f4ea0a2610ae4525aa9d62600 (diff)
downloadscummvm-rg350-d6247fa0e00aa2027c2f03b9863989144a20507b.tar.gz
scummvm-rg350-d6247fa0e00aa2027c2f03b9863989144a20507b.tar.bz2
scummvm-rg350-d6247fa0e00aa2027c2f03b9863989144a20507b.zip
Fix crash that occurs when OmniTV video is played completely, in The Feeble Files.
svn-id: r40063
-rw-r--r--engines/agos/agos.cpp1
-rw-r--r--engines/agos/agos.h1
-rw-r--r--engines/agos/animation.cpp6
-rw-r--r--engines/agos/event.cpp3
-rw-r--r--engines/agos/script_ff.cpp2
5 files changed, 7 insertions, 6 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 56c7ff0c14..2170d4e5dc 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -200,6 +200,7 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_lastVgaTick = 0;
_marks = 0;
+ _omniTV = false;
_scanFlag = false;
_scriptVar2 = 0;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 440c4d42ae..ad46860f38 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -290,6 +290,7 @@ protected:
uint32 _lastVgaTick;
uint16 _marks;
+ bool _omniTV;
bool _scanFlag;
bool _scriptVar2;
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index 12d2dfb71a..92f2c4945f 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -324,6 +324,7 @@ void MoviePlayerDXA::nextFrame() {
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
} else {
closeFile();
+ _vm->_omniTV = false;
_vm->_variableArray[254] = 6747;
}
}
@@ -431,11 +432,6 @@ void MoviePlayerSMK::handleNextFrame() {
}
void MoviePlayerSMK::nextFrame() {
- if (_vm->getBitFlag(42)) {
- closeFile();
- return;
- }
-
if (getCurFrame() < getFrameCount()) {
decodeNextFrame();
copyFrameToBuffer(_vm->getBackBuf(), 465, 222, _vm->_screenWidth);
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 4836ac8035..06322bfe07 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -583,9 +583,10 @@ void AGOSEngine_Feeble::timerProc() {
}
}
- if (getGameType() == GType_FF && _moviePlayer) {
+ if (getGameType() == GType_FF && _omniTV) {
// Controls Omni TV videos
if (getBitFlag(42)) {
+ _omniTV = false;
_moviePlayer->stopVideo();
delete _moviePlayer;
_moviePlayer = NULL;
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index ec6c191db9..4bf43050fc 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -574,6 +574,8 @@ void AGOSEngine_Feeble::off_playVideo() {
if (getBitFlag(40)) {
// Omni TV controls
if (_moviePlayer) {
+ setBitFlag(42, false);
+ _omniTV = true;
_moviePlayer->play();
} else {
_variableArray[254] = 6747;