aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/riven_saveload.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index bd839646d4..d70c3c69b1 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -167,14 +167,22 @@ bool RivenSaveLoad::loadGame(Common::String filename) {
uint32 *var = _vm->getVar(name);
- *var = rawVariables[i];
-
- if (name.equalsIgnoreCase("CurrentStackID"))
+ // Handle any special variables here
+ // WORKAROUND: bytramtime is reset here for one main reason:
+ // The save does not store any start point for the time, so we don't know the real time.
+ // Because of this, in many cases, the original would just give a 'free' Ytram upon saving
+ // since the time would be used in a new (improper) time frame.
+ // TODO: Check of the other 'time' variables require this too
+ if (name.equalsIgnoreCase("CurrentStackID")) // Remap to our definitions, store for later
stackID = mapOldStackIDToNew(rawVariables[i]);
- else if (name.equalsIgnoreCase("CurrentCardID"))
+ else if (name.equalsIgnoreCase("CurrentCardID")) // Store for later
cardID = rawVariables[i];
else if (name.equalsIgnoreCase("ReturnStackID") && *var != 0) // if 0, the game did not use the variable yet
*var = mapOldStackIDToNew(rawVariables[i]);
+ else if (name.equalsIgnoreCase("bytramtime")) // WORKAROUND: See above
+ *var = 0;
+ else // Otherwise, just store it
+ *var = rawVariables[i];
}
_vm->changeToStack(stackID);