diff options
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_people.cpp | 22 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_people.h | 4 |
2 files changed, 26 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 diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h index 481ce7804a..c4f0bfd3ed 100644 --- a/engines/sherlock/tattoo/tattoo_people.h +++ b/engines/sherlock/tattoo/tattoo_people.h @@ -87,6 +87,10 @@ public: */ void setListenSequence(int speaker, int sequenceNum); + /** + * Synchronize the data for a savegame + */ + virtual void synchronize(Serializer &s); /** * Change the sequence of the scene background object associated with the specified speaker. |