diff options
author | Paul Gilbert | 2019-07-04 11:40:59 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-07-06 15:27:09 -0700 |
commit | 87a86c0fb61add346a368c27407be990c2827c4c (patch) | |
tree | e553b87b3f9c2d2ff4350de0f561f3249f5df43d /engines/glk/alan3/acode.cpp | |
parent | c5214f6d349df9bc4ec088bbbca3543e47b22744 (diff) | |
download | scummvm-rg350-87a86c0fb61add346a368c27407be990c2827c4c.tar.gz scummvm-rg350-87a86c0fb61add346a368c27407be990c2827c4c.tar.bz2 scummvm-rg350-87a86c0fb61add346a368c27407be990c2827c4c.zip |
GLK: ALAN3: Merge saving & loading code, loading fixes
Diffstat (limited to 'engines/glk/alan3/acode.cpp')
-rw-r--r-- | engines/glk/alan3/acode.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/glk/alan3/acode.cpp b/engines/glk/alan3/acode.cpp index 3dbfaa5cc0..4d41e0fc43 100644 --- a/engines/glk/alan3/acode.cpp +++ b/engines/glk/alan3/acode.cpp @@ -26,9 +26,20 @@ namespace Glk { namespace Alan3 { void AttributeEntry::synchronize(Common::Serializer &s) { - s.syncAsSint32LE(code); - s.syncAsSint32LE(value); - s.syncAsSint32LE(id); + // We have to do some annoying temporary copy of the fields to get around gcc + // errors about getting references to fields of packed structures + Aint c = code; + Aptr v = value; + Aaddr i = id; + s.syncAsSint32LE(c); + s.syncAsSint32LE(v); + s.syncAsSint32LE(i); + + if (s.isLoading()) { + code = c; + value = v; + id = i; + } } } // End of namespace Alan3 |