From 5f56afdef469d5f02ad26d56f017dd788ece169c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 25 Oct 2012 08:09:28 +1100 Subject: 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. --- engines/hopkins/font.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/hopkins') 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); -- cgit v1.2.3