[Scummvm-cvs-logs] scummvm master -> 221ee34926927693182f835a4404eca17bdb1943

bluegr md5 at scummvm.org
Wed Jun 20 03:30:19 CEST 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
221ee34926 SCI: Don't attempt to draw line feed characters in SCI32


Commit: 221ee34926927693182f835a4404eca17bdb1943
    https://github.com/scummvm/scummvm/commit/221ee34926927693182f835a4404eca17bdb1943
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-06-19T18:28:59-07:00

Commit Message:
SCI: Don't attempt to draw line feed characters in SCI32

Fixes junk in the about dialogs in PQ4

Changed paths:
    engines/sci/graphics/text32.cpp



diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index 7907809..e0f16e7 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;






More information about the Scummvm-git-logs mailing list