diff options
author | Martin Kiewitz | 2009-10-15 18:00:28 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-15 18:00:28 +0000 |
commit | 21d397fdd2bebdc447657924a55f289608ff047c (patch) | |
tree | 1faff71767a79af50cb2afe603d30f2806df0360 /engines | |
parent | fe7b70a4d5d7b6a173227fe22be51a491209c1eb (diff) | |
download | scummvm-rg350-21d397fdd2bebdc447657924a55f289608ff047c.tar.gz scummvm-rg350-21d397fdd2bebdc447657924a55f289608ff047c.tar.bz2 scummvm-rg350-21d397fdd2bebdc447657924a55f289608ff047c.zip |
SCI/newgui: Do textcodeprocessing only for SCI1.1+
svn-id: r45126
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 9a348e5082..1bdb1bbd8f 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -387,8 +387,10 @@ int16 SciGuiGfx::GetLongest(const char *text, int16 maxWidth, GuiResourceId orgF curChar = *text++; switch (curChar) { case 0x7C: - curCharCount++; - curCharCount += TextCodeProcessing(text, orgFontId, oldPenColor); + if (getSciVersion() >= SCI_VERSION_1_1) { + curCharCount++; + curCharCount += TextCodeProcessing(text, orgFontId, oldPenColor); + } continue; case 0xD: @@ -427,13 +429,15 @@ void SciGuiGfx::TextWidth(const char *text, int16 from, int16 len, GuiResourceId while (len--) { curChar = *text++; switch (curChar) { - case 0x7C: - len -= TextCodeProcessing(text, orgFontId, 0); - break; case 0x0A: case 0x0D: textHeight = MAX<int16> (textHeight, _curPort->fontHeight); break; + case 0x7C: + if (getSciVersion() >= SCI_VERSION_1_1) { + len -= TextCodeProcessing(text, orgFontId, 0); + break; + } default: textHeight = MAX<int16> (textHeight, _curPort->fontHeight); textWidth += _font->getCharWidth(curChar); @@ -505,15 +509,15 @@ void SciGuiGfx::DrawText(const char *text, int16 from, int16 len, GuiResourceId while (len--) { curChar = (*text++); switch (curChar) { - case 0x7C: - len -= TextCodeProcessing(text, orgFontId, orgPenColor); - break; - case 0x0A: case 0x0D: case 0: break; - + case 0x7C: + if (getSciVersion() >= SCI_VERSION_1_1) { + len -= TextCodeProcessing(text, orgFontId, orgPenColor); + break; + } default: charWidth = _font->getCharWidth(curChar); // clear char |