aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/inventory.cpp')
-rw-r--r--engines/sherlock/inventory.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index 9eedac7c6a..3ba6f9d2bd 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -486,4 +486,24 @@ int Inventory::deleteItemFromInventory(const Common::String &name) {
return 1;
}
+/**
+ * Synchronize the data for a savegame
+ */
+void Inventory::synchronize(Common::Serializer &s) {
+ s.syncAsSint16LE(_holdings);
+
+ uint count = size();
+ s.syncAsUint16LE(count);
+ if (s.isLoading()) {
+ resize(count);
+
+ // Reset inventory back to start
+ _invIndex = 0;
+ }
+
+ for (uint idx = 0; idx < size(); ++idx) {
+ // TODO
+ }
+}
+
} // End of namespace Sherlock