[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_font.cpp,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Sat Oct 23 16:10:01 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14363/smush

Modified Files:
	smush_font.cpp 
Log Message:
Patch #1048283 (Improved CJK / FM-TOWNS support & some documention)

Index: smush_font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_font.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- smush_font.cpp	18 Sep 2004 22:42:45 -0000	1.23
+++ smush_font.cpp	23 Oct 2004 23:08:53 -0000	1.24
@@ -43,7 +43,11 @@
 
 	int width = 0;
 	while (*str) {
-		width += getCharWidth(*str++);
+		if(*str & 0x80 && g_scumm->_useCJKMode) {
+			width += g_scumm->_2byteWidth + 1;
+			str += 2;
+		} else
+			width += getCharWidth(*str++);
 	}
 	return width;
 }
@@ -118,18 +122,25 @@
 	int h = _vm->_2byteHeight;
 
 	byte *src = _vm->get2byteCharPtr(idx);
-	byte *dst = buffer + dst_width * (y + (_vm->_gameId == GID_CMI ? 7 : 2)) + x;
+	byte *dst = buffer + dst_width * (y + (_vm->_gameId == GID_CMI ? 7 : (_vm->_gameId == GID_DIG ? 2 : 0))) + x;
 	byte bits = 0;
 
 	char color = (_color != -1) ? _color : 1;
+
 	if (_new_colors)
-		color = (char)0xff; //FIXME;
+		color = (char)0xff;
+
+	if (g_scumm->_gameId == GID_FT)
+		color = 1;
+
 	for (int j = 0; j < h; j++) {
 		for (int i = 0; i < w; i++) {
 			if ((i % 8) == 0)
 				bits = *src++;
 			if (bits & revBitMask[i % 8]) {
 				dst[i + 1] = 0;
+				dst[dst_width + i] = 0;
+				dst[dst_width + i + 1] = 0;
 				dst[i] = color;
 			}
 		}





More information about the Scummvm-git-logs mailing list