[Scummvm-git-logs] scummvm master -> 748d1e09d209aa48bebb325bb74d9380aab436aa
aquadran
noreply at scummvm.org
Tue May 31 16:59:58 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
748d1e09d2 GLK: Reverted previous compiler fix. Used different way.
Commit: 748d1e09d209aa48bebb325bb74d9380aab436aa
https://github.com/scummvm/scummvm/commit/748d1e09d209aa48bebb325bb74d9380aab436aa
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-05-31T18:59:54+02:00
Commit Message:
GLK: Reverted previous compiler fix. Used different way.
Changed paths:
engines/glk/alan2/types.cpp
diff --git a/engines/glk/alan2/types.cpp b/engines/glk/alan2/types.cpp
index 6c35e7e33cb..591893aacc9 100644
--- a/engines/glk/alan2/types.cpp
+++ b/engines/glk/alan2/types.cpp
@@ -25,24 +25,27 @@ namespace Glk {
namespace Alan2 {
// This works around gcc errors for passing packed structure fields
-static void syncVal(Common::Serializer &s, int &fld) {
- s.syncAsSint32LE(fld);
+static void syncVal(Common::Serializer &s, void *fld) {
+ uint32 v = READ_UINT32(fld);
+ s.syncAsSint32LE(v);
+ if (s.isLoading())
+ WRITE_UINT32(fld, v);
}
void CurVars::synchronize(Common::Serializer &s) {
- syncVal(s, vrb);
- syncVal(s, obj);
- syncVal(s, loc);
- syncVal(s, act);
- syncVal(s, tick);
- syncVal(s, score);
- syncVal(s, visits);
+ syncVal(s, &vrb);
+ syncVal(s, &obj);
+ syncVal(s, &loc);
+ syncVal(s, &act);
+ syncVal(s, &tick);
+ syncVal(s, &score);
+ syncVal(s, &visits);
}
void EvtqElem::synchronize(Common::Serializer &s) {
- syncVal(s, time);
- syncVal(s, event);
- syncVal(s, where);
+ syncVal(s, &time);
+ syncVal(s, &event);
+ syncVal(s, &where);
}
} // End of namespace Alan2
More information about the Scummvm-git-logs
mailing list