[Scummvm-cvs-logs] CVS: scummvm/simon charset.cpp,1.14,1.15

Travis Howell kirben at users.sourceforge.net
Sun Aug 3 12:29:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv1991/simon

Modified Files:
	charset.cpp 
Log Message:

Add Hebrew support for spoken text
Thanks to Jamieson


Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/charset.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- charset.cpp	2 Aug 2003 07:10:30 -0000	1.14
+++ charset.cpp	3 Aug 2003 19:28:39 -0000	1.15
@@ -82,6 +82,8 @@
 	dst += READ_BE_UINT32(p);
 
 	memset(dst, 0, count);
+	if (_language == 20)
+		dst += width - 1; // For Hebrew, start at the right edge, not the left.
 
 	dst_org = dst;
 	while ((chr = *txt++) != 0) {
@@ -89,12 +91,14 @@
 			dst_org += width * 10;
 			dst = dst_org;
 		} else if ((chr -= ' ') == 0) {
-			dst += 6;
+			dst += (_language == 20 ? -6 : 6); // Hebrew moves to the left, all others to the right
 		} else {
 			byte *img_hdr = src + 48 + chr * 4;
 			uint img_height = img_hdr[2];
 			uint img_width = img_hdr[3], i;
 			byte *img = src + READ_LE_UINT16(img_hdr);
+			if (_language == 20)
+				dst -= img_width - 1; // For Hebrew, move from right edge to left edge of image.
 			byte *cur_dst = dst;
 
 			if (_game == GAME_SIMON1AMIGA) {
@@ -122,7 +126,8 @@
 				cur_dst += width;
 			} while (--img_height);
 
-			dst += img_width - 1;
+			if (_language != 20) // Hebrew character movement is done higher up
+				dst += img_width - 1;
 		}
 	}
 }





More information about the Scummvm-git-logs mailing list