[Scummvm-cvs-logs] SF.net SVN: scummvm: [22070] scummvm/trunk/engines/simon/charset.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Apr 21 03:48:12 CEST 2006


Revision: 22070
Author:   eriktorbjorn
Date:     2006-04-21 03:47:43 -0700 (Fri, 21 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22070&view=rev

Log Message:
-----------
Adjust buffer sizes for conversation options, even for sprite id 1. This
doesn't seem to match the original, but there are cases where even the first
string is long enough to cause text corruption.

For whatever reason, I have not been able to reproduce this text corruption
with the original interpreter, though, so maybe we're missing some detail. Or
maybe the original interpreter just gets lucky.

Modified Paths:
--------------
    scummvm/trunk/engines/simon/charset.cpp
Modified: scummvm/trunk/engines/simon/charset.cpp
===================================================================
--- scummvm/trunk/engines/simon/charset.cpp	2006-04-21 10:24:22 UTC (rev 22069)
+++ scummvm/trunk/engines/simon/charset.cpp	2006-04-21 10:47:43 UTC (rev 22070)
@@ -211,8 +211,14 @@
 		// after this one. By default, each buffer is only 9000 bytes
 		// long. A two-line string can very well be more than twice
 		// that size!
-		if (vga_sprite_id != 1)
-			WRITE_LE_UINT16(p + 8, READ_LE_UINT32(p) + width * height);
+		//
+		// The original seems to make an exception for sprite id 1, but
+		// even the first conversation option can be a long line. For
+		// some reason, I cannot reproduce the text corruption with the
+		// original interpreter, though, so maybe we're missing some
+		// detail here. Let's hope it's safe to always adjust the
+		// buffer size anyway.
+		WRITE_LE_UINT16(p + 8, READ_LE_UINT32(p) + width * height);
 	} else {
 		WRITE_BE_UINT16(p + 4, height);
 		WRITE_BE_UINT16(p + 6, width);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list