From 9eebe512c8c0cfb7bfd73ecd9e9e163cf95f8403 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 5 Dec 2011 00:02:25 +0100 Subject: CGE: Add a hack to fix bug #3450423 (infoline too large in polish version, scene 14) --- engines/cge/talk.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/cge/talk.cpp') diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp index 467b39be40..d9be56e798 100644 --- a/engines/cge/talk.cpp +++ b/engines/cge/talk.cpp @@ -271,7 +271,15 @@ void InfoLine::update(const char *text) { uint16 cw = _vm->_font->_widthArr[(unsigned char)*text]; uint8 *fp = _vm->_font->_map + _vm->_font->_pos[(unsigned char)*text]; - for (uint16 i = 0; i < cw; i++) { + // This hack compensates the font modification done to fix the display + // of the 'F1' text. Specifically, it reduces the width of the space + // character when it has been enlarged. + // This hack fixes bug #3450423. + int8 hackStart = 0; + if ((*text == 0x20) && (cw > 4)) + hackStart = 2; + + for (uint16 i = hackStart; i < cw; i++) { uint16 b = fp[i]; for (uint16 n = 0; n < kFontHigh; n++) { if (b & 1) -- cgit v1.2.3