[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.43,2.44 intern.h,2.505,2.506

Eugene Sandulenko sev at users.sourceforge.net
Tue May 31 17:46:26 CEST 2005


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

Modified Files:
	cursor.cpp intern.h 
Log Message:
Fix bug #1166917 "FM-TOWNS LOOM: Kanji version crash"


Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -d -r2.43 -r2.44
--- cursor.cpp	19 May 2005 14:15:23 -0000	2.43
+++ cursor.cpp	1 Jun 2005 00:39:22 -0000	2.44
@@ -331,19 +331,20 @@
 	}
 
 	Graphics::Surface s;
-	byte buf[16*16];
-	memset(buf, 123, 16*16);
+	byte buf[16*17];
+	memset(buf, 123, 16*17);
 	s.pixels = buf;
 	s.w = _charset->getCharWidth(chr);
 	s.h = _charset->getFontHeight();
 	s.pitch = s.w;
-	assert(s.w <= 16 && s.h <= 16);
+	// s.h = 17 for FM-TOWNS Loom Japanese. Fixes bug #1166917
+	assert(s.w <= 16 && s.h <= 17);
 	s.bytesPerPixel = 1;
 	
 	_charset->drawChar(chr, s, 0, 0);
 
 	uint16 *ptr = _cursorImages[index];
-	memset(ptr, 0, 16 * sizeof(uint16));
+	memset(ptr, 0, 17 * sizeof(uint16));
 	for (int h = 0; h < s.h; h++) {
 		for (int w = 0; w < s.w; w++) {
 			if (buf[s.pitch * h + w] != 123)

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.505
retrieving revision 2.506
diff -u -d -r2.505 -r2.506
--- intern.h	28 May 2005 10:44:27 -0000	2.505
+++ intern.h	1 Jun 2005 00:39:22 -0000	2.506
@@ -50,7 +50,7 @@
 	
 	const OpcodeEntryV5 *_opcodesV5;
 	
-	uint16 _cursorImages[4][16];
+	uint16 _cursorImages[4][17];
 	byte _cursorHotspots[2 * 4];
 
 public:





More information about the Scummvm-git-logs mailing list