aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-06-14 04:22:23 +0000
committerFilippos Karapetis2007-06-14 04:22:23 +0000
commit585e0781dd7aecdc5a4452d0ae2d5c619cc97a1a (patch)
treef21d8040b6b5e842567500cd6be6979e1f6ad93c
parent99c65ce24d42d72d7182c9c35a92e669a77e8868 (diff)
downloadscummvm-rg350-585e0781dd7aecdc5a4452d0ae2d5c619cc97a1a.tar.gz
scummvm-rg350-585e0781dd7aecdc5a4452d0ae2d5c619cc97a1a.tar.bz2
scummvm-rg350-585e0781dd7aecdc5a4452d0ae2d5c619cc97a1a.zip
SAGA: Added sanity checks for speech box coordinates, like the original. Now, there won't be missing subtitles in certain scenes
svn-id: r27397
-rw-r--r--engines/saga/actor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index da25d26069..b75b87e0a2 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -1213,7 +1213,10 @@ void Actor::handleSpeech(int msec) {
}
height2 = actor->_screenPosition.y - 50;
- _activeSpeech.speechBox.top = _activeSpeech.drawRect.top = MAX(10, (height2 - height) / 2);
+ if (height2 > _vm->_scene->getHeight())
+ _activeSpeech.speechBox.top = _activeSpeech.drawRect.top = _vm->_scene->getHeight() - 1 - height - 10;
+ else
+ _activeSpeech.speechBox.top = _activeSpeech.drawRect.top = MAX(10, (height2 - height) / 2);
} else {
_activeSpeech.drawRect.left = _activeSpeech.speechBox.left;
_activeSpeech.drawRect.top = _activeSpeech.speechBox.top + (_activeSpeech.speechBox.height() - height) / 2;