aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorPaul Gilbert2012-10-25 08:09:28 +1100
committerPaul Gilbert2012-10-25 08:09:28 +1100
commit5f56afdef469d5f02ad26d56f017dd788ece169c (patch)
tree25e0e3b4e67c334ee842f9053291d2f79bb16e98 /engines/hopkins
parentff1659ec7e2e38063179f0703e653ae979452be9 (diff)
downloadscummvm-rg350-5f56afdef469d5f02ad26d56f017dd788ece169c.tar.gz
scummvm-rg350-5f56afdef469d5f02ad26d56f017dd788ece169c.tar.bz2
scummvm-rg350-5f56afdef469d5f02ad26d56f017dd788ece169c.zip
HOPKINS: Fix text display to have trailing spaces like the original.
This improves the display of text boxes, giving extra padding on the right hand side.
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/font.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index e70983dd04..651d0d40f5 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -350,7 +350,7 @@ LABEL_57:
++actualSize;
Txt[idx].lines[v20] = Common::String((const char *)v61 + v65, actualSize);
- TRIER_TEXT[lineCount++] = actualSize;
+ TRIER_TEXT[lineCount++] = lineSize;
v65 += lineSize;
v11 = v21;
@@ -365,7 +365,8 @@ LABEL_57:
v23 = 0;
if (v22 - 1 > 0) {
do {
- v24 = Txt[idx].lines[v66][v23];
+ Common::String &line = Txt[idx].lines[v66];
+ v24 = (v23 >= (int)line.size()) ? '\0' : line[v23];
if ((byte)v24 <= 0x1Fu)
v24 = 32;
ptrc += _vm->_objectsManager.Get_Largeur(_vm->_globals.police, (byte)v24 - 32);