[Scummvm-cvs-logs] scummvm master -> cb948934abe14058bde1dc373da8ece04fd1e904
clone2727
clone2727 at gmail.com
Mon Mar 21 17:16:50 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
54ac6ade49 MOHAWK: Don't error out when the ReturnStackID cannot be converted
cb948934ab MOHAWK: Add workaround for loading the bytramtime variable
Commit: 54ac6ade49393dba039c19117b094a72675812c6
https://github.com/scummvm/scummvm/commit/54ac6ade49393dba039c19117b094a72675812c6
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-21T09:15:14-07:00
Commit Message:
MOHAWK: Don't error out when the ReturnStackID cannot be converted
Changed paths:
engines/mohawk/riven_saveload.cpp
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index c7b5cd0..bd83964 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -173,7 +173,7 @@ bool RivenSaveLoad::loadGame(Common::String filename) {
stackID = mapOldStackIDToNew(rawVariables[i]);
else if (name.equalsIgnoreCase("CurrentCardID"))
cardID = rawVariables[i];
- else if (name.equalsIgnoreCase("ReturnStackID"))
+ else if (name.equalsIgnoreCase("ReturnStackID") && *var != 0) // if 0, the game did not use the variable yet
*var = mapOldStackIDToNew(rawVariables[i]);
}
Commit: cb948934abe14058bde1dc373da8ece04fd1e904
https://github.com/scummvm/scummvm/commit/cb948934abe14058bde1dc373da8ece04fd1e904
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-21T09:15:14-07:00
Commit Message:
MOHAWK: Add workaround for loading the bytramtime variable
Changed paths:
engines/mohawk/riven_saveload.cpp
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index bd83964..d70c3c6 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);
More information about the Scummvm-git-logs
mailing list