diff options
Diffstat (limited to 'engines/sci/graphics/helpers.h')
-rw-r--r-- | engines/sci/graphics/helpers.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h index f0ffecfb59..115a4c996e 100644 --- a/engines/sci/graphics/helpers.h +++ b/engines/sci/graphics/helpers.h @@ -28,6 +28,7 @@ #include "common/endian.h" // for READ_LE_UINT16 #include "common/rect.h" +#include "common/serializer.h" #include "sci/engine/vm_types.h" namespace Sci { @@ -82,6 +83,13 @@ struct Window : public Port { struct Color { byte used; byte r, g, b; + + void saveLoadWithSerializer(Common::Serializer &s) { + s.syncAsByte(used); + s.syncAsByte(r); + s.syncAsByte(g); + s.syncAsByte(b); + } }; struct Palette { @@ -89,6 +97,14 @@ struct Palette { uint32 timestamp; Color colors[256]; byte intensity[256]; + + void saveLoadWithSerializer(Common::Serializer &s) { + s.syncBytes(mapping, 256); + s.syncAsUint32LE(timestamp); + for (int i = 0; i < 256; i++) + colors[i].saveLoadWithSerializer(s); + s.syncBytes(intensity, 256); + } }; struct PalSchedule { |