From 9c342225ef56ca9706f9835ed2157224ede7688e Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 19 Jan 2003 09:03:07 +0000 Subject: fixed subtitles placement svn-id: r6513 --- scumm/smush/frenderer.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'scumm/smush') 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]; } -- cgit v1.2.3