diff options
-rw-r--r-- | engines/sci/engine/savegame.cpp | 6 | ||||
-rw-r--r-- | engines/sci/resource.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index de891b559e..bfd49578a0 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -71,6 +71,12 @@ void syncWithSerializer(Common::Serializer &s, Common::Serializable &obj) { obj.saveLoadWithSerializer(s); } +void syncWithSerializer(Common::Serializer &s, ResourceId &obj) { + s.syncAsByte(obj._type); + s.syncAsUint16LE(obj._number); + s.syncAsUint32LE(obj._tuple); +} + void syncWithSerializer(Common::Serializer &s, reg_t &obj) { // Segment and offset are accessed directly here s.syncAsUint16LE(obj._segment); diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 3239a16081..878e2acd8b 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -164,6 +164,8 @@ class ResourceId { return string; } + friend void syncWithSerializer(Common::Serializer &s, ResourceId &obj); + public: ResourceId() : _type(kResourceTypeInvalid), _number(0), _tuple(0) { } |