diff options
author | Filippos Karapetis | 2012-05-14 11:14:10 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-05-14 11:16:11 +0300 |
commit | c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9 (patch) | |
tree | b5e93891619ce8de91d199ecd56a7f6eb6225413 /engines | |
parent | 6b38731d393cdc85937c74b301df5f3b3de5af9e (diff) | |
download | scummvm-rg350-c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9.tar.gz scummvm-rg350-c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9.tar.bz2 scummvm-rg350-c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9.zip |
SCI: kMakeSaveFileName is actually using virtual savegame IDs
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 12 | ||||
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 24ef500d80..af438bdaff 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 187f1ce021..69eb377684 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, |