diff options
author | Sven Hesse | 2011-01-31 13:29:19 +0000 |
---|---|---|
committer | Sven Hesse | 2011-01-31 13:29:19 +0000 |
commit | a8d62921c74fb08c795754e8e819d50fbd75990d (patch) | |
tree | f912e7f27c3f1daa6850337591934e67e1bffd72 | |
parent | 9810ec14420466830a182d17e384c2037ca0034b (diff) | |
download | scummvm-rg350-a8d62921c74fb08c795754e8e819d50fbd75990d.tar.gz scummvm-rg350-a8d62921c74fb08c795754e8e819d50fbd75990d.tar.bz2 scummvm-rg350-a8d62921c74fb08c795754e8e819d50fbd75990d.zip |
GOB: Fix text end positons for non-monospaced fonts
Fixes Adibou's recipices.
svn-id: r55682
-rw-r--r-- | engines/gob/draw_v2.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8ff7fc64a4..5eb6780468 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -447,9 +447,12 @@ void Draw_v2::printTotText(int16 id) { } } - rectLeft = _fonts[_fontIndex]->getCharWidth(); + rectLeft = 0; + for (int i = 0; i < strPosBak; i++) + rectLeft += _fonts[_fontIndex]->getCharWidth(str[i]); + adjustCoords(1, &rectLeft, 0); - offX += strPosBak * rectLeft; + offX += rectLeft; strPos = 0; strPos2 = -1; memset(mask, 0, 80); |