[Scummvm-cvs-logs] SF.net SVN: scummvm: [21371] scummvm/trunk/engines/scumm

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Mar 18 18:52:01 CET 2006


Revision: 21371
Author:   kirben
Date:     2006-03-18 18:50:51 -0800 (Sat, 18 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21371&view=rev

Log Message:
-----------
Add workaround for script bug in Loom (CD)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/intern.h
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm.cpp
Modified: scummvm/trunk/engines/scumm/intern.h
===================================================================
--- scummvm/trunk/engines/scumm/intern.h	2006-03-18 18:38:33 UTC (rev 21370)
+++ scummvm/trunk/engines/scumm/intern.h	2006-03-19 02:50:51 UTC (rev 21371)
@@ -195,6 +195,8 @@
 public:
 	ScummEngine_v4(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], SubstResFileNames subst);
 
+	virtual void scummInit();
+
 protected:
 	virtual void readIndexFile();
 	virtual void loadCharset(int no);

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2006-03-18 18:38:33 UTC (rev 21370)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2006-03-19 02:50:51 UTC (rev 21371)
@@ -2306,12 +2306,9 @@
 		b = getVarOrDirectByte(PARAM_2);
 		c = getVarOrDirectByte(PARAM_3);
 		ptr = getResourceAddress(rtString, a);
-		if (!(_game.id == GID_LOOM && _game.version == 4)) {	/* FIXME - LOOM256 */
-			if (ptr == NULL)
-				error("String %d does not exist", a);
-			ptr[b] = c;
-		}
-
+		if (ptr == NULL)
+			error("String %d does not exist", a);
+		ptr[b] = c;
 		break;
 
 	case 4:											/* get string char */

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-03-18 18:38:33 UTC (rev 21370)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-03-19 02:50:51 UTC (rev 21371)
@@ -1543,6 +1543,17 @@
 	_inventoryOffset = 0;
 }
 
+void ScummEngine_v4::scummInit() {
+	ScummEngine::scummInit();
+
+	// WORKAROUND for bug in boot script of Loom (CD)
+	// The boot script sets the characters of string 21, 
+	// before creating the string.resource.
+	if (_game.id == GID_LOOM) {
+		res.createResource(rtString, 21, 12);
+	}
+}
+
 void ScummEngine_v6::scummInit() {
 	ScummEngine::scummInit();
 	setDefaultCursor();
@@ -1623,7 +1634,6 @@
 	int len = resStrLen(basename);
 	ArrayHeader *ah = defineArray(129, kStringArray, 0, 0, 0, len);
 	memcpy(ah->data, basename, len);
-
 }
 #endif
 


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