aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-08-31 13:49:06 +0000
committerMax Horn2002-08-31 13:49:06 +0000
commitbc42d1a2e6cdbdedec30095333af09e2d1dc1154 (patch)
tree228aa9cf7bd7dc103fd59936ba5f2965bb3bac83 /scumm
parent2618a9bfdc6d908554bd4ddfba331529bea32c5a (diff)
downloadscummvm-rg350-bc42d1a2e6cdbdedec30095333af09e2d1dc1154.tar.gz
scummvm-rg350-bc42d1a2e6cdbdedec30095333af09e2d1dc1154.tar.bz2
scummvm-rg350-bc42d1a2e6cdbdedec30095333af09e2d1dc1154.zip
fixed text centering in GF_OLD256 games, e.g. during the Indy3 intro and in the F7 dialog (bug #599598)
svn-id: r4879
Diffstat (limited to 'scumm')
-rw-r--r--scumm/string.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index b955cf5dca..6177114c6b 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -70,7 +70,7 @@ int CharsetRenderer::getStringWidth(int arg, byte *text, int pos)
}
}
if (_vm->_features & GF_OLD256) {
- width += 8;
+ width += getSpacing(chr);
} else {
offs = READ_LE_UINT32(ptr + chr * 4 + 4);
if (offs) {
@@ -1018,11 +1018,12 @@ void CharsetRenderer::drawBits()
}
}
+// do spacing for variable width old-style font
int CharsetRenderer::getSpacing(char chr)
{
int space;
- if (_curId == 1) { // do spacing for variable width old-style font
+ if (_curId == 1) {
switch (chr) {
case '.':
space = 1;