aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-06-02 15:20:43 +0000
committerTorbjörn Andersson2007-06-02 15:20:43 +0000
commit475abaf9dc80b14c35cb287439dc0ec22f970ac6 (patch)
tree98c0fb7e68cecc9b2a8f39ed75f15926881a1103
parent89abea6b517c5f6b9e1925c53fe0fcbd9aa50dad (diff)
downloadscummvm-rg350-475abaf9dc80b14c35cb287439dc0ec22f970ac6.tar.gz
scummvm-rg350-475abaf9dc80b14c35cb287439dc0ec22f970ac6.tar.bz2
scummvm-rg350-475abaf9dc80b14c35cb287439dc0ec22f970ac6.zip
Actually drop the DXA frame (i.e. don't update the screen) when we say we do.
svn-id: r27053
-rw-r--r--engines/agos/animation.cpp16
-rw-r--r--engines/agos/animation.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index 1e1eaaf7e9..afd8930a60 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -230,9 +230,8 @@ void MoviePlayer::nextFrame() {
void MoviePlayer::handleNextFrame() {
decodeNextFrame();
- processFrame();
-
- _vm->_system->updateScreen();
+ if (processFrame())
+ _vm->_system->updateScreen();
_frameNum++;
Common::Event event;
@@ -285,7 +284,7 @@ void MoviePlayer::setPalette(byte *pal) {
_vm->_system->setPalette(palette, 0, 256);
}
-void MoviePlayer::processFrame() {
+bool MoviePlayer::processFrame() {
copyFrameToBuffer(_vm->getFrontBuf(), (_vm->_screenWidth - _width) / 2, (_vm->_screenHeight - _height) / 2, _vm->_screenWidth);
_vm->_system->copyRectToScreen(_vm->getFrontBuf(), _vm->_screenWidth, 0, 0, _vm->_screenWidth, _vm->_screenHeight);
@@ -309,10 +308,13 @@ void MoviePlayer::processFrame() {
while (_vm->_system->getMillis() < _ticks)
_vm->_system->delayMillis(10);
}
- } else {
- warning("dropped frame %i", _frameNum);
- _frameSkipped++;
+
+ return true;
}
+
+ warning("dropped frame %i", _frameNum);
+ _frameSkipped++;
+ return false;
}
const char * MoviePlayer::_sequenceList[90] = {
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 07b2ebcd93..310cd0c05f 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -64,7 +64,7 @@ private:
void playOmniTV();
void handleNextFrame();
- void processFrame();
+ bool processFrame();
void startSound();
};