aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-06-18 10:57:50 +0000
committerTravis Howell2007-06-18 10:57:50 +0000
commitf95c8450cbde8f3e73ead3399fb8ec817023d843 (patch)
tree64e884731447d69c835ebc5e15cfd34065e72f0c
parent71f2f4f6bdcd8261c0fd2cb65c93840ab2aa90a7 (diff)
downloadscummvm-rg350-f95c8450cbde8f3e73ead3399fb8ec817023d843.tar.gz
scummvm-rg350-f95c8450cbde8f3e73ead3399fb8ec817023d843.tar.bz2
scummvm-rg350-f95c8450cbde8f3e73ead3399fb8ec817023d843.zip
Fix line wrapping of text in Elvira 2.
svn-id: r27522
-rw-r--r--engines/agos/window.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index aefe623952..c02a733972 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -60,11 +60,16 @@ WindowBlock *AGOSEngine::openWindow(uint x, uint y, uint w, uint h, uint flags,
window->fill_color = fillColor;
window->text_color = textColor;
window->textColumn = 0;
- window->textRow = 0;
window->textColumnOffset = 0;
- window->textMaxLength = window->width * 8 / 6; // characters are 6 pixels
+ window->textRow = 0;
window->scrollY = 0;
+ // Characters are 6 pixels
+ if (getGameType() == GType_ELVIRA2)
+ window->textMaxLength = (window->width * 8 - 4) / 6;
+ else
+ window->textMaxLength = window->width * 8 / 6;
+
if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
clearWindow(window);