diff options
author | Willem Jan Palenstijn | 2009-07-11 09:45:25 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-07-11 09:45:25 +0000 |
commit | d3d06626e41a28c70b489a164a018c0ba65d0547 (patch) | |
tree | ff8d23016aecb14d9b09b614bd907fc3fdfde412 /engines/saga/font.cpp | |
parent | 6bf91ab66f392df80ae1171d7882127b1ab81dcf (diff) | |
download | scummvm-rg350-d3d06626e41a28c70b489a164a018c0ba65d0547.tar.gz scummvm-rg350-d3d06626e41a28c70b489a164a018c0ba65d0547.tar.bz2 scummvm-rg350-d3d06626e41a28c70b489a164a018c0ba65d0547.zip |
Fix oversight in r42361 and also handle consecutive copied characters in SAGA.
svn-id: r42378
Diffstat (limited to 'engines/saga/font.cpp')
-rw-r--r-- | engines/saga/font.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp index 1c1c3100c4..d58d1a8900 100644 --- a/engines/saga/font.cpp +++ b/engines/saga/font.cpp @@ -154,6 +154,7 @@ void Font::createOutline(FontData *font) { unsigned char *destPointer2; unsigned char *destPointer3; unsigned char charRep; + int nextIndex = 0; // Populate new font style character data @@ -167,7 +168,7 @@ void Font::createOutline(FontData *font) { bool skip = false; - if (i > 0 && font->normal.fontCharEntry[i].width != 0 && font->normal.fontCharEntry[i].index < font->normal.fontCharEntry[i-1].index) { + if (font->normal.fontCharEntry[i].width != 0 && font->normal.fontCharEntry[i].index < nextIndex) { // Some characters are copies of earlier characters. // Look up the original, and make sure not to grow the size of // the outline font twice. @@ -200,8 +201,10 @@ void Font::createOutline(FontData *font) { font->outline.fontCharEntry[i].width = font->normal.fontCharEntry[i].width + 2; font->outline.fontCharEntry[i].byteWidth = newByteWidth; - if (!skip) + if (!skip) { newRowLength += newByteWidth; + nextIndex = font->normal.fontCharEntry[i].index + oldByteWidth; + } } debug(2, "New row length: %d", newRowLength); |