aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_people.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-07 19:18:14 -0400
committerPaul Gilbert2015-06-07 19:18:14 -0400
commitaf2a1a33514ae101d1df52e6a978296ed0bef68b (patch)
treeda8cd807e375ad6b8d20d374ccfc685f3e3805c7 /engines/sherlock/tattoo/tattoo_people.cpp
parent19448b2fdb172a6fd85b0ffad727116dea19d5d5 (diff)
downloadscummvm-rg350-af2a1a33514ae101d1df52e6a978296ed0bef68b.tar.gz
scummvm-rg350-af2a1a33514ae101d1df52e6a978296ed0bef68b.tar.bz2
scummvm-rg350-af2a1a33514ae101d1df52e6a978296ed0bef68b.zip
SHERLOCK: Refactoring, cleanup, and fixes for savegame code
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_people.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index 4e4f11b983..6952c876c0 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -200,6 +200,28 @@ void TattooPeople::setTalkSequence(int speaker, int sequenceNum) {
}
}
+void TattooPeople::synchronize(Serializer &s) {
+ s.syncAsByte(_holmesOn);
+
+ for (int idx = 0; idx < MAX_CHARACTERS; ++idx) {
+ Person &p = _data[idx];
+ s.syncAsSint32LE(p._position.x);
+ s.syncAsSint32LE(p._position.y);
+ s.syncAsSint16LE(p._sequenceNumber);
+ s.syncAsSint16LE(p._type);
+ s.syncString(p._walkVGSName);
+ s.syncString(p._description);
+ s.syncString(p._examine);
+ }
+
+ s.syncAsSint16LE(_holmesQuotient);
+
+ if (s.isLoading()) {
+ _hSavedPos = _player._position;
+ _hSavedFacing = _player._sequenceNumber;
+ }
+}
+
} // End of namespace Tattoo
} // End of namespace Sherlock