[Scummvm-cvs-logs] SF.net SVN: scummvm: [29534] scummvm/trunk/engines/agos/saveload.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sat Nov 17 11:27:31 CET 2007


Revision: 29534
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29534&view=rev
Author:   Kirben
Date:     2007-11-17 02:27:31 -0800 (Sat, 17 Nov 2007)

Log Message:
-----------
Fix bug #1759850 - ELVIRA2: Restart state file causes crash. The itemStore data needed to be adjusting, when loading or saving in the AtariST and Amiga versions.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/saveload.cpp

Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp	2007-11-17 10:21:27 UTC (rev 29533)
+++ scummvm/trunk/engines/agos/saveload.cpp	2007-11-17 10:27:31 UTC (rev 29534)
@@ -1261,7 +1261,10 @@
 
 	// read the items in item store
 	for (i = 0; i != _numItemStore; i++) {
-		if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) {
+		if ((getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) &&
+			(getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformAtariST)) {
+			_itemStore[i] = derefItem(f->readUint16BE() / 18);
+		} else if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) {
 			_itemStore[i] = derefItem(readItemID(f));
 		} else {
 			_itemStore[i] = derefItem(f->readUint16BE());
@@ -1405,7 +1408,10 @@
 
 	// write the items in item store
 	for (i = 0; i != _numItemStore; i++) {
-		if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) {
+		if ((getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) &&
+			(getPlatform() == Common::kPlatformAmiga || getPlatform() == Common::kPlatformAtariST)) {
+			f->writeUint16BE(itemPtrToID(_itemStore[i]) * 18);
+		} else if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) {
 			writeItemID(f, itemPtrToID(_itemStore[i]));
 		} else {
 			f->writeUint16BE(itemPtrToID(_itemStore[i]));


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