aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/action.cpp4
-rw-r--r--engines/mads/hotspots.cpp1
-rw-r--r--engines/mads/rails.cpp11
3 files changed, 6 insertions, 10 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index edb5f0f8f2..80480cbdfd 100644
--- a/engines/mads/action.cpp
+++ b/engines/mads/action.cpp
@@ -685,6 +685,10 @@ void MADSAction::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_statusTextIndex);
s.syncAsSint16LE(_hotspotId);
_savedFields.synchronize(s);
+
+ // TODO: When saving in Rex Village Hut, _senetence size() doesn't match
+ // string length. Find out why not
+ _sentence = Common::String(_sentence.c_str());
s.syncString(_sentence);
s.syncAsSint16LE(_verbType);
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index d3ce0a9263..98080f729a 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -154,6 +154,7 @@ void DynamicHotspots::synchronize(Common::Serializer &s) {
for (int i = 0; i < count; ++i)
_entries[i].synchronize(s);
} else {
+ _entries.clear();
DynamicHotspot rec;
rec.synchronize(s);
_entries.push_back(rec);
diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp
index 6beee5a242..7ae0d92265 100644
--- a/engines/mads/rails.cpp
+++ b/engines/mads/rails.cpp
@@ -267,17 +267,8 @@ void Rails::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_routeLength);
s.syncAsSint16LE(_next);
- int count = _routeIndexes.size();
- if (s.isSaving()) {
- for (int i = 0; i < count; ++i)
- s.syncAsUint16LE(_routeIndexes[i]);
- } else {
+ if (s.isLoading()) {
_routeIndexes.clear();
- for (int i = 0; i < count; ++i) {
- int v = 0;
- s.syncAsUint16LE(v);
- _routeIndexes.push(v);
- }
}
}