SAGA: Added sanity checks for speech box coordinates, like the original. Now, there won't be missing subtitles in certain scenes

svn-id: r27397
This commit is contained in:
Filippos Karapetis 2007-06-14 04:22:23 +00:00
parent 99c65ce24d
commit 585e0781dd

View File

@ -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;