diff options
author | Paweł Kołodziejski | 2003-01-19 09:03:07 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-01-19 09:03:07 +0000 |
commit | 9c342225ef56ca9706f9835ed2157224ede7688e (patch) | |
tree | 982402b4ab9bec10a93a2fc0d3d5e8eadb550141 /scumm/smush | |
parent | 38d832ed1f674d76e3bcb33e10e2329459bba5f4 (diff) | |
download | scummvm-rg350-9c342225ef56ca9706f9835ed2157224ede7688e.tar.gz scummvm-rg350-9c342225ef56ca9706f9835ed2157224ede7688e.tar.bz2 scummvm-rg350-9c342225ef56ca9706f9835ed2157224ede7688e.zip |
fixed subtitles placement
svn-id: r6513
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/frenderer.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scumm/smush/frenderer.cpp b/scumm/smush/frenderer.cpp index 84451da672..6c3978fb5d 100644 --- a/scumm/smush/frenderer.cpp +++ b/scumm/smush/frenderer.cpp @@ -367,15 +367,11 @@ bool FontRenderer::drawStringWrapCentered(const char * str, char * buffer, const y = size.getY() - height; } - if(x - max_substr_width / 2 < 0) { - x = max_substr_width / 2; - } else if (x + max_substr_width / 2 >= size.getX()) { - x = size.getX() - 1 - max_substr_width / 2; - } + x = (size.getX() - max_substr_width) / 2; for(i = 0; i < nb_subs; i++) { int32 substr_width = substr_widths[i]; - drawSubstring((const byte *)substrings[i], buffer, size, x - substr_width / 2, y); + drawSubstring((const byte *)substrings[i], buffer, size, x + (max_substr_width - substr_width) / 2, y); y += stringHeight(substrings[i]); delete []substrings[i]; } |