aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-03-21 12:06:35 -0400
committerMatthew Hoops2011-03-21 12:15:14 -0400
commitcb948934abe14058bde1dc373da8ece04fd1e904 (patch)
tree54492bbc0f915ad5d922a99b89771dd14d9133be
parent54ac6ade49393dba039c19117b094a72675812c6 (diff)
downloadscummvm-rg350-cb948934abe14058bde1dc373da8ece04fd1e904.tar.gz
scummvm-rg350-cb948934abe14058bde1dc373da8ece04fd1e904.tar.bz2
scummvm-rg350-cb948934abe14058bde1dc373da8ece04fd1e904.zip
MOHAWK: Add workaround for loading the bytramtime variable
-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);