mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
MYST3: Fix the last frame of simple movies not being played
Fixes #1310.
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -154,7 +154,8 @@ public:
|
||||
SimpleMovie(Myst3Engine *vm, uint16 id);
|
||||
virtual ~SimpleMovie();
|
||||
|
||||
bool update();
|
||||
void update();
|
||||
bool endOfVideo();
|
||||
|
||||
void playStartupSound();
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user