MYST3: Fix the last frame of simple movies not being played

Fixes #1310.
This commit is contained in:
Bastien Bouclet
2016-10-29 07:27:30 +02:00
parent cdb138c796
commit cb28fef92c
3 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -390,7 +390,7 @@ SimpleMovie::SimpleMovie(Myst3Engine *vm, uint16 id) :
_startEngineTick = _vm->_state->getTickCount();
}
bool SimpleMovie::update() {
void SimpleMovie::update() {
if (_bink.getCurFrame() < (_startFrame - 1)) {
_bink.seekToFrame(_startFrame - 1);
}
@@ -428,8 +428,10 @@ bool SimpleMovie::update() {
drawNextFrameToTexture();
}
}
}
return !_bink.endOfVideo() && _bink.getCurFrame() < _endFrame;
bool SimpleMovie::endOfVideo() {
return _bink.endOfVideo() || _bink.getCurFrame() >= _endFrame;
}
void SimpleMovie::playStartupSound() {
+2 -1
View File
@@ -154,7 +154,8 @@ public:
SimpleMovie(Myst3Engine *vm, uint16 id);
virtual ~SimpleMovie();
bool update();
void update();
bool endOfVideo();
void playStartupSound();
+3 -1
View File
@@ -1160,7 +1160,9 @@ void Myst3Engine::playSimpleMovie(uint16 id, bool fullframe) {
bool skip = false;
while (!skip && !shouldQuit() && movie.update()) {
while (!skip && !shouldQuit() && !movie.endOfVideo()) {
movie.update();
// Process events
Common::Event event;
while (getEventManager()->pollEvent(event))