[Scummvm-cvs-logs] SF.net SVN: scummvm: [29543] scummvm/trunk/engines/agos/saveload.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Nov 18 05:02:11 CET 2007
Revision: 29543
http://scummvm.svn.sourceforge.net/scummvm/?rev=29543&view=rev
Author: Kirben
Date: 2007-11-17 20:02:11 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
Fix loading restart state file in Amiga version of Waxworks.
Modified Paths:
--------------
scummvm/trunk/engines/agos/saveload.cpp
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2007-11-18 01:14:20 UTC (rev 29542)
+++ scummvm/trunk/engines/agos/saveload.cpp 2007-11-18 04:02:11 UTC (rev 29543)
@@ -1267,11 +1267,14 @@
// read the items in item store
for (i = 0; i != _numItemStore; i++) {
- 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));
+ if (getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) {
+ _itemStore[i] = derefItem(f->readUint16BE() / 16);
+ } else if (getGameType() == GType_ELVIRA2) {
+ if (getPlatform() == Common::kPlatformPC) {
+ _itemStore[i] = derefItem(readItemID(f));
+ } else {
+ _itemStore[i] = derefItem(f->readUint16BE() / 18);
+ }
} else {
_itemStore[i] = derefItem(f->readUint16BE());
}
@@ -1414,11 +1417,14 @@
// write the items in item store
for (i = 0; i != _numItemStore; i++) {
- 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]));
+ if (getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) {
+ f->writeUint16BE(itemPtrToID(_itemStore[i]) * 16);
+ } else if (getGameType() == GType_ELVIRA2) {
+ if (getPlatform() == Common::kPlatformPC) {
+ writeItemID(f, itemPtrToID(_itemStore[i]));
+ } else {
+ f->writeUint16BE(itemPtrToID(_itemStore[i]) * 18);
+ }
} 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