aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2012-06-20 04:25:20 +0300
committerFilippos Karapetis2012-06-20 04:28:59 +0300
commit221ee34926927693182f835a4404eca17bdb1943 (patch)
treeb1e70525f238f0e01bc10f1963e3b43ed1353537 /engines/sci
parentf92f9f9faf34d378939761e211649572ec72cd25 (diff)
downloadscummvm-rg350-221ee34926927693182f835a4404eca17bdb1943.tar.gz
scummvm-rg350-221ee34926927693182f835a4404eca17bdb1943.tar.bz2
scummvm-rg350-221ee34926927693182f835a4404eca17bdb1943.zip
SCI: Don't attempt to draw line feed characters in SCI32
Fixes junk in the about dialogs in PQ4
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/text32.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index 7907809c91..e0f16e7265 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -165,10 +165,25 @@ reg_t GfxText32::createTextBitmapInternal(Common::String &text, reg_t textObject
warning("Invalid alignment %d used in TextBox()", alignment);
}
+ unsigned char curChar;
+
for (int i = 0; i < charCount; i++) {
- unsigned char curChar = txt[i];
- font->drawToBuffer(curChar, curY + offsetY, curX + offsetX, foreColor, dimmed, bitmap, width, height);
- curX += font->getCharWidth(curChar);
+ curChar = txt[i];
+
+ switch (curChar) {
+ case 0x0A:
+ case 0x0D:
+ case 0:
+ case 0x9781: // this one is used by SQ4/japanese as line break as well
+ break;
+ case 0x7C:
+ warning("Code processing isn't implemented in SCI32");
+ break;
+ default:
+ font->drawToBuffer(curChar, curY + offsetY, curX + offsetX, foreColor, dimmed, bitmap, width, height);
+ curX += font->getCharWidth(curChar);
+ break;
+ }
}
curX = 0;