aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/saveload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/saveload.cpp')
-rw-r--r--engines/agos/saveload.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index b399e58688..16dd32b97e 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -1261,7 +1261,10 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
// 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 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
// 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]));