[Scummvm-cvs-logs] SF.net SVN: scummvm:[54400] scummvm/trunk/engines/sci/engine/vm.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Nov 21 01:49:55 CET 2010


Revision: 54400
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54400&view=rev
Author:   thebluegr
Date:     2010-11-21 00:49:54 +0000 (Sun, 21 Nov 2010)

Log Message:
-----------
SCI: Removed incorrect pointer arithmetic support for SCI2 strings

There was never pointer arithmetic support in SCI2 and newer games

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/vm.cpp

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-11-21 00:47:56 UTC (rev 54399)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-11-21 00:49:54 UTC (rev 54400)
@@ -640,31 +640,6 @@
 	case SEG_TYPE_DYNMEM:
 		base.offset += offset;
 		return base;
-#ifdef ENABLE_SCI32
-	case SEG_TYPE_STRING: {
-		// We need to copy over the string into a new one
-		// Make sure that the offset is positive
-		if (offset < 0)
-			error("pointer_add: Attempt to reference a previous offset of a SCI string");
-
-		// Get the source string...
-		SciString *str = s->_segMan->lookupString(base);
-		Common::String rawStr = str->toString();
-
-		// ...and copy it to a new one
-		reg_t newStringAddr;
-		SciString *newStr = s->_segMan->allocateString(&newStringAddr);
-		newStr->setSize(str->getSize() - offset);
-
-		// Cut off characters till we reach the desired location
-		for (int i = 0; i < offset; i++)
-			rawStr.deleteChar(0);
-
-		newStr->fromString(rawStr);
-
-		return newStringAddr;
-	}
-#endif
 	default:
 		// FIXME: Changed this to warning, because iceman does this during dancing with girl.
 		// Investigate why that is so and either fix the underlying issue or implement a more


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