aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-10 23:05:32 +0200
committerEugene Sandulenko2019-09-03 17:17:17 +0200
commitfe309b1456b027310e08dd6cf862cbef565285b3 (patch)
tree3be0e7f558d05bf4de1e0058fe444af5f495c68c /engines/hdb
parente7016e52a9be6b07a4cb3dcca1e8c875078a2bb1 (diff)
downloadscummvm-rg350-fe309b1456b027310e08dd6cf862cbef565285b3.tar.gz
scummvm-rg350-fe309b1456b027310e08dd6cf862cbef565285b3.tar.bz2
scummvm-rg350-fe309b1456b027310e08dd6cf862cbef565285b3.zip
HDB: Fix save/loading of inventory
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai-init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index 66e78f1f97..5eeff2bd8c 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -1275,6 +1275,7 @@ void AI::save(Common::OutSaveFile *out) {
// Save Inventory
for (i = 0; i < kMaxInventory; i++) {
out->writeUint16LE(_inventory[i].keep);
+ _inventory[i].ent.save(out);
}
out->writeUint32LE(_numInventory);
@@ -1464,6 +1465,7 @@ void AI::loadSaveFile(Common::InSaveFile *in) {
// Load Inventory
for (i = 0; i < kMaxInventory; i++) {
_inventory[i].keep = in->readUint16LE();
+ _inventory[i].ent.load(in);
}
_numInventory = in->readUint32LE();