aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sword1/animation.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 578f4a8a81..e08aeb6fa3 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -430,7 +430,7 @@ void MoviePlayerDXA::setPalette(byte *pal) {
}
bool MoviePlayerDXA::decodeFrame(void) {
- if (_currentFrame < _framesCount) {
+ if ((uint32)_currentFrame < (uint32)getFrameCount()) {
decodeNextFrame();
return true;
}
@@ -441,7 +441,8 @@ void MoviePlayerDXA::processFrame(void) {
}
void MoviePlayerDXA::updateScreen(void) {
- _system->copyRectToScreen(_drawBuffer, _frameWidth, _frameX, _frameY, _frameWidth, _frameHeight);
+ Graphics::Surface *frameBuffer = _system->lockScreen();
+ copyFrameToBuffer((byte *)frameBuffer->pixels, _frameX, _frameY, _frameWidth);
// TODO: Handle the advanced cutscene packs. Do they really exist?
@@ -452,7 +453,6 @@ void MoviePlayerDXA::updateScreen(void) {
// frame to it, and draw on that.
if (_textMan->giveSpriteData(2)) {
- Graphics::Surface *frameBuffer = _system->lockScreen();
byte *src = (byte *)_textMan->giveSpriteData(2) + sizeof(FrameHeader);
byte *dst = (byte *)frameBuffer->getBasePtr(_textX, _textY);
@@ -471,9 +471,10 @@ void MoviePlayerDXA::updateScreen(void) {
dst += frameBuffer->pitch;
}
- _system->unlockScreen();
}
+ _system->unlockScreen();
+
_system->updateScreen();
}