aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-05-05 20:47:56 +1000
committerPaul Gilbert2011-05-05 20:48:46 +1000
commitdee398ad6caf741d1bcd81d1a32b26d08ad066d7 (patch)
tree7ec7fb5450fc5f941fe8dc23ab661604cf5ea0da /engines/tsage
parenta428835b38fdc6a0672a760a7cbb16b0a936f124 (diff)
downloadscummvm-rg350-dee398ad6caf741d1bcd81d1a32b26d08ad066d7.tar.gz
scummvm-rg350-dee398ad6caf741d1bcd81d1a32b26d08ad066d7.tar.bz2
scummvm-rg350-dee398ad6caf741d1bcd81d1a32b26d08ad066d7.zip
TSAGE: Fixed problem with text being partly off-screen in Scene #9500
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/converse.cpp12
-rw-r--r--engines/tsage/core.cpp2
2 files changed, 9 insertions, 5 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 46ca557190..789ec8fa8d 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -349,17 +349,19 @@ void SequenceManager::setMessage(int resNum, int lineNum, int color, const Commo
// Get the display message
Common::String msg = _resourceManager->getMessage(resNum, lineNum);
- // Get the needed rect, and move it to the desired position
- Rect textRect;
- _globals->gfxManager().getStringBounds(msg.c_str(), textRect, width);
+ // Set the text message
+ _sceneText.setup(msg);
+
+ // Move the text to the correct position
+ Rect textRect = _sceneText._bounds;
Rect sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
sceneBounds.collapse(4, 2);
textRect.moveTo(pt);
textRect.contain(sceneBounds);
- // Set the text message
- _sceneText.setup(msg);
_sceneText.setPosition(Common::Point(textRect.left, textRect.top));
+
+ // Draw the text
_sceneText.fixPriority(255);
_sceneText.show();
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index da80111aa9..86219a7908 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2535,6 +2535,8 @@ void SceneText::setup(const Common::String &msg) {
gfxMan._font._colors2.foreground = _color3;
gfxMan.getStringBounds(msg.c_str(), textRect, _width);
+ _bounds.setWidth(textRect.width());
+ _bounds.setHeight(textRect.height());
// Set up a new blank surface to hold the text
_textSurface.create(textRect.width(), textRect.height());