aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-10-02 23:07:43 +0000
committerTorbjörn Andersson2006-10-02 23:07:43 +0000
commit60aee54bfefc492b19f6c50a2040f182bab3bdda (patch)
tree6d9cb7579682df05ae2dc56c066b484b7b78b01b /engines/sword2
parent1ee0c4f1cec55b90813688f6d135d2ace916c67e (diff)
downloadscummvm-rg350-60aee54bfefc492b19f6c50a2040f182bab3bdda.tar.gz
scummvm-rg350-60aee54bfefc492b19f6c50a2040f182bab3bdda.tar.bz2
scummvm-rg350-60aee54bfefc492b19f6c50a2040f182bab3bdda.zip
Fixed bug #1569594 ("BS2 DXA Movie Exit/Crash"). That's what I get for only
testing with subtitles enabled... :-) svn-id: r24089
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/animation.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index bf60623f92..aaffbb1dc8 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -254,23 +254,25 @@ void MoviePlayer::drawTextObject(MovieTextObject *t) {
}
void MoviePlayer::undrawTextObject(MovieTextObject *t) {
- int xPos, yPos;
+ if (t->textSprite) {
+ int xPos, yPos;
- calcTextPosition(t, xPos, yPos);
+ calcTextPosition(t, xPos, yPos);
- // We only need to undraw the text if it's outside the frame. Otherwise
- // the next frame will cover the old text anyway.
+ // We only need to undraw the text if it's outside the frame.
+ // Otherwise the next frame will cover the old text anyway.
- if (yPos + t->textSprite->h > _frameY + _frameHeight || t->textSprite->w > _frameWidth) {
- int screenWidth = _vm->_screen->getScreenWide();
- byte *dst = _frameBuffer + yPos * screenWidth + xPos;
+ if (yPos + t->textSprite->h > _frameY + _frameHeight || t->textSprite->w > _frameWidth) {
+ int screenWidth = _vm->_screen->getScreenWide();
+ byte *dst = _frameBuffer + yPos * screenWidth + xPos;
- for (int y = 0; y < t->textSprite->h; y++) {
- memset(dst, 0, t->textSprite->w);
- dst += screenWidth;
- }
+ for (int y = 0; y < t->textSprite->h; y++) {
+ memset(dst, 0, t->textSprite->w);
+ dst += screenWidth;
+ }
- _system->copyRectToScreen(_frameBuffer + yPos * screenWidth + xPos, screenWidth, xPos, yPos, t->textSprite->w, t->textSprite->h);
+ _system->copyRectToScreen(_frameBuffer + yPos * screenWidth + xPos, screenWidth, xPos, yPos, t->textSprite->w, t->textSprite->h);
+ }
}
}