[Scummvm-cvs-logs] scummvm master -> c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9
bluegr
md5 at scummvm.org
Mon May 14 10:17:55 CEST 2012
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:
c3f0a426fc SCI: kMakeSaveFileName is actually using virtual savegame IDs
Commit: c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9
https://github.com/scummvm/scummvm/commit/c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-05-14T01:16:11-07:00
Commit Message:
SCI: kMakeSaveFileName is actually using virtual savegame IDs
Changed paths:
engines/sci/engine/kfile.cpp
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 24ef500..af438bd 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -331,7 +331,7 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) {
s->_segMan->strcpy(argv[1], "__throwaway");
debug(3, "K_DEVICE_INFO_GET_SAVEFILE_NAME(%s,%d) -> %s", game_prefix.c_str(), virtualId, "__throwaway");
if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END))
- error("kDeviceInfo(deleteSave): invalid savegame-id specified");
+ error("kDeviceInfo(deleteSave): invalid savegame ID specified");
uint savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START;
Common::Array<SavegameDesc> saves;
listSavegames(saves);
@@ -526,7 +526,7 @@ reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) {
char *saveNamePtr = saveNames;
for (uint i = 0; i < totalSaves; i++) {
- *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame-id ffs. see above
+ *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID ffs. see above
strcpy(saveNamePtr, saves[i].name);
saveNamePtr += SCI_MAX_SAVENAME_LENGTH;
}
@@ -1187,10 +1187,10 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) {
// Param 2: the selected slot
SciString *resultString = s->_segMan->lookupString(argv[0]);
- uint16 saveSlot = argv[2].toUint16();
- // For some reason, the save slot is incremented by 100... fix it here
- if (saveSlot > 100)
- saveSlot -= 100;
+ uint16 virtualId = argv[2].toUint16();
+ if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END))
+ error("kMakeSaveFileName: invalid savegame ID specified");
+ uint saveSlot = virtualId - SAVEGAMEID_OFFICIALRANGE_START;
Common::Array<SavegameDesc> saves;
listSavegames(saves);
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 187f1ce..69eb377 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -775,7 +775,7 @@ const uint16 mothergoose256PatchReplay[] = {
PATCH_END
};
-// when saving, it also checks if the savegame-id is below 13.
+// when saving, it also checks if the savegame ID is below 13.
// we change this to check if below 113 instead
const byte mothergoose256SignatureSaveLimit[] = {
5,
More information about the Scummvm-git-logs
mailing list